[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: r6rs libraries
From: |
Ludovic Courtès |
Subject: |
Re: r6rs libraries |
Date: |
Tue, 27 Jan 2009 21:09:29 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Hello!
Andy Wingo <address@hidden> writes:
> So from 7.2 of R6RS itself:
>
> An implementation may distinguish instances/visits of a library for
> different phases or to use an instance/visit at any phase as an
> instance/visit at any other phase.
>
> Which is to say, "we allow single instantiation" -- as Guile modules
> are.
[...]
>
> When an identifier appears as an expression in a phase that is
> inconsistent with the identifier’s level, then an implementation
> may raise an exception either at expand time or run time, or it may
> allow the reference.
>
> So, furthermore, it seems that not only may library A be instantiated at
> runtime, /it may be in library B's "import list" as well/. This is what
> happens with Guile's current module semantics.
These both come as a surprise to me, as I had always thought R6RS was
much stricter about phase separation. That's good news for "pure
interpreters"; extra work would still be needed to handle phases > 0 in
the compiler.
Thanks for the detailed reading!
Ludo'.