chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] r7rs modules


From: Alex Shinn
Subject: Re: [Chicken-hackers] r7rs modules
Date: Sun, 11 Nov 2012 11:32:00 +0900

On Sun, Nov 11, 2012 at 6:10 AM, Peter Bex <address@hidden> wrote:
Hi all,

I think we should slowly get started thinking about supporting r7rs.
One of the things that I'm wondering about is how to best handle
modules.  R7rs has module names which are lists, ie (scheme base).

This won't work cleanly with native Chicken modules. For example,
(use (scheme base)) will give an error (which would be extensible),
but does (use (only x y)) imply loading a module named (ONLY X Y)
or does it imply loading X and importing only the Y identifier? 

Also, (module foo = (scheme base)) does mean "instantiate the functor
named SCHEME with the module named BASE", or does it mean "FOO is
an alias for (SCHEME BASE)".

One way to do this would be to extend our own "native" syntax to
allow complex module names that are vectors:
(use #(only x y)) will unambiguously load the module named #(ONLY X Y)
while (use (only x y)) will unambiguously load the module named X
and import only identified Y.

A less ugly approach is to have a special module prefix
(chicken <X>) which refers to the <X> egg, e.g. (chicken sqlite3)
refers to the sqlite3 egg.

-- 
Alex


reply via email to

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