[GHC] #10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB -------------------------------------+------------------------------------- Reporter: | Owner: dramforever | Status: new Type: bug | Milestone: Priority: normal | Version: 7.10.1-rc2 Component: Compiler | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The following code causes a panic. It's the Y combinator. {{{#!hs module Y where newtype F a = F { unF :: F a -> a } y :: (a -> a) -> a y = \f -> (\x -> x (F x)) (\x -> f (unF x x)) }}} {{{ bash$ ~/src/ghc-7.10.0.20150123/installed/bin/ghc -c Y.hs ghc: panic! (the 'impossible' happened) (GHC version 7.10.0.20150123 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone x_alB 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: 4722 Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} However it works fine in GHCi {{{ bash$ ~/src/ghc-7.10.0.20150123/installed/bin/ghci Y.hs GHCi, version 7.10.0.20150123: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Y ( Y.hs, interpreted ) Ok, modules loaded: Y. *Y> take 10 (y (1:)) [1,1,1,1,1,1,1,1,1,1] }}} I have tried this code with 7.6.3, 7.8.3 and 7.10.1-rc2. Same result. At least in 7.10.1-rc2 it doesn't work even with -fsimpl-tick- factor=100000 (that's 10^5^) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10105 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB -------------------------------------+------------------------------------- Reporter: dramforever | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by dramforever): In case you didn't get it, I installed 7.10.1-rc2 in prefix ~/src/ghc-7.10.0.20150123/installed/ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10105#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB -------------------------------------+------------------------------------- Reporter: dramforever | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Yes indeed: see the https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html user manual]. At least it no longer loops! Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10105#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB -------------------------------------+------------------------------------- Reporter: dramforever | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by dramforever): Oh yes. Actually I knew that before but in this case it just says "panic" rather than looping so I thought it was irrlevant. Maybe fix the docs? Also an idea: Maybe we can do positivity analysis on data types just like Agda. We don't have to refuse it, just add a check when compiling functions that deal with it (and maybe a warning?) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10105#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB
-------------------------------------+-------------------------------------
Reporter: dramforever | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB -------------------------------------+------------------------------------- Reporter: dramforever | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by dramforever): That's great! thanks -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10105#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10105: ghc panic Simplifier ticks exhausted when trying UnfoldingDone x_alB -------------------------------------+------------------------------------- Reporter: dramforever | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1-rc2 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | 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/10105#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC