identifier-syntax second case broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Released
|
High
|
Abdulaziz Ghuloum | ||
r6rs-libraries |
New
|
Undecided
|
Unassigned |
Bug Description
Ikarus Scheme version 0.0.2patched+ (revision 1237, build 2007-12-13)
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> (define p (cons 4 5))
> (define-syntax p.car (identifier-syntax (_ (car p)) ((set! _ e) (set-car! p e))))
> p.car
4
> (set! p.car 15)
Unhandled exception
Condition components:
1. &error
2. &who: expander
3. &message: "cannot modify binding in"
4. &irritants: ((set! p.car 15))
This follows too when trying to redefine the symbol.
> (define-syntax p.car (identifier-syntax (_ (car p)) ((set! _ e) (set-car! p e))))
Unhandled exception
Condition components:
1. &error
2. &who: expander
3. &message: "cannot modify binding in"
4. &irritants: ((define-syntax p.car (identifier-syntax (_ (car p)) ((set! _ e) (set-car! p e)))))
Changed in ikarus: | |
status: | Fix Committed → Fix Released |
Fixed the identifier-syntax issue in revision 1241. Keeping this open until I resolve the second issue "cannot redefine macros".
Ikarus Scheme version 0.0.2patched+ (revision 1241, build 2007-12-14)
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> (define p (cons 4 5))
> (define-syntax p.car (identifier-syntax (_ (car p)) ((set! _ e) (set-car! p e))))
> p.car
4
> (set! p.car 15)
> p.car
15