SRFI-9 define-record-type doesn't work in library
Issue #66
resolved
This raises a macro expansion error.
(library (foo)
(export make-foo foo?)
(import (scheme base))
(define-record-type <foo>
(make-foo foo bar)
foo?
(foo foo-foo)
(bar foo-bar)))
(import (foo))
Originally from this issue [https://github.com/okuoku/yuni/issues/9]
Comments (2)
-
reporter -
reporter - changed status to resolved
Toplevel macro expansion in library now considers the result of expanded form (Fixes
#66) It always used compile time environment library however expanded form contains identifier and compiler should respect it to find global bindings.→ <<cset cd0af2f3a8d8>>
- Log in to comment
This is because of compiler. Compiler expands toplevel defined macro in library however it always uses a library of compile time environment even thought the target is identifier. When macro was expanded then it should use identifier library to lookup global variable.