On Sep 14, 2009, at 6:01 PM, jhaase wrote:
Hmm, interestingly the first one "works" in Petite Chez:
juer...@nix:~$ petite
Petite Chez Scheme Version 7.9.3
Copyright (c) 1985-2009 Cadence Research Systems
(library (foo)
(export bar)
(import (rnrs))
(define bar 'bar))
(define-syntax import-procedure
(syntax-rules ()
((_ library name)
(let ()
(import library)
name))))
(define b (import-procedure (foo) bar))
b
bar
Chez Scheme apparently imports according to the context (or color)
of the last identifier in a library name while ikarus imports it
from the context of the "import" keyword itself. Why last but not
first I have no idea, but this is what it does. Still, the right
way to fix this is by using explicit contexts as in bug:
https://bugs.launchpad.net/ikarus/+bug/376386
Note also that for modules (not libraries), both ikarus and chez
use the context of the module name itself, and not the "import"
keyword, so, Chez's (import (lib) ---) is better than Ikarus's
(import (lib) ---), so, I might change Ikarus's behavior to
match with Chez's.
Aziz,,,