
#8168: ghc "Simplifier ticks exhausted" "When trying UnfoldingDone" -------------------------------------+------------------------------------- Reporter: sp55aa | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Simplifier, Operating System: Windows | UnfoldingDone, simpl-tick-factor Type of failure: GHC rejects | Architecture: x86 valid program | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Old description:
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 ----
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
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
New description: 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 }}} -- Comment (by simonpj): Yes see http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs.html. At least the simplifier doesn't go into an infinite loop any more. Better solutions welcome. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8168#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler