Hi!

I have following problem which looks like a bug:
syntax-violation thrown from eval has invalid syntax inside (contains
symbol).
For details please look in following code.

The same problem appears when passing invalid code to eval directly
(via first parameter).
However in this situation it is unclear what should happen since eval
accepts raw datum,
not syntax object. In other words it is not possible to build syntax-
violation
condition with valid form inside.

Can anybody confirm if it is bug? Thanks ahead.

--
Bogdan

;; Main module
#!r6rs
(import (rnrs) (rnrs eval))

(define e (guard (e [else e])
                 (eval #t (environment '(rnrs)
                                       '(sample syntax-violation-
test)))))
(assert (syntax-violation? e))
(let ([form (syntax-violation-form e)])
  (assert (not (equal? form '(guard))))) ; ERROR: syntax contains
symbol

;; Library with syntax problem
#!r6rs

(library (sample syntax-violation-test)
  (export)
  (import (rnrs))

  (guard)
  )

Reply via email to