With -O1 and above causes ghc to use all available memory before being killed by OOM killer
I've just taken over an existing haskell package and in the process of getting it to work with ghc 8.0 discovered that when compiling one file ghc tires to use all my ram. It basically ends up using 40% of 16 Gig before being killed by the OOM (out-of-memory) killer.
The project is at: https://github.com/erikd/conduit-find.git
The problem can be reproduced by:
git clone https://github.com/erikd/conduit-find.git cd conduit-find git checkout test/ghc-8.0 cabal sandbox init cabal install --dependencies-only cabal build
which on two of my machines fails building the
This is regression, because this code compiles fine with ghc-7.10.3 and ghc-7.8.4.