Expander tries to take the car of some #{thingamabob ...}
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
High
|
Abdulaziz Ghuloum |
Bug Description
I want to learn more about how syntax-case etc works, so I'm reading Waddell and Dybvig's paper "Extending the Scope of Syntactic Abstraction". There's an example in section 5.2 that I thought wouldn't work in R6RS, so I modified it a little and here's what happened:
Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1834, build 2009-08-01)
Copyright (c) 2006-2009 Abdulaziz Ghuloum
> (library (M)
(export a b)
(import (rnrs))
(define-syntax a
(syntax-rules ()
[(_ e0 e1 ...) (e0 (quote c) e1 ... )]))
(define b (lambda () c))
(define c 3)
(lambda () (set! c 5))) ;make Ikarus believe c is mutable
> (import (M))
> (let ()
(define-syntax f
(syntax-rules ()
[(_ (any id)) id]
[(_ (any id) value) (set! id value)]))
(let ([original (a f)])
(a f 4)
(list original (b)))) ; (3 4)
Unhandled exception
Condition components:
1. &assertion
2. &who: car
3. &message: "argument does not have required pair structure"
4. &irritants: (#{c |&qTay!
>
I'm still pretty sure this isn't supposed to work, but the exception raised indicates a bug in the expander, rather than in the code above.
Btw, it works without error in Ypsilon. :)
Related branches
Changed in ikarus: | |
status: | New → Fix Committed |
importance: | Undecided → High |
assignee: | nobody → Abdulaziz Ghuloum (aghuloum) |
On Aug 1, 2009, at 8:41 PM, Göran Weinholt wrote:
> Btw, it works without error in Ypsilon. :)
I'm not sure what you mean by "it works", but I fixed the crash in
revision 1835.
Aziz,,,
** Affects: ikarus
Status: Fix Committed