Consider the following library:
(define-library (foo) (import (scheme base)) (export) (begin (define-syntax foo (syntax-rules () ((foo) (begin (define set! 42))))) (foo)))
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 `