[plt-scheme] Using 'lang' with relative paths in mzscheme 3.99?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Feb 1 21:49:56 EST 2008

At Fri, 1 Feb 2008 17:48:35 -0500 (EST), Danny Yoo wrote:
> I'm doing a project where I'm defining my own module language, and would 
> like to be able to say something like:
> 
> 
> ######################
> #lang "mylanguage.ss"
> ######################
> 
> but mzscheme 3.99 currently errors out with:
> 
> #######################################################################
> read: expected only alphanumberic, `-', `+', `_', or `/' characters for 
> `#lang', found "
> #######################################################################
> 
> I can get around this by using the longhand "(module ...)" form or by 
> writing my own #reader, but this is slightly awkward.  Is there a plan to 
> remove the syntactic restriction on what comes after #lang?

You can use

 #lang s-exp "mylanguage.ss"

The `s-exp' language use a `scheme/base'-style reader, and it uses the
S-expression afterward as the `module'-level language.

Matthew





Posted on the users mailing list.