[GHC] #14158: (Control.Category.id @(->) >>=) causes GHC panic
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 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: -------------------------------------+------------------------------------- {{{ $ ghci -ignore-dot-ghci -XTypeApplications GHCi, version 8.3.20170605: http://www.haskell.org/ghc/ :? for help Prelude> import qualified Control.Category as Cat Prelude Cat> :t (Cat.id @(->) >>=) ghc: panic! (the 'impossible' happened) (GHC version 8.3.20170605 for x86_64-unknown-linux): repSplitAppTy_maybe a0_a1qW[tau:2] a0_a1qW[tau:2] Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable pprPanic, called at compiler/types/Type.hs:699:5 in ghc:Type Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Prelude Cat> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 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): Interestingly, I can no longer reproduce this on GHC HEAD. I wonder what fixed it? Time to investigate. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 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): I noticed that too. I think it's a consequence of one of my recent commits: I suspect {{{ commit a6c448b403dbe8720178ca82100f34baedb1f47e Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Mon Aug 28 17:33:59 2017 +0100 Small refactor of getRuntimeRep }}} If you could bisect that would save me time. Even if it is, I'd like to understand WHY it fixed it! Which I don't right now. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 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, `Small refactor of getRuntimeRep` is the first commit in which the program above works. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 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 bgamari): * status: new => merge * milestone: => 8.2.2 Comment: Hmm, perhaps we should consider cherry-picking this in that case. It looks like it will apply pretty easily. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 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 bgamari): I've also cherry-picked this to `ghc-8.2`. Of course, it would be great to have a better understanding of why this fixes the issue. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 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 Simon Peyton Jones <simonpj@…>): In [changeset:"2c133b67df374c73bc8069cefd7d57e1d2a14fc3/ghc" 2c133b67/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2c133b67df374c73bc8069cefd7d57e1d2a14fc3" Really fix Trac #14158 I dug more into how #14158 started working. I temporarily reverted the patch that "fixed" it, namely commit a6c448b403dbe8720178ca82100f34baedb1f47e Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Mon Aug 28 17:33:59 2017 +0100 Small refactor of getRuntimeRep Sure enough, there was a real bug, described in the new TcExpr Note [Visible type application zonk] In general, syntactic substituion should be kind-preserving! Maybe we should check that invariant... }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T14158 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => typecheck/should_compile/T14158 Comment: Now I think I've nailed it. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T14158 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14158: (Control.Category.id @(->) >>=) causes GHC panic -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T14158 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): comment:6 merged to `ghc-8.2` as 13cd53df15ab38a29c5dfcbdd916ae2ada6ff979. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14158#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC