[racket] Is there a way to specify a reader for the repl for a language?

From: Alexander D. Knauth (alexander at knauth.org)
Date: Fri Oct 24 22:56:37 EDT 2014

Is there a way to specify a reader for the repl for a language?

One bad way to do this would be to modify #%module-begin to include
(current-readtable (make-readtable-for-my-lang))
or something like that.
See
https://github.com/greghendershott/rackjure/pull/46
https://github.com/greghendershott/rackjure/pull/46#issuecomment-60378324

One problem with this is that if this module is required from a module without this language, it would affect that module’s current-readtable.  

So is there a better solution, and if there’s not, would it be possible to add it?




Posted on the users mailing list.