[gambit-list] "unbound variable" after importing macro from library
lassi at lassi.io
Thu Oct 17 18:05:33 EDT 2019
> Has the syntax-case module for Gambit bit-rotted?
It's not usable right now. Gambit has acquired a lot of new features in
a short time period so some patience and support from us users is in
> I know it had
> trouble interacting with DSSSL lambda-list keywords, but I doubt if it
> blocks the ordinary kind.
No knowledge of that. SRFI 177 keyword-lambda needs to be able to expand
into (lambda (... #!key ...) ...) unless there is a shortcut that avoids
using the `#!key` read syntax. The current define-macro version handles
#!key fine. As far as I can tell it has no unintentional variable
capture unless the caller has redefined `lambda`.
> Define-macro is TRULY EVIL and shouldn't be used anywhere you don't
> absolutely have to, even where it is available.
A strong message from the captured variable liberation front :)
> As far as I know, the only
> other Schemes that have both keyword objects and lack another low-level
> macro system besides define-macro are S7 and STKlos
As far as I can tell, Bigloo doesn't have hygienic macros more powerful
than syntax-rules. Note that Gambit also has syntax-rules.
>> If you want to use macros defined with define-macro, you need to put
>> them in the file foo#.scm and use the primitive modules (i.e. foo.scm and
>> foo#.scm files).
Thanks! It was easy to do this way (I put the macros in 177#.scm and
added an empty 177.scm so Gambit finds it; not an issue).
More information about the Gambit-list