[gambit-list] .gambcini vs included files

lowly coder lowlycoder at huoyanjinjing.com
Fri Aug 14 16:37:57 EDT 2009


~/test:$ cat ../.gambcini
(define-macro (bar#fun2 foo)
  ''(yay))

(pp 'loaded-gambcini)
~/test:$ cat test.scm
(define-macro (bar#fun x)
  (if (equal? x cons) 1 2))

(##namespace ("foo#"))
(##namespace ("" pp load))
(pp (bar#fun '+))
(load "t1.scm")
~/test:$ cat t1.scm
(pp (bar#fun2 '-))
(pp (bar#fun '-))

~/test:$ gsi test.scm
loaded-gambcini
2
(yay)
*** ERROR IN "t1.scm"@2.6 -- Unbound variable: bar#fun
~/test:$


Here's what confuses me -- the macro defined in ~/.gambcini is
accessible, but the one in test.scm is not. What 'environment' are the
functions/macros in ~/.gambcini defined in? [And how can I at run time
throw stuff in there].

Thanks!



More information about the Gambit-list mailing list