﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1295	module-environment use with macros	Caolan McMahon		"Given the following module example.scm:

{{{
(module example *

(import chicken scheme)

(define (add a b) (+ a b))

(define-syntax double
  (syntax-rules ()
    ((_ x) (add x x))))

)
}}}

Then, using it as an eval environment:

{{{
(load ""./example.scm"")
(import example)

(print (eval '(double 10) (module-environment 'example)))
}}}

I get:

{{{
Error: unbound variable: add43
}}}

Using the macro directly it appears to work:

{{{
(load ""./example.scm"")
(import example)

(print (double 10))
}}}

It now prints 20, as expected.

Is this a problem with module-environment, or am I using it incorrectly?"	defect	closed	major	5.4	core libraries	4.11.0	fixed			hard
