[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #27042] Bad interaction between syntax-rules and call-wi
From: |
Helmut Eller |
Subject: |
[Bug-kawa] [bug #27042] Bad interaction between syntax-rules and call-with-values |
Date: |
Thu, 16 Jul 2009 17:53:10 +0000 |
User-agent: |
Opera/9.64 (X11; Linux i686; U; en) Presto/2.1.1 |
URL:
<http://savannah.gnu.org/bugs/?27042>
Summary: Bad interaction between syntax-rules and
call-with-values
Project: Kawa
Submitted by: ellerh
Submitted on: Thu 16 Jul 2009 05:53:09 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This example
(let-syntax ((dlet
(syntax-rules ()
((dlet (var val) body)
(let ((saved var))
(set! var val)
(call-with-values (lambda () body)
(lambda (result)
(set! var saved)
result)))))))
(let ((x 0))
(list x
(dlet (x (+ x 10))
x)
x)))
should return (0 10 0) but returns (0 10 10).
The intention of dlet is to temporarily rebind the variable.
Sorry, couldn't come up with a simpler expression.
If it helps: referencing var inside the second lambda, e.g. with
something like (set! var var), works around the problem.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27042>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-kawa] [bug #27042] Bad interaction between syntax-rules and call-with-values,
Helmut Eller <=