[GHC] #13011: Simplifier ticks exhausted: a 10-line case

#13011: Simplifier ticks exhausted: a 10-line case -------------------------------------+------------------------------------- Reporter: L.K.Rebellion | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Keywords: Simplifier | Operating System: Linux ticks exhausted | Type of failure: Compile-time Architecture: x86 | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: #8319 #12776 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I was trying to define a function that could take itself as an argument. {{{#!hs newtype MobiusFn a = MobiusFn { func :: MobiusFn a -> a } spin :: MobiusFn a -> a spin mf = func mf mf }}} Use it to find suffixes of a `String` {{{#!hs suffixes :: String -> [String] suffixes = spin $ MobiusFn suffixesMF where suffixesMF _ [] = [] suffixesMF mf s@(_:xs) = s : spin mf xs }}} Add `main` and compile {{{#!hs main = readLn >>= (print . suffixes) }}} The compiler panicked with {{{ [1 of 1] Compiling Main ( test.hs, test.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for i386-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone mf_s1UD }}} But if we ignore the empty string case, it works well with non-empty strings. {{{#!hs suffixes :: String -> [String] suffixes = spin $ MobiusFn suffixesMF where suffixesMF _ s@[_] = [s] suffixesMF mf s@(_:xs) = s : spin mf xs }}} Two versions tested. {{{ GHC version 8.0.1 for i386-unknown-linux GHC version 7.10.3 for i386-unknown-linux }}} Thank you for reading. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13011 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13011: Simplifier ticks exhausted: a 10-line case -------------------------------------+------------------------------------- Reporter: L.K.Rebellion | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Simplifier | ticks exhausted Operating System: Linux | Architecture: x86 Type of failure: Compile-time | Test Case: crash or panic | Blocked By: | Blocking: Related Tickets: #8319 #12776 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Alas see [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html #bugs-in-ghc known bugs]. And #11240, #8833, #3872, #5400, #5448, #5722, #7057, #7369, #9235. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13011#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13011: Simplifier ticks exhausted: a 10-line case -------------------------------------+------------------------------------- Reporter: L.K.Rebellion | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Simplifier | ticks exhausted Operating System: Linux | Architecture: x86 Type of failure: Compile-time | Test Case: crash or panic | Blocked By: | Blocking: Related Tickets: #8319 #12776 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by George): Given Simon's comment above and the doc that seems to say this will never be fixed does it make sense to leave this as high priority? Note also that the error message says: If GHC was unable to complete compilation even with a very large factor (a thousand or more), please consult the "Known bugs or infelicities" section in the Users Guide before filing a report. There are a few situations unlikely to occur in practical programs for which simplifier non-termination has been judged acceptable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13011#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13011: Simplifier ticks exhausted: a 10-line case -------------------------------------+------------------------------------- Reporter: L.K.Rebellion | Owner: (none) Type: bug | Status: new Priority: lowest | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Simplifier | ticks exhausted Operating System: Linux | Architecture: x86 Type of failure: Compile-time | Test Case: crash or panic | Blocked By: | Blocking: Related Tickets: #8319 #12776 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by L.K.Rebellion): * priority: high => lowest -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13011#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC