That's a nice idea! The code that calls current-print can check to see if
the function accepts a specific keyword parameter and, if it does, supply
it with a srcloc.
Robby
On Mon, Aug 31, 2020 at 2:38 PM Greg Hendershott
wrote:
> I might be misunderstanding and the following isn't some fully-t
I might be misunderstanding and the following isn't some fully-thought-out
proposal, but:
IIUC both #%module-begin and read-eval-print-loop use current-print.
What if current-print accepted a new, optional srcloc parameter?
And the default #%module-begin were changed to supply this?
That way,
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)
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
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]
>
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)
)
6 matches
Mail list logo