* aren't hygienic macros supposed to be hygienic?
@ 2007-05-07 18:57 Marco Maggi
0 siblings, 0 replies; only message in thread
From: Marco Maggi @ 2007-05-07 18:57 UTC (permalink / raw)
To: guile-user
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
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-07 18:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07 18:57 aren't hygienic macros supposed to be hygienic? Marco Maggi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).