I'm aware that `#lang name ...` is equivalent to `(module id name ...)`. But `#lang` automatically picks up a reader; `module` does not.

Is there a way to attach a reader to the `module` form (the idea being that then, within the `module` expression, you could write using the native syntax of the #lang)?

Studying the example in reader extensions (Guide ยง 17.2), I found that this works, but I haven't figured out if it can be generalized:

#lang racket/base
(module inner racket/base
  '(#reader"five.rkt"23456))
(require 'inner)

For instance, my current reader works in the REPL, like so:

'#reader(submod pollen/main reader)Hello World

But this doesn't work, because the reader, which operates in text mode, absorbs the closing parenthesis:

#lang racket/base
(module inner racket/base
  '#reader(submod pollen/main reader)Hello World
  )
____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to