[plt-scheme] MzLib's unitsig.ss

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Mon Jan 20 05:37:06 EST 2003

--- Taylor Campbell <campbell at evdev.ath.cx> wrote:
> Is it possible to use macros in a unit/sig?

Units are run-time values.  Macros are expansion-time
values.  Expansion-time occurs before run-time; hence
units cannot export (or import) macros.  However units
can use macros defined in the enclosing module.

E.g.:

(module eg mzscheme

  (require (lib "unitsig.ss")))

  (define-syntax my-macro ...)

  (define my-unit@
    (unit/sig ...

       (my-macro ...)))
 )

HTH,
Noel

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


Posted on the users mailing list.