[<<][staapl][>>][..]Tue Mar 25 13:00:05 EDT 2008
the ':' macro
whenever forth->definitions is called, it needs to be done in an
environment where level -1 has the some definition macro (':')
defined. this can be ensured by requiring it for template.
hmm.. something's wrong here. got some dependencies tangled up.. can
it be made automaticly?
separate things: forth-lang.ss now gives a macro 'forth:' that
produces toplevel forms from forth code. this can then be wrapped for
module works, but it doesn't want to export the name symbols. calling
the transformer directly should solve this: then no marks are
added. alternatively, we could mark ourselves?
aha: the 'provide' statement needs to have the same lexical context as
the names, then it works.
(define-syntax (module-begin stx)
(syntax-case stx ()
((_ code ...)
#,(datum->syntax stx '(provide (all-defined-out)))
(forth: code ...))))))
gathering forth code works too now: everything is dumped in a list
which is named according to the module name.