[Haskell-cafe] STM, newArray, and a stack overflow?

Ketil Malde ketil at malde.org
Wed Mar 23 13:35:29 CET 2011


I'm seeing some weirdness here.  My code does this:

    omap <- atomically $ (newArray_ (0,n-1) :: STM (TArray Int Int))

This gives a stack overflow when n is one million.  The equivalent code
in the ST monad doesn't show this behavior, and works as expected.

I'm not sure what is going on here, so I thought I'd ask in case anybody
can put me on the right track.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list