guile-devel
[Top][All Lists]
Advanced

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

Re: Document the current module system?


From: NIIBE Yutaka
Subject: Re: Document the current module system?
Date: Mon, 23 Apr 2001 14:58:59 +0900 (JST)

Rob Browning wrote:
 > Eeeew.  Presuming I properly understand what you're saying, I don't
 > think I like that either.

Well, here's the evidence where "recursive namespace" still lives.

Directory structure
    --- m.scm (module which exports symbol "x")
        m     ---- x.scm (the module named "x" under module "m")

------------------------ m.scm
(define-module (m))
(export x)
(define x 1)
------------------------ m/x.scm
(define-module (m x))
(export v)
(define v 1)
------------------------

Example session:
------------------------
$ GUILE_LOAD_PATH=. guile
guile> (use-modules (m))
guile> (use-modules (m x))
standard input:2:1: In procedure process-use-modules in expression 
(process-use-modules (quote #)):
standard input:2:1: not-a-record 1
ABORT: (misc-error)

Type "(backtrace)" to get more information.
------------------------

Here, the symbol "x" in module "m" pollutes the module (m x).

Surprisingly enough, (use-modules (m x))-ing first, then 
(use-modules (m)), it looks it work well.  However, when
we do (use-modules (m x)) again to switch that module, it 
errors.
-- 



reply via email to

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