Home > Archive > Scheme > March 2004 > defining my own module system in scheme?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
defining my own module system in scheme?
|
|
| David Fisher 2004-03-27, 12:25 am |
| I've read that one can "define his own module system in Scheme". How
does this work? Using hygienic macros?
| |
| MJ Ray 2004-03-27, 12:25 am |
| dave_a_fisher@yahoo.com (David Fisher) wrote:
> I've read that one can "define his own module system in Scheme". How
> does this work? Using hygienic macros?
There are some examples out there, such as lexmod at
http://www.bloodandcoffee.net/campbell/code/lexmod.scm
which you could study.
| |
| Anton van Straaten 2004-03-27, 12:25 am |
| David Fisher wrote:
> I've read that one can "define his own module system in Scheme". How
> does this work? Using hygienic macros?
Macros provide sugar, but the basic foundation for roll-your-own modules is
usually some variation on lexical scoping via lambda, since that provides
name hiding.
Module systems built into Scheme implementations tend to be more
sophisticated, largely because they have to be implemented at the level at
which the macro system runs, in order to support dependency and phase issues
with macros in modules. They're typically not just relying on lexical
scope, but on actual source processing. Roll-your-own systems tend to punt
on this issue.
The portable syntax-case system includes its own module system. SLIB also
has a module system.
I see lexmod has already been mentioned. A couple of other small systems
that aren't purely module systems, but nevertheless support a kind of
namespace management, are David Rush's functor definition system:
http://groups.google.com/groups?sel....nscp.aoltw.net
....and Andre van Tonder's recently-posted typeclass macros, which can be
seen as a higher-level version of a functor mechanism:
http://groups.google.com/groups?sel...40het.brown.edu
Anton
|
|
|
|
|