Ciao,
I make the module:
;; syntaxes.scm --
(define-module (syntaxes)
#:use-syntax (ice-9 syncase)
#:export (when))
(define-syntax when
(syntax-rules ()
((_ e0 e1 ...)
(if e0 (begin e1 ...)))))
;;; end of file
and then the file:
;; syntax-test.scm --
(define-module (this)
#:use-module (syntaxes))
(let ((if (lambda (. args)
(scm-error 'wrong 'there "bad binding" #f #f))))
(when #t
(display 'true)(newline)))
;;; end of file
evaluating I get this output:
true
Backtrace:
In unknown file:
?: 0* (let* ((if (lambda args #))) (if #t (begin (display
#) (newline))))
?: 1 (when #t (display (quote true)) (newline))
...
?: 2 [scm-error wrong there "bad binding" #f #f]
<unnamed port>: In procedure there in expression (scm-error
(quote wrong) (quote there) ...):
<unnamed port>: bad binding
why?
--
Marco Maggi
"They say jump!, you say how high?"
Rage Against the Machine - "Bullet in the Head"
_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user