Re: [racket-users] abstraction suggestion?

2020-08-31 Thread Philip McGrath
In addition (or instead, if this is good enough and less painful), you could use a compile-time helper function like: (define-for-syntax (make-mb+ti namespaces-stx lang-print-names-stx) (define-syntax-class to-run #:attributes (parsed) #:literals (TEST)

Re: [racket-users] abstraction suggestion?

2020-08-31 Thread Philip McGrath
There might be a better way, but I'd probably make a language for writing this kind of module, in the spirit of `#lang syntax/module-reader`, where its `#%module-begin` would expect the module body to be ``, similar to the way that the body of `(module reader syntax/module-reader my-language-implem

Re: [racket-users] abstraction suggestion?

2020-08-31 Thread Hendrik Boom
On Mon, Aug 31, 2020 at 10:06:42AM -0700, Shriram Krishnamurthi wrote: > I'm having some trouble abstracting over this code. Any suggestions? > > I have numerous files that follow this boilerplate: > > #lang racket > > (require ) > > (provide (rename-out [mod-begin #%module-begin] >

[racket-users] abstraction suggestion?

2020-08-31 Thread Shriram Krishnamurthi
I'm having some trouble abstracting over this code. Any suggestions? I have numerous files that follow this boilerplate: #lang racket (require ) (provide (rename-out [mod-begin #%module-begin] [ti#%top-interaction])) (define-values (namespaces lang-print-names) )