Removing exporting `import` from (scheme base)

Create issue
Issue #95 resolved
Takashi Kato repo owner created an issue

(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)

  1. Takashi Kato reporter

    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 the cond-expand body, then compiler raised an unbound variable error for import. Since this is resolved by #4 so there might be no reason to keep it.

  2. Log in to comment