[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Waddell/Dybvig module system

From: Neil Jerram
Subject: Re: Waddell/Dybvig module system
Date: 14 Jan 2001 21:17:46 +0000

>>>>> "Michael" == Michael Livshin <address@hidden> writes:

    Michael> [...]

    Michael> so the `use-modules' macro would be defined like the
    Michael> following:

    Michael> ;; defined through the unsafe macro mechanism.
    Michael> syntax-case still ;; gives me a *massive* headache, for
    Michael> some reason.

Yeah; I just tried to reread the syntax-case section in Dybvig's book,
and it stumped me again.  A good rule of thumb, though, seems to be:
if in doubt, add another `(syntax ...)'. :-)

    Michael> (defmacro use-modules names

    Michael>   (define (use-one-module name) `(module*
    Michael> ,(read-interface name) (include ,(module-body-file-name
    Michael> name))))

    Michael>   `(begin ,@(map use-one-module names)))

Hmmm.  I think that this would work, but I believe that read-interface
and include are going to need both side-inputs (I mean the opposite of
side-effects, or stuff that is not present in the macro call, i.e. the
contents of the interface file) and those things like
datum->syntax-object - to construct interface identifiers with the
right lexical context - that are verging on the unhygienic (or perhaps
are actually unhygienic - I've not yet found out what hygienic exactly
means).  It seems strange that it is necessary to use such
non-mainstream bits of the module+syntax-case system to implement the
most basic requirements of a practical module system.

Or perhaps I just haven't understood something?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]