[gambit-list] Somehow missing force call
Jason Felice
jason.m.felice at gmail.com
Tue Apr 30 20:36:21 EDT 2013
I haven't been able to separate the code from my repo and make it still
break, but I found what I imagine is an inlining bug when
--enable-auto-force is enabled.
My repo: https://github.com/maitria/scheme-stuff.git
$ make
$ gsi
> (load "scheme-stuff.o1")
> (for-each pp (delay (cons 1 (delay (cons 2 '())))))
1 2>
Change lib/iteration.scm:14 and replace end-position? with null? and repeat:
> (for-each pp (delay (cons 1 (delay (cons 2 '())))))
*** ERROR IN iteration#for-each -- (Argument 1) PAIR expected
(car '())
1>
The definition of end-position? is:
(define end-position? null?)
Adding an extraneous force call -- (loop (force (cdr position))) -- will
prevent the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130430/4e71905e/attachment.htm>
More information about the Gambit-list
mailing list