[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More Guile 1.8 code failing in 2.x
From: |
Andy Wingo |
Subject: |
Re: More Guile 1.8 code failing in 2.x |
Date: |
Wed, 27 Feb 2013 16:13:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
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)))))
--
http://wingolog.org/
Re: More Guile 1.8 code failing in 2.x, Stefan Israelsson Tampe, 2013/02/27