chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] Fwd: values in call/cc


From: Mario Domenech Goulart
Subject: [Chicken-janitors] Fwd: values in call/cc
Date: Fri, 21 Aug 2009 07:41:37 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

--- Begin Message --- Subject: Fwd: values in call/cc Date: Thu, 20 Aug 2009 17:09:39 -0700
Hi,

Your main page says Bug reports should be directed to 'address@hidden' but that won me this bounce.

Then I tried chicken-bug and that won me this:

% chicken-bug test.bug

connecting to mx10.gnu.org, try #1 ... failed.
connecting to mx10.gnu.org, try #2 ... failed.
connecting to mx10.gnu.org, try #3 ... failed.

I'm not sure where to go from here...

Thanks,

Derrell

Begin forwarded message:

Date: August 20, 2009 4:39:12 PM PDT
Subject: values in call/cc

You are not allowed to post to this mailing list, and your message has
been automatically rejected.  If you think that your messages are
being rejected in error, contact the mailing list owner at
address@hidden.


From: Derrell Piper <address@hidden>
Date: August 20, 2009 4:38:58 PM PDT
Subject: values in call/cc


The following code:

(define (test)
 (let ((foo (make-string 32)))
(call/cc
(lambda (return)
  (return (values foo #t))))))

(define (test2)
 (call-with-values (lambda () (test))
(lambda (a b)
 #t)))

...works fine in Gambit 4.5.1 and MIT Scheme (20090107), but fails in Chicken 4.1.1.  The second value doesn't seem to be making it out of (test).

% csi -n

CHICKEN
(c)2008-2009 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.1.1 - SVN rev. 15370
macosx-unix-gnu-x86 [ manyargs dload ptables applyhook ]
compiled 2009-08-08 on fluffy.local (Darwin)

#;1> (load "test")
; loading test.scm ...
#;2> (test)
"                                "
#;3> (test2)

Error: bad argument count - received 1 but expected 2: #<procedure (? a b)>

Call history:

<syntax> (test2)
<eval> (test2)
<eval> [test2] (call-with-values (lambda () (test)) (lambda (a b) #t))
<eval> [test2] (test)
<eval> [test] (make-string 32)
<eval> [test] (call/cc (lambda (return) (return (values foo #t))))
<eval> [test] (return (values foo #t))
<eval> [test] (values foo #t) <--

% gsi
Gambit v4.5.1

> (load "test")
"/Users/ddp/src/scm/test.scm"
> (test)
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
#t
> (test2)
#t
>
*** EOF again to exit
% scheme
MIT/GNU Scheme running under MacOSX
Type `^C' (control-C) followed by `H' to obtain information about interrupts.

Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   2006, 2007, 2008 Massachusetts Institute of Technology
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Wednesday January 7, 2009 at 4:53:23 PM
 Release 7.7.90.+ || Microcode 15.1 || Runtime 15.7 || SF 4.41 || LIAR/i386 4.118 || Edwin 3.116

1 ]=> (load "test")

;Loading "test.scm"... done
;Value: test2

1 ]=> (define call/cc call-with-current-continuation)

;Value: call/cc

1 ]=> (test)

;Value 11: #[compiled-closure 11 ("global" #x38) #x5e #x2b198e #xcfbdf4]

1 ]=> (test2)

;Value: #t

1 ]=> ^D
End of input stream reached.
Happy Happy Joy Joy.







--- End Message ---

reply via email to

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