[Haskell-cafe] stack overflow when using ST monad