[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] unquote in environments
From: |
John Cowan |
Subject: |
Re: [Chicken-users] unquote in environments |
Date: |
Thu, 6 Dec 2007 09:24:37 -0500 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Daishi Kato scripsit:
> Is this an expected behavior? --daishi
>
> CHICKEN
> Version 2.732 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook
> cross ]
> (c)2000-2007 Felix L. Winkelmann compiled 2007-12-04 on spirits (Linux)
>
> #;1> (use environments)
> ; loading /usr/local/chicken-2.732/lib/chicken/3/environments.so ...
> #;2> (define env (make-environment))
> #;3> (eval '(let ((x 2)) `(1 2 ,x)) env)
> Error: unbound variable: ##sys#list
Sure. If you create an empty environment and then invoke macros that
generate calls to functions not in that environment, errors are exactly
what you should expect. In this case, the macro "quasiquote" generates
calls to the function "##sys#list":
#;6> (macroexpand '`(1 2 ,x))
(##sys#list (quote 1) (quote 2) x)
--
Don't be so humble. You're not that great. John Cowan
--Golda Meir address@hidden