[Top][All Lists]

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

Re: Hierarchical name space

From: Ludovic Courtès
Subject: Re: Hierarchical name space
Date: Thu, 08 Apr 2010 10:39:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)


Andy Wingo <address@hidden> writes:

> Hi,
> On Thu 08 Apr 2010 01:01, address@hidden (Ludovic Courtès) writes:
>> Julian Graham <address@hidden> writes:
>>>> I'm still inclined to think that the module namespace hierarchy (and it
>>>> is a hierarchy) should not impinge on the environment of an evaluation.
>>>> But, not something we can change right now.
>>> This is actually causing me some difficulty -- I'm implementing the
>>> R6RS composite library, which imports and then re-exports the bindings
>>> of a lot of the individual R6RS standard libraries.  I'm running into
>>> a problem with `(rnrs syntax-case)', which exports `syntax-case'.
>> Unfortunately I don’t think a module names can contain ‘syntax-case’,
>> just like they can’t contain ‘eval’, ‘+’, etc.  :-(
> Explain more?

Well, the problem has apparently vanished in 1.9:

--8<---------------cut here---------------start------------->8---
$ cat foo.scm 
(define-module (foo) #:export (bar)) (define bar 1)

$ cat foo/eval.scm
(define-module (foo eval) #:export (foo)) (define foo 2)

$ guile -L .
GNU Guile 1.9.9
Copyright (C) 1995-2010 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (foo))
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling ./foo.scm
;;; compiled 
scheme@(guile-user)> (use-modules (foo eval))
;;; compiling ./foo/eval.scm
;;; compiled 

$ ./result/bin/guile -L .
guile> (use-modules (foo))
guile> (use-modules (foo eval))
ERROR: In procedure struct-vtable:
ERROR: Wrong type argument in position 1 (expecting struct): 
#<primitive-procedure eval>
ABORT: (wrong-type-arg)
guile> (version)
$1 = "1.8.7"
--8<---------------cut here---------------end--------------->8---



reply via email to

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