
Dear ghc-devs, We are working on a library and came across quite high memory consumption when compiling some code (generated by TH). This memory issue seems to come from the exhaustiveness checker as we found in: https://ghc.haskell.org/trac/ghc/ticket/11163 https://ghc.haskell.org/trac/ghc/ticket/11195 We came up with a "minimal" example that at least is self contained and triggers the problem; `runghc Minimal.hs` should finish with about 5GB of RAM. Our actual non-minimal scenario runs out of memory on a 16GB RAM machine. We tried with ghc 8.4.2, 8.0.2 and 7.10.3 and ghc-HEAD; all of those showed a similar problem, although the older ghc's used less memory. Do you have any suggestions to make our code finish compiling without running out of memory? Thanks!! Victor