chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: srfi-45 egg issue


From: Kon Lovett
Subject: [Chicken-users] Re: srfi-45 egg issue
Date: Thu, 27 Aug 2009 13:22:31 -0700


On Aug 11, 2009, at 11:36 AM, Derrell Piper wrote:

Hi,

I'm playing around with the srfi-45 egg in Chicken 4. The third test/benchmark from the SRFI is failing thusly:

Sorry about this; see Rel 2.2.0. Forgot that a lazy recursive promise could hold a R5RS promise.

Note that 'delay' is always the R5RS procedure & 'd-lay' (or 'delay- recursive') is the SRFI 45 version. This impl violates the SRFI since it doesn't redefine the original procedure. ('delay' is primitive syntax in Chicken 4 & not so easy to redefine. With Chicken 3, which doesn't have a module system, redefining would have blocked use of the R5RS 'delay'.)


csi> (use srfi-45)
; loading /usr/local/lib/chicken/4/srfi-45.import.so ...

Warning: re-importing already imported identifier: promise?

Warning: re-importing already imported identifier: force
; loading /usr/local/lib/chicken/4/srfi-45.so ...
csi> (define r (delay (begin (display 'hi) 1)))
csi> (define s (lazy r))
csi> (define t (lazy s))
csi> (recursive-promise? t)
#t
csi> (force t)

Error: (force) expected a recursive promise: (#<promise>)

        Call history:

        <syntax>          (force t)
        <eval>            (force t)       <--


Best Wishes,
Kon







reply via email to

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