
#11973: Simplifier ticks exhausted with complex list literal. -------------------------------------+------------------------------------- Reporter: Lokathor | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Windows Architecture: | Type of failure: Compile-time Unknown/Multiple | crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- So I had a working version of a module that was too slow: https://github.com/Lokathor/ludolib/blob/6e69f87762c88d7909ca259ffe69141ea4b... and then I tried to rearrange things so that the checking could short- circuit a bit and run faster. I came up with this: https://gist.github.com/Lokathor/d1e4a8cd6268835a2403423fb180a71d#file- automatagencrashesghc-hs-L172 Which loads and runs just fine in GHCi, but then when I go to compile it into a binary for benchmarking I got the following: {{{ ghc.exe: panic! (the 'impossible' happened) (GHC version 7.10.3 for x86_64-unknown-mingw32): Simplifier ticks exhausted When trying UnfoldingDone a_siVC To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 294802 Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} Setting the factor up to 1k caused it to crash out with the same problem. Setting the factor up to 10k caused GHC to just eat up nearly all of my RAM (11GB) and then stall out until I killed it a few minutes later. I tried not using -O2 during compilation, but it had the same problem anyway. With some IRC help, it was suggested to add the `-fsimple-list- literals` flag, which makes things compile and run just fine (and with the speed gain that I'd hoped for). So things work now, for some definition of "work", though I was advised to report this bad behavior anyway. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11973 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler