guile-user
[Top][All Lists]
Advanced

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

Re: More Guile 1.8 code failing in 2.x


From: Richard Shann
Subject: Re: More Guile 1.8 code failing in 2.x
Date: Wed, 27 Feb 2013 17:59:01 +0000

On Wed, 2013-02-27 at 16:13 +0100, Andy Wingo wrote:
> On Wed 27 Feb 2013 16:08, Andy Wingo <address@hidden> writes:
> 
> > Here is a Guile 2-compatible version:
> >
> >   (cond-expand
> >    (guile-2) ; nothing
> >    (else ; guile < 2.0
> >     (define-macro (define-once sym exp)
> >       `(define ,sym (if (module-locally-bound? ',sym) ,sym ,val)))))
> 
> Sorry, thinko+typo.  Should be:
> 
>   (cond-expand
>    (guile-2) ; nothing
>    (else ; guile < 2.0
>     (define-macro (define-once sym exp)
>       `(define ,sym
>          (if (module-locally-bound? (current-module) ',sym)
>              ,sym
>              ,exp)))))
> 

This works a treat (well, of course I didn't actually get to test on
guile 2.0 myself, but I will doubtless hear about it if it should fail
there :)

Thank you all who responded.

Richard





reply via email to

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