[GHC] #14338: Simplifier fails with "Simplifier ticks exhausted"

GHC ghc-devs at haskell.org
Mon Oct 30 04:17:03 UTC 2017


#14338: Simplifier fails with "Simplifier ticks exhausted"
-------------------------------------+-------------------------------------
        Reporter:  dredozubov        |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 So this is an interesting case. The module that blows up is quite small;
 it seems that the blowing up code all comes from unfoldings introduced
 via,
 {{{#!hs
 mainH :: HReader AppPayload Int :<|> HReader AppPayload Int
 mainH = handleReaderRequest' :<|> handleReaderRequest
 }}}
 where `AppPayload` is a type-level list. The number of coercions in the
 desugared core seems to scale quadratically with the length of this list,
 ||= Phase         =||= N=1  =||= N=2 =||= N=3 =||= N=4 =||= N=5 =||
 || Desugar (terms) || 74     || 87    || 100   || 113   || 126   ||
 || Desugar (types) || 350    || 502   || 694   || 926   || 1198  ||
 || Desugar (coerc) || 395    || 746   || 1238  || 1895  || 2741  ||

 Yet in all of these cases somehow Core Tidy brings all of these programs
 down to precisely 67 terms and a couple hundred types/coercions.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14338#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list