[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
aren't hygienic macros supposed to be hygienic?
From: |
Marco Maggi |
Subject: |
aren't hygienic macros supposed to be hygienic? |
Date: |
Mon, 7 May 2007 20:57:37 +0200 |
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"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- aren't hygienic macros supposed to be hygienic?,
Marco Maggi <=