[Top][All Lists]

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

Re: Closure, syntax and load ...

From: Manuel Giraud
Subject: Re: Closure, syntax and load ...
Date: 30 Aug 2001 15:48:54 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Miroslav Silovic <address@hidden> writes:

> It's obvious that foo is defined within let and isn't visible outside
> foo.scm (or, for that matter, outside let itself). You might want to
> do this:
> (use-syntax (ice-9 syncase))
> (define f 0)
> (define-syntax foo
>   (lambda (x)
>     (syntax-case x ()
>                ((_ a)
>                 (syntax (square a))))))
> (let ()
>   (define square
>     (lambda (x)
>       (* x x)))
>   (set! f (foo 6)))

Yes, maybe that can help. But that was not the point (I think). I know
that the syntax foo is not visible outside the let but it is not
problem since 'f' already used it an is visible outside : that's what
I want.

The thing that puzzles me is that if I replace the define-syntax in
the let by a load of a file that contains exactly the same syntax
definition it doesn't work no more : guile 1.4 says me that square is

Jake:"See those berries? That's our breakfast! See that stream? That's
our drinking water!"
Daria:"See that skeleton? That's our future." 
-From "The Teachings Of Don Jake." 

_Manuel Giraud_

reply via email to

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