This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Quick syncase/syntax-rules question.



I'm a little confused about define-syntax and syntax-rules as
implemented by syntax-rules.  If I say

  ;; file a
  (define-module (x a))
  (defmacro baz () 21)
  (export-syntax baz)

  ;; file b
  (define-module (x b))
  (define-syntax foobar
    (syntax-rules ()
      ((foobar) (baz)))
  (export-syntax foobar)

and then from the guile top-level I say (use-modules (x b)) and try to
evaluate (foobar), I get an error because baz is not defined at the
top level.  This seems to indicate that foobar isn't recursively
expanding baz at macroexpansion time.  Why not?

Thanks

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]