Fix stackoverflow in the newArray methods of a TArray The following caused a stackoverflow: atomically $ (newArray_ (0,1000000) :: STM (TArray Int Int)) This happened because newArray_ was defined using replicateM which is defined using sequence which uses a right fold which pushes the result of the monadic computation on the stack then continues with the rest until the stack overflows.
Fix stackoverflow in the newArray methods of a TArray
The following caused a stackoverflow:
atomically $ (newArray_ (0,1000000) :: STM (TArray Int Int))
This happened because newArray_ was defined using replicateM
which is defined using sequence which uses a right fold
which pushes the result of the monadic computation on the stack
then continues with the rest until the stack overflows.

gridaphobe/packages-stm