On Thu, Jun 30, 2011 at 2:20 PM, Stephan Houben <steph...@planet.nl> wrote: > > Something like this springs to mind: > > (define-syntax provide/protection > (syntax-rules () > ((_ name) > (begin > (define-syntax tmp > (syntax-rules () > ((_ . args) (name . args)))) > (provide (rename-out (tmp name))))))) > > If I understand correctly then > > (provide/protection mymacro) > > would automatically wrap mymacro and export it > (by virtue of redirecting the transformation through syntax-rules).
Oh, excellent. That should be straightforward enough. Then we have provide/contract for values and provide/protect for macros, and all invariants are protected. :D > May I suggest the following introduction for the documentation? > > "Nice macros you have here. Would be a pity if ... something > happened to them. But we can provide... protection." ... said Matthew menacingly. Stephan watched with a growing sense of dread as Matthew's "enforcer" Ryan picked up a carefully placed identifier and threw it into an unsafe context. --Carl _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev