[plt-scheme] using custom readers

From: Steve Huffman (steve.huffman at gmail.com)
Date: Sun Aug 24 20:00:45 EDT 2008

Hello,

I have a module in "slice.scm" that provides versions of read and
read-syntax that uses a custom readtable.

If I say (require "slice.scm) then use #reader "slice.scm" I can use
my custom readtable for the following expression, and all is well.

What I'd really like to be able to do is define another module that
uses my "slice" reader without having to say #reader "slice.scm"
before every form. For example, it would really be really nice to
start a module with "#lang slice" and have it use my reader. Right now
when I do that I get an error similar to:

default-load-handler: expected a `module' declaration for `foo',
found: something else in: #<path:/tmp/foo.scm>

Thanks,

Steve


Posted on the users mailing list.