Skip to content

Simplifier ticks exhausted on Y combinator

The code from this stackoverflow question: https://programmers.stackexchange.com/questions/215712/type-checking-and-recursive-types-writing-the-y-combinator-in-haskell-ocaml

i.e.

newtype Mu a = Roll { unroll :: Mu a -> a }

fix :: (a -> a) -> a
fix = \f -> (\x -> f (unroll x x)) $ Roll (\x -> f (unroll x x))

produces the following output when compiled with GHC 7.10.2 or 7.10.3:

sweirich$ ghc --make Mu.hs
[1 of 1] Compiling Mu               ( Mu.hs, Mu.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.3 for x86_64-apple-darwin):
	Simplifier ticks exhausted
  When trying UnfoldingDone a_sml
  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: 4962

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

The code compiles with newtype replaces by data.

Trac metadata
Trac field Value
Version 7.10.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information