Opened 6 months ago

#1759 new defect

Module system weirdness

Reported by: Idiomdrottning Owned by:
Priority: major Milestone: someday
Component: unknown Version: 5.2.0
Keywords: Cc:
Estimated difficulty:

Description

So the trippy thing is that if I start a fresh REPL and

(import brev-separate)

without importing matchable nor import-for-syntax anything,
{{define-ir-syntax*}} works.

When I try to do that inside a module, it doesn't work.

{{define-ir-syntax*}} is a macro that makes macros, using matchable to do so.

OK, so let me try something else:

When I make a file not in a module but just something.scm and in that file only put:

(import brev-separate)
(define-ir-syntax* (jolly) '(print "This is jolly good"))
(jolly)

and then csc it and run it, it works.

But inside of a module it does not work. I need {{(import-for-syntax matchable)}}.

This behavior, I don't know if it's a bug or not but it was
unintuitive enough to send me on an 8 hour rabbit hole trek.

Which is fine. I was embarrassed in the IRC channel but I'm glad everyone was cool.

I wish I understood the module system better. I feel like I'm just
klutzing around, testing out what works and doesn't work.

Change History (0)

Note: See TracTickets for help on using tickets.