Opened 18 hours ago
#1861 new defect
[R7RS] Initial environment of a CHICKEN program should be empty
| Reported by: | zaifir | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | someday |
| Component: | unknown | Version: | 5.4.0 |
| Keywords: | Cc: | ||
| Estimated difficulty: | easy |
Description
R7RS (§5.1) requires that no identifiers be bound in the initial environment of a program. Yet there seems to be no way to prevent CHICKEN from importing all of (chicken base) into a CHICKEN program. According to the Report, print should be unbound in the following program:
(import (scheme base)) (print "hello, world")
csc 5.4.0 compiles this (and the resulting binary runs) without an error, since print is in (chicken base), which is automatically imported.
Another result of this asymmetry is that the import qualifiers only, prefix, rename, etc. are effectively useless for (chicken base) and (scheme).
R7RS is right, at least for CHICKEN in r7rs mode: any identifiers used but not defined by a program should be explicitly imported.
Addendum: The wiki.call-cc.org page for (chicken base) suggests that the -explicit-use compiler option can be used to avoid "using" the module, but Bunny351 says this option is unrelated to this issue.
