syntax tracing not working by default when syntax-case fenders fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
Medium
|
Abdulaziz Ghuloum |
Bug Description
Ikarus Scheme version 0.0.3+ (revision 1430, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum
> (define-syntax use-me
(lambda (stx)
(syntax-case stx ()
[(_ x) (identifier? #'x) #'(define x 'OK)])))
> (define-syntax use-it
(syntax-rules ()
[(_ x) (use-me x)]))
> (use-it 123)
Unhandled exception
Condition components:
1. &message: "invalid syntax"
2. &syntax:
form: (use-me 123)
subform: #f
>
> ;;; Above exception should show syntax trace, like below
>
> (define-syntax use-me2
(lambda (stx)
(syntax-case stx ()
[(_ x)
(or (identifier? #'x) (syntax-violation #f "invalid syntax" stx))
#'(define x 'OK)])))
> (define-syntax use-it2
(syntax-rules () [(_ x) (use-me2 x)]))
> (use-it2 123)
Unhandled exception
Condition components:
1. &who: use-me2
2. &message: "invalid syntax"
3. &syntax:
form: (use-me2 123)
subform: #f
4. &trace: #<syntax (use-me2 123)>
5. &trace: #<syntax (use-it2 123)>
>
Changed in ikarus: | |
milestone: | none → 0.0.4 |
Fixed in 1432. Thanks. :-)
> (define-syntax use-me
(lambda (stx)
(syntax-case stx ()
[(_ x) (identifier? #'x) #'(define x 'OK)])))
> (define-syntax use-it
(syntax-rules ()
[(_ x) (use-me x)]))
> (use-it 123)
Unhandled exception
Condition components:
1. &message: "invalid syntax"
2. &syntax:
form: (use-me 123)
subform: #f
3. &trace: #<syntax (use-me 123)>
4. &trace: #<syntax (use-it 123)>