chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

#1759: Module system weirdness


From: Chicken Trac
Subject: #1759: Module system weirdness
Date: Tue, 01 Jun 2021 16:18:40 -0000

#1759: Module system weirdness
---------------------------------------+---------------------
            Reporter:  Idiomdrottning  |       Type:  defect
              Status:  new             |   Priority:  major
           Milestone:  someday         |  Component:  unknown
             Version:  5.2.0           |   Keywords:
Estimated difficulty:                  |
---------------------------------------+---------------------
 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.

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/1759>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]