[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: top-repl priority of guile module
From: |
Ludovic Courtès |
Subject: |
Re: top-repl priority of guile module |
Date: |
Mon, 04 Dec 2006 13:15:27 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
Kevin Ryde <address@hidden> writes:
> Sven Hartrumpf on guile-user a while ago reported on a run of
>
> guile --use-srfi=1
>
> leaves the REPL with the core `iota', not the srfi-1 one. What's the
> theory behind this bit of top-repl (in boot-9.scm),
>
> ;; so that builtin bindings will be checked first
> (module-use! guile-user-module (resolve-interface '(ice-9 r5rs)))
> (module-use! guile-user-module (resolve-interface '(guile)))
>
> The effect is to override any bindings that srfi modules attempt to
> replace. So srfi-17 car or srfi-39 current-input-port are similarly
> afflicted.
Wild guess: Does the following fix the problem:
(module-use-interfaces! guile-user-module
(resolve-interface '(ice-9 r5rs))
(resolve-interface '(guile)))
(instead of the two `module-use!' line.)
IIRC, `module-use-interfaces!' calls `process-duplicates', which in turn
correctly honors the `replace' policy for duplicate bindings.
Conversely, `module-use!' just conses the given modules to the module's
use list without invoking `process-duplicates', hence the problem you
are seeing (the interface of `(guile)' ends up before that of
`srfi-XX' in the module use list).
Thanks,
Ludovic.
- top-repl priority of guile module, Kevin Ryde, 2006/12/01
- Re: top-repl priority of guile module,
Ludovic Courtès <=
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/04
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/04
- Re: top-repl priority of guile module, Ludovic Courtès, 2006/12/05
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/08
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/08
- Re: top-repl priority of guile module, Neil Jerram, 2006/12/14
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/14
- Re: top-repl priority of guile module, Neil Jerram, 2006/12/30
- Re: top-repl priority of guile module, Ludovic Courtès, 2006/12/15
- Re: top-repl priority of guile module, Neil Jerram, 2006/12/30