chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] hart and syntax-case won't play nice. :(


From: John Cowan
Subject: Re: [Chicken-users] hart and syntax-case won't play nice. :(
Date: Sat, 15 Mar 2008 19:07:47 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Felix Winkelmann scripsit:

> Actually not quite. Low-level macros are still seen, as the low-level
> expander is used by default - high-level expanders just pre-expand
> all macros usually.

Well, it's true that define-macro definitions made after you (use syntax-case)
expander are correctly processed, but older ones seem to be hidden:

CHICKEN
(c)2008 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 3.0.6 - linux-unix-gnu-x86      [ manyargs dload ptables applyhook ]
SVN rev. 9408   compiled 2008-03-11 on skunk (Linux)

#;1> (define-macro (foo) 32)
#;2> (foo)
32
#;3> (use syntax-case)
; loading /usr/local/lib/chicken/3/syntax-case.so ...
; loading /usr/local/lib/chicken/3/syntax-case-chicken-macros.scm ...
#;4> (foo)
Error: unbound variable: foo

        Call history:

        <syntax>                (foo)
        <eval>          (foo)   <--
#;4> (define-macro (bar) 45)
#;5> (bar)
45
#;6>

However, this is not true of syntactic-closures, alexpander, or
riaxpander.  Those cope with both previously-defined and newly defined
low-level macros.

-- 
John Cowan  address@hidden  http://ccil.org/~cowan
If I have not seen as far as others, it is because giants were standing
on my shoulders.
        --Hal Abelson




reply via email to

[Prev in Thread] Current Thread [Next in Thread]