Re: [Chicken-users] macro and module question from newbie.

2015-03-05 Thread Evan Hanson
Hi,

You must indicate that `m` should be visible within the expansion of
`bar`, using the following export format:

(module foo ((bar m)) ...)

Otherwise, everything looks fine.

See the IDENTIFIER syntax under
http://wiki.call-cc.org/man/4/Modules#module for more information.

Cheers,

Evan

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] macro and module question from newbie.

2015-03-05 Thread Park SungMin
hello, I'm chicken/scheme newbie.
I'm long time use CommonLisp. but I feel difference with scheme.
I writing first test program.
but

(module foo (bar)
  (import chicken scheme)
  (define m 10)
  (define-syntax bar
  (ir-macro-transformer
  (lambda (expr a b)
  `(+ m ,@(cdr expr))

(import foo)
(bar (+ 10 20))

I got Error: unbound variable: m

I want result 40. If export with 'm' ..it works.
but I'm not want export variable 'm'.

plz help me!  


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users