Opened 4 years ago

Closed 2 years ago

#8168 closed bug (duplicate)

ghc "Simplifier ticks exhausted" "When trying UnfoldingDone"

Reported by: sp55aa Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Simplifier, UnfoldingDone, simpl-tick-factor Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHC rejects valid program Test Case:
Blocked By: Blocking:
Related Tickets: #10372 Differential Rev(s):
Wiki Page:

Description (last modified by simonpj)

ghc fail to compile this file:

---- begin Y.hs ----
newtype Rec a = Rec { unRec :: Rec a -> a }

y :: (a -> a) -> a
y = \f -> (\x -> f (unRec x x)) (Rec (\x -> f (unRec x x)))

foo :: (a -> a) -> a -> a
foo f n = f n

main = print $ y foo 4
---- end Y.hs ----

Try it:

C:\Users\user\Desktop>ghc Y.lhs
[1 of 1] Compiling Main             ( Y.lhs, Y.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for i386-unknown-mingw32):
        Simplifier ticks exhausted
    When trying UnfoldingDone a_sqe{v} [lid]
    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: 5601

Attachments (2)

Y.hs (198 bytes) - added by sp55aa 4 years ago.
Y Combinator
Y_fact.hs (241 bytes) - added by sp55aa 4 years ago.

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by sp55aa

Attachment: Y.hs added

Y Combinator

comment:1 Changed 4 years ago by simonpj

Description: modified (diff)

Yes see At least the simplifier doesn't go into an infinite loop any more. Better solutions welcome.


Changed 4 years ago by sp55aa

Attachment: Y_fact.hs added

comment:2 Changed 3 years ago by thomie

Architecture: x86Unknown/Multiple
Operating System: WindowsUnknown/Multiple

comment:3 Changed 2 years ago by bgamari

Priority: highnormal

I'm going to bump down the priority of this following the reasoning given in the User's Guide.

comment:4 Changed 2 years ago by thomie

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.