chicken-users
[Top][All Lists]
Advanced

[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 10:56:19 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

Daishi Kato scripsit:

> How do I expand the quasiquote macro in the environment?

The trouble is that in Chicken all environments share the same macros,
so you are stuck with the definition of quasiquote unless you override it
globally with a version that doesn't invoke ##sys#list or ##sys#cons.

> I don't want to extend the environment to have ##sys#list.
> Maybe, extending macroexpand?

That doesn't help much; it's not the macroexpansion that's at issue,
it's the eval that's done after calling macroexpand.  That eval
uses the current (dynamic) environment.

BTW, Felix, the claim on the wiki that the interaction environment
can't be extended appears to be false:

address@hidden:~/mpron$ csi

CHICKEN
Version 2.736 - linux-unix-gnu-x86      [ manyargs dload ptables applyhook ]
(c)2000-2007 Felix L. Winkelmann        compiled 2007-10-21 on skunk (Linux)

#;1> (use environments)
; loading /usr/local/lib/chicken/3/environments.so ...
#;2> foo
Error: unbound variable: foo
#;2> (environment-extend! (interaction-environment) 'foo 32)
#;3> foo
32

-- 
You let them out again, Old Man Willow!                 John Cowan
What you be a-thinking of?  You should not be waking!   address@hidden
Eat earth!  Dig deep!  Drink water!  Go to sleep!
Bombadil is talking.                                    http://ccil.org/~cowan




reply via email to

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