[Haskell-cafe] STM, newArray, and a stack overflow?
ketil at malde.org
Wed Mar 23 16:34:59 CET 2011
Bas van Dijk <v.dijk.bas at gmail.com> writes:
Thanks to you and Felipe for trying this out.
>> omap <- atomically $ (newArray_ (0,n-1) :: STM (TArray Int Int))
> I can't reproduce this with ghci-7.0.2 (base-184.108.40.206, array-0.3.0.2
> and stm-220.127.116.11).
It works (calling the same function) from GHCi, but breaks when
compiled. Also when compiling with -O0.
I'm probably doing something wrong, but I can't for the life of me work
out what it might be. I've surrounded the offending newArray with print
statements, so I can't see how it could be something else.
> What version of ghc/ghci are you using?
Happens with GHC 6.12.1 and 7.0.2.
6.12.1, array-0.3.0.0, stm-18.104.22.168
7.0.2, array-0.3.0.2, stm-22.214.171.124
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe