[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SRFI 9's default printer doesn't handle cyclic data structures
From: |
Andy Wingo |
Subject: |
Re: SRFI 9's default printer doesn't handle cyclic data structures |
Date: |
Wed, 17 Aug 2011 10:49:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Hi Chris,
On Sun 24 Jul 2011 07:06, "Chris K. Jester-Young" <address@hidden> 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/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: SRFI 9's default printer doesn't handle cyclic data structures,
Andy Wingo <=