[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
slib's define
From: |
Dan Gildea |
Subject: |
slib's define |
Date: |
Sat, 21 Apr 2007 07:38:46 -0400 |
User-agent: |
Mutt/1.4.2.1i |
Hi,
I am finding that using guile 1.8 and the latest slib causes
some syntactic forms to be rejected:
% guile
guile> (version)
"1.8.1"
guile> (define fourth
(let ()
(define (square y) (* y y))
(lambda (x) (square (square x)))))
guile> (fourth 3)
81
guile> (load "/usr/share/guile/1.8/slib/guile.init")
guile> *slib-version*
"3a4"
guile> (define fourth
(let ()
(define (square y) (* y y))
(lambda (x) (square (square x)))))
Backtrace:
In standard input:
9: 0* (define fourth (let () (define (square y) (* y y)) (lambda (x)
(square #))))
9: 1 (define-public fourth (let () (define (square y) (* y y)) ...))
9: 2 (begin (define-private fourth (let* () # #)) (eval-case (# #)))
In unknown file:
?: 3* (define-private fourth (let* () (define (square y) (* y y))
...))
In standard input:
10: 4* (let* () (define (square y) (* y y)) (lambda (x) (square
(square x))))
standard input:10:3: In procedure memoization in expression (let* ()
(define # #) ...):
standard input:10:3: In file "standard input", line 10: Mixed
definitions and expressions in (define (square y) (* y y)).
ABORT: (syntax-error)
This works with guile 1.6.4 and slib 3a4, and it also works if I comment
out the following in slib/guile.init:
(define define
(procedure->memoizing-macro
(lambda (exp env)
(cons (if (= 1 (length env)) 'define-public 'base:define) (cdr
exp)))))
Any ideas?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- slib's define,
Dan Gildea <=