[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] INCLUDE with modules
From: |
Grzegorz Chrupała |
Subject: |
[Chicken-users] INCLUDE with modules |
Date: |
Sun, 20 Jun 2004 21:40:58 +0200 |
User-agent: |
KMail/1.5.3 |
Hi List,
I haven't used Chicken much yet so I'm likely to be just confused, but
the following looks to me like a bug in Chicken's module system:
address@hidden chicken]$ cat foo.scm
(define foo 'FOO)
address@hidden chicken]$ cat bar.scm
(module bar
(a)
(define (a) foo)
(define b 41)
(include "foo.scm"))
address@hidden chicken]$ rlwrap csi -hygienic
___| | _) |
| __ \ | __| | / _ \ __ \
| | | | | ( < __/ | |
\____|_| |_|_|\___|_|\_\\___|_| _|
Version 1, Build 51 - linux-unix-gnu-x86
(c)2000-2004 Felix L. Winkelmann
Using hygienic macros
; loading /usr/local/share/chicken/chicken-highlevel-macros.scm ...
#;> (load "bar")
; loading bar.scm ...
#;> (import bar)
#;> (a)
FOO
#;> b
Error: unbound variable: b
#;> foo
FOO
#;>
Unless I'm doing something wrong or misunderstanding something, it seems
that identifiers defined within a module body via INCLUDE are exported
even though they are not listed among exports.
Cheers!
--
Grzegorz Chrupała | http://pithekos.net | address@hidden
[M]y production vocabulary is very large, my style often swerves between
formality and slangy idiomatic usages within a single paragraph, and
many of my phrasings are subtle allusions to both classics and popular
culture.
-- Eric S. Raymond
- [Chicken-users] INCLUDE with modules,
Grzegorz Chrupała <=