[GHC] #14638: Simplifier ticks exhausted on Ω lambda term

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- GHC panics when trying to compile the following program: {{{#!hs module Omega where newtype Mu a = Roll { unRoll :: Mu a -> a } omega = (\h -> $ Roll h) (\x -> unRoll x $ x) }}} However, GHC has no complaints about interpreting the module. ---- I've attached the most verbose output of GHC, should you so need it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by merlynfry): * Attachment "compilation output" added. GHC Output -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Old description:
GHC panics when trying to compile the following program:
{{{#!hs module Omega where
newtype Mu a = Roll { unRoll :: Mu a -> a }
omega = (\h -> $ Roll h) (\x -> unRoll x $ x)
}}}
However, GHC has no complaints about interpreting the module.
----
I've attached the most verbose output of GHC, should you so need it.
New description: GHC panics when trying to compile the following program: {{{#!hs module Omega where newtype Mu a = Roll { unRoll :: Mu a -> a } omega = (\h -> h $ Roll h) (\x -> unRoll x $ x) }}} However, GHC has no complaints about interpreting the module. ---- I've attached the most verbose output of GHC, should you so need it. -- Comment (by merlynfry): Correcting a typo. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by merlynfry): After looking at the compilation output log, it would seem (to my admittedly uneducated self) that the simplifier is getting trapped in an infinite loop until the ticks are depleted. The loop being: {{{ /-------------------------------\ | | V | PostInlineUnconditionally | | | V | BetaReduction | | | V | UnfoldingDone | | | | | \-------------------------------/ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Is this an instance of the known bug listed as the third bullet [http://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html #bugs-in-ghc here]? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj):
Is this an instance of the known bug listed as the third bullet here?
I think it is. The ticks-exhausted thing at least means that GHC stops, rather than going into an infinite loop. It's a shortcoming I don't yet know how to fix, but fortunately it only seems to come up in artificial situations. So far! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by merlynfry): Ah. Apologies, I should have been a bit more scrupulous in checking whether this bug had already been found. Should I modify this to be resolved with: 'wontfix', and perhaps put its milestone to bottom? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Indeed, closing as `wontfix` would be appropriate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14638: Simplifier ticks exhausted on Ω lambda term -------------------------------------+------------------------------------- Reporter: merlynfry | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: ⊥ Component: Compiler | Version: 8.2.2 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by merlynfry): * status: new => closed * resolution: => wontfix * milestone: => ⊥ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14638#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC