Incorrect syntax errors for define
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Released
|
Low
|
Abdulaziz Ghuloum |
Bug Description
The 3rd and 4th expressions' syntax errors are incorrect. The 2nd could be as good as the 1st lambda one.
Ikarus Scheme version 0.0.2patched+ (revision 1366, build 2008-01-24)
Copyright (c) 2006-2008 Abdulaziz Ghuloum
> (lambda (a [oops 123] b) (values))
Unhandled exception
Condition components:
1. &who: lambda
2. &message: "not an identifier"
3. &syntax:
form: (lambda (a (oops 123) b) (values))
subform: (oops 123)
>
> (define ([oops 123]) (values))
Unhandled exception
Condition components:
1. &who: define
2. &message: "invalid syntax"
3. &syntax:
form: (define ((oops 123)) (values))
subform: #f
>
> (define (f [oops 123]) (values))
Unhandled exception
Condition components:
1. &message: "not an identifier"
2. &syntax:
form: ((oops 123))
subform: (oops 123)
>
> (define (f a [oops 123]) (values))
Unhandled exception
Condition components:
1. &who: a
2. &message: "not an identifier"
3. &syntax:
form: (a (oops 123))
subform: (oops 123)
>
Changed in ikarus: | |
status: | Fix Committed → Fix Released |
Here's what I have now:
;;; this one is ok
> (lambda (a [oops 123] b) (values))
Unhandled exception
Condition components:
1. &who: lambda
2. &message: "not an identifier"
3. &syntax:
form: (lambda (a (oops 123) b) (values))
subform: (oops 123)
;;; I don't know what you mean by "could be as good as the 1st". this looks correct to me.
> (define ([oops 123]) (values))
Unhandled exception
Condition components:
1. &who: define
2. &message: "invalid syntax"
3. &syntax:
form: (define ((oops 123)) (values))
subform: #f
;;; this one now lists the whole expression with the subform.
> (define (f [oops 123]) (values))
Unhandled exception
Condition components:
1. &who: define
2. &message: "not an identifier"
3. &syntax:
form: (define (f (oops 123)) (values))
subform: (oops 123)
;;; and so is this one
> (define (f a [oops 123]) (values))
Unhandled exception
Condition components:
1. &who: define
2. &message: "not an identifier"
3. &syntax:
form: (define (f a (oops 123)) (values))
subform: (oops 123)
> ^D