[Top][All Lists]

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

Re: How to create hygienic environments?

From: Neil Jerram
Subject: Re: How to create hygienic environments?
Date: Sat, 20 Jun 2015 13:54:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Michael Tiedtke <address@hidden> writes:

> Just to quote myself:
>> The (null-environment 5) gives me an empty environment but how
> should I insert the editor commands? 
> Just think of these editor commands as regular Scheme definitions.

I think you're looking for 'module-define!':

scheme@(guile-user)> (define n (null-environment 5))
scheme@(guile-user)> (eval 'car n)
ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: car

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(#{ g3900}#) [1]> ,q
scheme@(guile-user)> (eval 'car (current-module))
$2 = #<procedure car (_)>
scheme@(guile-user)> (module-define! n 'car car)
scheme@(guile-user)> (eval 'car n)
$3 = #<procedure car (_)>

Hope that helps!


reply via email to

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