[Top][All Lists]

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

[Chicken-janitors] #1295: module-environment use with macros

From: Chicken Trac
Subject: [Chicken-janitors] #1295: module-environment use with macros
Date: Tue, 07 Jun 2016 10:21:24 -0000

#1295: module-environment use with macros
 Reporter:  caolan          |      Owner:
     Type:  defect          |     Status:  new
 Priority:  major           |  Milestone:  someday
Component:  core libraries  |    Version:  4.11.0
 Keywords:                  |
 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?

Ticket URL: <>
CHICKEN Scheme <>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

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