[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: re-using a module
From: |
Thien-Thi Nguyen |
Subject: |
Re: re-using a module |
Date: |
Wed, 31 Mar 2004 07:47:56 +0200 |
From: Viktor Pavlenko <address@hidden>
Date: Tue, 30 Mar 2004 12:27:36 -0500
not too inclined to use "black magic" in my code...
there is a work in progress module (ice-9 gumm), snapshot at:
http://www.glug.org/snap/core-1-4/ice-9/gumm.scm
that provides an interface to the module system internals. you can
construct a trivial facsimile for your local guile like so:
(define-module (ice-9 gumm))
(define-public local-remove local-remove)
(define-public current-module current-module)
(define-public eval-in-module eval-in-module)
(define-public module-ref module-ref)
(define-public resolve-module resolve-module)
[...]
then your code can do (use-modules (ice-9 gumm)), which may give you a
feeling of not using magic so much. certainly it will make your code
interoperable w/ 1.4.2. (guile-sdl and guile-pg will do this, e.g.)
in any case, i take your main point to be that load failures should not
result in inconsistent state in the first place; particular approaches
to working around this bug are of secondary concern only. probably
1.4.1.99 will have a fix -- thanks for reminding me of this.
thi