[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-18.104.22.168, array-0.3.0.2
> and stm-22.214.171.124).
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-126.96.36.199
7.0.2, array-0.3.0.2, stm-188.8.131.52
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe