Opened 4 years ago

Closed 4 years ago

#11240 closed bug (duplicate)

Simplifier ticks exhausted on Y combinator

Reported by: sweirich Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.10.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #424 Differential Rev(s):
Wiki Page:

Description

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.

Change History (2)

comment:1 Changed 4 years ago by goldfire

Could this be related to the third bullet under Sec 13.2.1 in the manual?

comment:2 in reply to:  1 Changed 4 years ago by thomie

Resolution: duplicate
Status: newclosed

Replying to goldfire:

Could this be related to the third bullet under Sec 13.2.1 in the manual?

Indeed. See also #8833, #3872, #5400, #5448, #5722, #7057, #7369, #9235 (copied from Status/SLPJ-Tickets.

Note: See TracTickets for help on using tickets.