You can put the macros in the signature. http://docs.racket-lang.org/reference/creatingunits.html?q=signature#%28form._%28%28lib._racket%2Funit..rkt%29._define-signature%29%29
On Wed, Jul 29, 2015 at 8:00 AM, Klaus Ostermann <[email protected]> wrote: > Units are not allowed to export macros, presumably because the unit wiring > takes place after the macro expansion. > > I have a unit and would like to define a few macros based on the interface of > that unit. > > Right now I copy&paste my macros into every file where I wire the unit, such > as in > > ... > (define-values/invoke-unit/infer some-unit@) > > (define-syntax-rule (foo t) (...something-from-the-unit-interface)) > > Surely there is a better way to do this. > > But how? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- Jay McCarthy http://jeapostrophe.github.io "Wherefore, be not weary in well-doing, for ye are laying the foundation of a great work. And out of small things proceedeth that which is great." - D&C 64:33 -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

