[Top][All Lists]

[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/


I am finding that using guile 1.8 and the latest slib causes
some syntactic forms to be rejected:

        % guile
        guile> (version)
        guile> (define fourth
          (let ()
            (define (square y) (* y y))
            (lambda (x) (square (square x)))))
        guile> (fourth 3)
        guile> (load "/usr/share/guile/1.8/slib/guile.init")
        guile> *slib-version*
        guile> (define fourth
          (let ()
            (define (square y) (* y y))
            (lambda (x) (square (square x)))))

        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
           (lambda (exp env)
             (cons (if (= 1 (length env)) 'define-public 'base:define) (cdr 

Any ideas?

reply via email to

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