Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#685 closed defect (fixed)

R5RS evaluation environments still contain some non-std bindings

Reported by: felix winkelmann Owned by: felix winkelmann
Priority: major Milestone: 4.9.0
Component: expander Version: 4.7.x
Keywords: environments Cc:
Estimated difficulty:

Description

scheme-report-environment and null-environment contain some non-standard bindings, mainly because it was considered more convenient once (there is no need to do (import chicken) when one wants to use begin-for-syntax, for example.

The following extra bindings are available:

export begin-for-syntax module require-extension require-library cond-expand syntax reexport import-for-syntax import

import, reexport and import-for-syntax are from the initial macro environment and are always available in a fresh module.

Probably handled just by filtering out these extra bindings, but then no import of modules is possible. Perhaps keep the initial bindings or just the import[-for-syntax]. Dunno. Need advice.

Change History (8)

comment:1 Changed 9 years ago by Christian Kellermann

As I read the the R5RS document, you are allowed to add any other specifier for (scheme-report-environment N), so if your goal is to adhere to R5RS, you can move the extra bindings to (scheme-report-environment '5-chicken) or something better.

Hopefully this issue is transient with (scheme-report-environment 7) defining most of those forms or equivalents. That's at least my hope.

comment:2 Changed 9 years ago by felix winkelmann

Owner: felix winkelmann deleted
Status: newassigned

comment:3 Changed 9 years ago by felix winkelmann

Owner: set to felix winkelmann

comment:4 Changed 9 years ago by felix winkelmann

Component: unknownexpander
Milestone: 4.8.0
Priority: minormajor

Apparently non-std syntax still leaks into code evaluated with null-environment, scheme-report-environment or module-environment.

comment:5 Changed 9 years ago by felix winkelmann

Patch is pending and waiting for review.

comment:6 in reply to:  1 Changed 9 years ago by felix winkelmann

Replying to ckeen:

As I read the the R5RS document, you are allowed to add any other specifier for (scheme-report-environment N), so if your goal is to adhere to R5RS, you can move the extra bindings to (scheme-report-environment '5-chicken) or something better.

Well, the available bindings do not represent a Scheme report, so I would suggest not to add a chicken-specific specifier. When richer or custom environments are needed, once can always use interaction-environment or module-environment.

comment:7 Changed 9 years ago by felix winkelmann

Resolution: fixed
Status: assignedclosed

comment:8 Changed 8 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.