Removing exporting `import` from (scheme base)
Issue #95
resolved
(scheme base)
currently exports import
syntax however R7RS doesn't specify this and may cause an issue like following case:
(define-library (lib)
(export foo)
(import (scheme base) (scheme write))
(begin
(define-syntax import (syntax-rules ()))
(define-syntax foo
(syntax-rules (import)
((_ import) (display 'ok))
((_ _) (display 'ng)))))
)
(import (lib))
(foo import)
This raises an error for overwriting immutable binding.
Comments (2)
-
reporter -
reporter - changed status to resolved
Removing exporting import syntax from (scheme base). (Fixes
#95)→ <<cset cfe9668d07a3>>
- Log in to comment
I'm not totally sure why I decided to remain this but one thing can be because of the combination with
cond-expand
. Before it didn't behave as R7RS specified, for example, if an import clause is inside of thecond-expand
body, then compiler raised an unbound variable error forimport
. Since this is resolved by#4so there might be no reason to keep it.