[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Waddell/Dybvig module system
From: |
Michael Livshin |
Subject: |
Re: Waddell/Dybvig module system |
Date: |
12 Jan 2001 18:45:04 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Crater Lake) |
Neil Jerram <address@hidden> writes:
> [ ... ]
>
> On the other other hand, if we go with WDM, we'd obviously like to
> emulate the existing module system with it. So presumably - hopefully
> - we will find some way of making WDM as unsafe as Guile already is.
hmmm. the way I see it currently, the only feasible means to
interpret Guile modules in the current syntax is to translate them
first.
so for any module in the current syntax, there would be two files --
one with the interface, the other with the body.
so the `use-modules' macro would be defined like the following:
;; defined through the unsafe macro mechanism. syntax-case still
;; gives me a *massive* headache, for some reason.
(defmacro use-modules names
(define (use-one-module name)
`(module* ,(read-interface name)
(include ,(module-body-file-name name))))
`(begin ,@(map use-one-module names)))
the translation of the current module syntax should be pretty
straightforward, assuming nobody redefines `define-module' or
`export'. ;)
--
A CONS is an object which cares.
-- Bernie Greenberg.