I believe this bug is the weak ptr bug I fixed last week.  In any case, the
example works with the latest sources (and I verified that it indeed crashes
under ghc-4.06).

> The story (not part of the bug report).
> 
> I've made most of a Haskell<->Perl interface for fun. Closures
> are convertible in both directions, Perl values can be created and
> examined from the Haskell side, abstract values from each language
> can be manipulated in the other one, objects not having cycles across
> languages are garbage collected. Unfortunately the first non-trivial
> example, a Haskell sorting function of values of arbitrary type,
> implemented using Perl's sort builtin, crashes when the sorted list
> is big enough for the garbage collection to occur. I could not find
> my error nor prove that ghc produces wrong code.
> 
> I temporarily gave up and made most of a Haskell<->OCaml interface
> instead. Closures are convertible in both directions, OCaml values
> can be created and examined from the Haskell side, abstract values
> from each language can be manipulated in the other one, objects not
> having cycles across languages are garbage collected. Unfortunately
> the first non-trivial example, a Haskell sorting function of values
> of arbitrary type, implemented using OCaml's Sort.array function,
> crashes when the sorted list is big enough...
> 
> Arrgh! Fortunately I succeeded in extracting a simple Haskell code
> that demonstrates the crash.

way cool.  I'm looking forward to playing with this!

Cheers,
        Simon

Reply via email to