[racket] require/provide inside a macro

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Nov 18 21:50:43 EST 2011

Yes, that's a bug. I'll push a repair.

At Fri, 18 Nov 2011 15:22:40 -0700, Jon Rafkind wrote:
> require and provide seem to exhibit strange behavior when used inside a macro. 
> Here, the `all-prefix' macro works (because of the 'prefix-in' somehow) while 
> the `all' macro doesn't.
> 
> #lang racket/base
> 
> (define-syntax-rule (all-prefix)
>    (begin
>      (require (for-meta 1 (prefix-in x: racket/base)))
>      (provide (for-meta 1 x:printf))))
> 
> (define-syntax-rule (all)
>    (begin
>      (require (for-meta 1 racket/base))
>      (provide (for-meta 1 printf))))
> 
> (all-prefix)
> (all)



Posted on the users mailing list.