[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] verify syntax in => cond clauses
From: |
Evan Hanson |
Subject: |
[Chicken-hackers] [PATCH] verify syntax in => cond clauses |
Date: |
Sun, 26 May 2013 22:02:42 -0700 |
User-agent: |
OpenSMTPD enqueuer (Demoosh) |
This patch improves cond's behavior on clauses which contain `=>` but do
not match the precise definition of cond.
CHICKEN's current behavior is as follows:
#;> (cond (#t =>))
Error: (caddr) during expansion of (cond ...) - bad argument type: ()
...
I believe this behavior is incorrect, and should instead be, for
example:
#;> (cond (#t =>))
Error: unbound variable: =>
...
#;> (define => 1)
#;> (cond (#t =>))
1
#;> (cond (#t => 2 3))
3
The attached patch simply verifies the length of cond clauses containing
arrows in order to handle cases such as these.
Evan
0001-verify-syntax-in-cond-clauses.patch
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-hackers] [PATCH] verify syntax in => cond clauses,
Evan Hanson <=