[plt-scheme] s-exp and custom reader

From: YC (yinso.chen at gmail.com)
Date: Mon Jul 14 16:34:45 EDT 2008

On Mon, Jul 14, 2008 at 1:13 PM, Anton Tayanovskyy <
anton.tayanovskyy at gmail.com> wrote:

> From the manual:
> A sequence #lang 〈name〉 is equivalent to #reader 〈name〉/lang/reader
> http://docs.plt-scheme.org/reference/reader.html#(part._parse-reader)<http://docs.plt-scheme.org/reference/reader.html#%28part._parse-reader%29>
> So you can use #lang instead of #reader.

Yes - except `#lang` cannot handle all module spec such as `lib` or
`planet`module path.
`s-exp` will use the next datum as the module path, but AFAICT
`s-exp`doesn't allow the use of custom reader (which my custom
language requires),
and hence I ended up having to use #reader and hack my own s-exp module if I
want to use `(planet ...)` as the module resolver.

> Not sure what your exact problem is, but I guess you can always hack
> the s-exp/lang/reader.ss module to suit your needs, making, for
> instance, a my-s-exp/lang/reader.ss module.

That's what I did, thanks.  But in order to use `(planet ...)` path resolver
- it appears I need to use `#reader` instead of `#lang`.  Hence I'm
interesting in seeing `#lang` support more module specs.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080714/c6ed630c/attachment.html>

Posted on the users mailing list.