[GHC] #8168: ghc "Simplifier ticks exhausted" "When trying UnfoldingDone"

#8168: ghc "Simplifier ticks exhausted" "When trying UnfoldingDone" -------------------------------------+------------------------------------- Reporter: sp55aa | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.6.3 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: | -------------------------------------+------------------------------------- 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 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8168 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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

#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: | UnfoldingDone, simpl-tick-factor Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: GHC | Difficulty: Unknown rejects valid program | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * os: Windows => Unknown/Multiple * architecture: x86 => Unknown/Multiple -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8168#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8168: ghc "Simplifier ticks exhausted" "When trying UnfoldingDone" -------------------------------------+------------------------------------- Reporter: sp55aa | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Simplifier, UnfoldingDone, simpl- Type of failure: GHC rejects | tick-factor valid program | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * priority: high => normal Comment: I'm going to bump down the priority of this following the reasoning given in the User's Guide. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8168#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8168: ghc "Simplifier ticks exhausted" "When trying UnfoldingDone" -------------------------------------+------------------------------------- Reporter: sp55aa | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: | Simplifier, UnfoldingDone, simpl- | tick-factor Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: #10372 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => duplicate * related: => #10372 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8168#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC