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