Skip to content

Compiler error: Simplifier ticks exhausted

  1. 4 Programming jointly with types and values

Exercise 2.4.1 (Fixpoint). The lambda term:

y = = \f->(\x->f (x x)) (\x->f (x x))

(that encodes a fixed point combinator in the untyped lambda calculus) does not type check in Haskell. Try it! Interestingly though, recursion on the type level can be used to introduce recursion on the value level. If we define the recursive type:

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

then we can “annotate” the definition of y with applications of F and unF such that y typechecks. Do it!

This works on someones else his computer:

data F a = F { unF :: F a -> a }
-- y = \f -> (\x -> f (x x)) (\x -> f (x x))
y = \f -> (\x -> x $ F x) (\x -> f . unF x $ x)

Compiler error:

ghc.EXE: panic! (the 'impossible' happened)

(GHC version 8.0.2 for x86_64-unknown-mingw32):

Simplifier ticks exhausted When trying UnfoldingDone x_s1Gq 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: 6480

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

Increased -fsimpl-tick-factor to 100.000 still the error occurred

Trac metadata
Trac field Value
Version 8.0.1
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