Try to increase the stack size
./main +RTS -M50 -RTS
main: Most RTS options are disabled. Link with -rtsopts to enable
them.
ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.0.3
Does anybody have this problem on Mac OS X?
Compile with
ghc -O -rtsopts --make main.hs