[GHC] #14315: GHC panic caused by destructuring with qualified name

#14315: GHC panic caused by destructuring with qualified name ----------------------------------------+--------------------------------- Reporter: bloxx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Linux Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- I have a cabal project with the following files: {{{#!hs -- src/Alt.hs module Alt where data Pizza = Pizza { filling :: String } -- =========== -- src/Main.hs module Main where import qualified Alt as A data Pizza = Pizza { filling :: String } unpizza :: A.Pizza -> String -- to fix it, replace "filling" with "A.filling" unpizza A.Pizza { filling = filling } = filling main :: IO () main = putStrLn "Hello Haskell!" }}} Of course, this is not valid code. "filling" belongs to "Pizza" and "A.filling" belongs to "A.Pizza". But it causes a panic in GHC 8.2.1 instead of an error, so I suppose it is a bug. Can you reproduce this behavior? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14315 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14315: GHC panic caused by destructuring with qualified name -------------------------------------+------------------------------------- Reporter: bloxx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bloxx): * failure: None/Unknown => Compile-time crash or panic -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14315#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14315: GHC panic caused by destructuring with qualified name -------------------------------------+------------------------------------- Reporter: bloxx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Linux | Architecture: Other Type of failure: Compile-time | Test Case: crash or panic | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bloxx): * architecture: Unknown/Multiple => Other Old description:
I have a cabal project with the following files: {{{#!hs -- src/Alt.hs module Alt where
data Pizza = Pizza { filling :: String }
-- =========== -- src/Main.hs module Main where
import qualified Alt as A
data Pizza = Pizza { filling :: String }
unpizza :: A.Pizza -> String -- to fix it, replace "filling" with "A.filling" unpizza A.Pizza { filling = filling } = filling
main :: IO () main = putStrLn "Hello Haskell!" }}}
Of course, this is not valid code. "filling" belongs to "Pizza" and "A.filling" belongs to "A.Pizza". But it causes a panic in GHC 8.2.1 instead of an error, so I suppose it is a bug. Can you reproduce this behavior?
New description: I have a cabal project with the following files: {{{#!hs -- src/Alt.hs module Alt where data Pizza = Pizza { filling :: String } -- =========== -- src/Main.hs module Main where import qualified Alt as A data Pizza = Pizza { filling :: String } unpizza :: A.Pizza -> String -- to fix it, replace "filling" with "A.filling" unpizza A.Pizza { filling = filling } = filling main :: IO () main = putStrLn "Hello Haskell!" }}} Of course, this is not valid code. "filling" belongs to "Pizza" and "A.filling" belongs to "A.Pizza". But it causes a panic in GHC 8.2.1 instead of an error, so I suppose it is a bug. Can you reproduce this behavior? Edit: GHC tells me: <no location info>: error: ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): translateConPatVec: lookup -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14315#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14315: GHC panic caused by destructuring with qualified name -------------------------------------+------------------------------------- Reporter: bloxx | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: Other Type of failure: Compile-time | Test Case: crash or panic | Blocked By: | Blocking: Related Tickets: #13644 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13644 Comment: Thanks for the bug report. This is a duplicate of #13644, and has been fixed in GHC 8.4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14315#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC