[plt-scheme] Units and macros

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Dec 7 18:53:22 EST 2008

Right. This is a change from an earlier version of the unit system,
where the identifiers in the signature were introduced as bindings by
`define-values/invoke-unit' independent of the way that the signature
identifier itself might bind. Now, the way that the signature
identifier would bind is propagates to the components of the signature.

 http://list.cs.brown.edu/pipermail/plt-scheme/2008-October/027663.html



At Sun, 07 Dec 2008 16:37:35 -0700, Chongkai Zhu wrote:
> As suggested my Matthew, only syntax-local-introduce the export signature:
> 
> (define-syntax (with-ring stx)
>  (syntax-case stx ()
>    [(_ ring-unit expr ...)
>     #`(let ()
>         (define-values/invoke-unit ring-unit
>           (import) (export #,(syntax-local-introduce #'ring^)))
>         expr ...)]))
> 
> Chongkai
> 
> 
> Jens Axel Soegaard wrote:
> > Hi all,
> >
> > Below the macro with-ring doesn't give the result I want.
> > The macros with-ring-ver2 and with-ring-ver3 give the
> > correct result, but are actually correct?
> >
> > /Jens Axel
> >
> >
> 
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.