attempt at fixing the stack size in Haskell