Hi Chris,

On Sun 24 Jul 2011 07:06, "Chris K. Jester-Young" <[email protected]> writes:

> I've been playing around with Guile's implementation of SRFI 45 (which
> uses SRFI 9), and have noticed something interesting: if you run the
> following code in the REPL, printing out the value of the promise will
> cause a stack overflow:
>
>     (use-modules (srfi srfi-45))
>     (define promise (delay promise))
>     (force promise)
>
>     #<promise val: module/ice-9/format.scm:38:0: In procedure format:
>     module/ice-9/format.scm:38:0: Throw to key `vm-error' with args `(vm-run 
> "VM: Stack overflow" ())'.
>
> However, if I change the SRFI 45 code to use Guile's native records,
> it prints correctly:
>
>     #<promise val: #<value tag: eager proc: #-1#>>

Thanks for the report.  I was going to fix the printer, but instead I
just changed SRFI-9 records to be implemented in terms of boot-9
records.

There's still a bug here somewhere but I am going to ignore it for now
:)

Andy
-- 
http://wingolog.org/

Reply via email to