
#12158: ghc: panic! (the 'impossible' happened) translateConPatVec: lookup -------------------------------------+------------------------------------- Reporter: wozgonon | Owner: gkaracha Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: | PatternMatchWarnings Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * cc: roshats (added) * component: Compiler => GHCi * os: Windows => Unknown/Multiple * architecture: x86_64 (amd64) => Unknown/Multiple Comment: When you actually use a `let` binding though, it works fine: {{{ Prelude> data Stock = Stock {name :: String, ric :: String, price :: Float} Prelude> let price Stock{name=name,ric=ric,price=price} = price * 2 Prelude> price (Stock "abc" "def" 12.3) 24.6 }}} So this is another problem with the toplevel definitions feature introduced in GHCi 8.0 (#7253). See also #12091. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12158#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler