[GHC] #14308: GHC panic with invalid expression

#14308: GHC panic with invalid expression ----------------------------------------+--------------------------------- Reporter: d6e | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: MacOS X Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- Hi, I recently discovered this expression causes GHC to panic. Shouldn't it handle this more gracefully? Perhaps saying something like "That expression is not valid. <Further Explanation>" Invalid expression: {{{#!hs g :: (a->b) a }}} {{{ Prelude> g :: (a->b) a ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-apple-darwin): repSplitAppTys a_a1Lz[sk:1] b_a1LA[sk:1] [] 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:808:9 in ghc:Type Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14308 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14308: GHC panic with invalid expression ---------------------------------+---------------------------------------- Reporter: d6e | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by simonpj): Maybe this has been fixed? {{{ GHCi, version 8.2.1.20170831: http://www.haskell.org/ghc/ :? for help Prelude> id :: (a->b) a <interactive>:1:7: error: • Expecting one fewer arguments to ‘a -> b’ Expected kind ‘* -> *’, but ‘a -> b’ has kind ‘*’ • In an expression type signature: (a -> b) a In the expression: id :: (a -> b) a In an equation for ‘it’: it = id :: (a -> b) a }}} Looks very like #14232, #14110 and friends -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14308#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14308: GHC panic with invalid expression ---------------------------------+---------------------------------------- Reporter: d6e | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13819 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13819 Comment: Indeed, this is a duplicate of #13819. It's definitely fixed in GHC 8.4, and it happens to be fixed in GHC 8.2.2, too (see https://ghc.haskell.org/trac/ghc/ticket/13819#comment:16). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14308#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14308: GHC panic with invalid expression -------------------------------------+------------------------------------- Reporter: d6e | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13819 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * os: MacOS X => Unknown/Multiple -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14308#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14308: GHC panic with invalid expression -------------------------------------+------------------------------------- Reporter: d6e | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13819 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.2.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14308#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC