[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Q] units and macros in MzScheme
Date: Fri, 24 Mar 2000 19:27:10 -0800 (PST)
X-Authentication-Warning: balu.qualcomm.com: lrazoumo set sender to lrazoumov@qualcomm.com using -f
From: Leo Razoumov <lrazoumov@qualcomm.com>
Reply-To: lrazoumov@qualcomm.com
Content-Type: text/plain; charset=US-ASCII
Sender: owner-plt-scheme@fast.cs.utah.edu
Precedence: bulk
I apologize if I am asking a dumb question:-)
Can one define a macro inside a unit and then export/import it to another
unit or into the global namespace?
thanks,
-- Leo
Good question.
Short answer: no.
Long answer: We believe that macros live at compile/parse time only.
A unit, however, is a run-time value and its exports and imports
are references to run-time values.
Very long answer: We have a prototype implementation of something
called unit/lang. A unit/lang will have an additional form of
imports: a language, roughly a "set" of macros (but there's a bit
more). Then you can do what you want to do.
-- Matthias