Macro expander in library top-level

Issue #267 resolved
Marc Nieper-Wißkirchen created an issue

Consider the following library:

(define-library (foo)
  (import (scheme base))
    (define-syntax foo
      (syntax-rules ()
           (define set! 42)))))


When I import this library, Sagittarius complains that I attempt to modify an immutable variable.

This seems to be a bug of the macro expander. The macro expander should hygienically rename `set!` because it is not part of the transformer's input. The renamed version of `set!` would not clash with the imported identifier `set!`



Comments (2)

  1. Log in to comment