This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Unbinding root definitions which hide definitions of a module
- To: Greg Badros <gjb at cs dot washington dot edu>
- Subject: Re: Unbinding root definitions which hide definitions of a module
- From: Jost Boekemeier <jostobfe at linux dot zrz dot TU-Berlin dot DE>
- Date: 18 Sep 1999 14:07:51 +0200
- Cc: guile at sourceware dot cygnus dot com
- References: <qrrd7vghejt.fsf@elwha.cs.washington.edu>
Greg Badros <gjb@cs.washington.edu> writes:
> Suppose I have a:
>
> (define foo 1)
>
> in a module.
>
> and I later do a:
>
> (define foo 2)
>
> in the-root-module.
>
> Is there any way to undo the definition in the-root-module to permit the
> definition of foo in the other module to be visible? undefine does not
> seem to do this, and I'm not sure if I'm wrong to expect that it would.
> (It could just be that I'm working too late! :-) ).
(define-module (a))
(define foo 1)
(export foo)
(define-module (b))
(use-modules (a))
(define foo (+ foo 1))
foo -> 2
(undefine foo)
foo -> 1
Unfortunately this doesn't work in the current module implementation.
Jost