[plt-scheme] Modules/Libraries in MZScheme and R6RS
At Mon, 12 May 2008 21:54:58 +0100, Filipe Cabecinhas wrote:
> Hi,
>
> On 12 May, 2008, at 13:04, Matthew Flatt wrote:
>
> >
> > I have no good answer so far. It works to write
> >
> > (import (srfi \x31;))
> >
> > but that's crazy.
> >
> > See also SRFI 97 and the discussion of whether `(srfi 1)' should be
> > allowed.
>
> Weird... It works... But it's weird (I guess it's a workaround so it
> doesn't parse as a number).
> Anyway, there's a bug in DrScheme's syntax highlighter that makes it
> treat the ';' as the start of a comment
DrScheme's Scheme mode currently always parses like the default reader.
Generalizing DrScheme to adjust coloring based on a `#lang' or `#!'
line is planned, but after v4.0.
> Now I have another problem.
> If I have the following code:
> -----------------------
> #!r6rs
> (import (rnrs)
> (rename (rnrs) [car first] [cdr rest]))
> -----------------------
> I expected to be able to use first and rest but they're not available
> in the module body.
This is an import bug that's not isolated to R6RS support. When a
module exports an identifier at multiple phase levels (run time,
compile time, etc.), `rename-in' only renamed the identifier at one of
the phase levels. This bug now fixed in SVN.
Matthew