[GHC] #14087: Ambiguous record field name destructure on qualified imported modules causes compiler crash

#14087: Ambiguous record field name destructure on qualified imported modules causes compiler crash -------------------------------------+------------------------------------- Reporter: philipwhite | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I have two extremely simple files which will reproduce this crash. Main.hs: {{{ module Main where import qualified B as B x = 0 main :: IO () main = do let B.T { x = inside } = B.value putStrLn (show inside) }}} B.hs {{{ module B where data T = T { x :: Bool } value :: T value = T { x = True } }}} I did a qualified import of one module into the main module. I tried to destructure a record from this module, but I didn't qualify the record fields in the destructuring expression. The output of the compiler is below: {{{ Building ghcbug-repro-0.1.0.0... Preprocessing executable 'ghcbug-repro' for ghcbug-repro-0.1.0.0... [2 of 2] Compiling Main ( Main.hs, dist/build/ghcbug-repro /ghcbug-repro-tmp/Main.o ) <no location info>: error: ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): translateConPatVec: lookup Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14087 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14087: Ambiguous record field name destructure on qualified imported modules causes compiler crash -------------------------------------+------------------------------------- Reporter: philipwhite | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #13644 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13644 Comment: Closing as a duplicate of #13644. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14087#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC