[GHC] #10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB

GHC ghc-devs at haskell.org
Sat Feb 21 05:35:20 UTC 2015


#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB
-------------------------------------+-------------------------------------
              Reporter:              |             Owner:
  dramforever                        |            Status:  new
                  Type:  bug         |         Milestone:
              Priority:  normal      |           Version:  7.10.1-rc2
             Component:  Compiler    |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  None/Unknown
          Architecture:              |        Blocked By:
  Unknown/Multiple                   |   Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 The following code causes a panic. It's the Y combinator.

 {{{#!hs
 module Y where

 newtype F a = F { unF :: F a -> a }

 y :: (a -> a) -> a
 y = \f -> (\x -> x (F x)) (\x -> f (unF x x))
 }}}

 {{{
 bash$ ~/src/ghc-7.10.0.20150123/installed/bin/ghc -c Y.hs
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.0.20150123 for x86_64-unknown-linux):
         Simplifier ticks exhausted
   When trying UnfoldingDone x_alB
   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: 4722

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 }}}

 However it works fine in GHCi

 {{{
 bash$ ~/src/ghc-7.10.0.20150123/installed/bin/ghci Y.hs
 GHCi, version 7.10.0.20150123: http://www.haskell.org/ghc/  :? for help
 [1 of 1] Compiling Y                ( Y.hs, interpreted )
 Ok, modules loaded: Y.
 *Y> take 10 (y (1:))
 [1,1,1,1,1,1,1,1,1,1]
 }}}


 I have tried this code with 7.6.3, 7.8.3 and 7.10.1-rc2. Same result.

 At least in 7.10.1-rc2 it doesn't work even with -fsimpl-tick-
 factor=100000 (that's 10^5^)

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


More information about the ghc-tickets mailing list