
#13708: Panic! (the "impossible" happened) bug in GHC 8.2.1 rc2 -------------------------------------+------------------------------------- Reporter: deech | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.2.1-rc2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | simplCore/should_compile/T13708 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: closed => merge * milestone: => 8.2.1 @@ -2,1 +2,1 @@ - {{{ + {{{#!hs New description: The following causes a panic in GHC 8.2.1 rc2: {{{#!hs module Main where indexOr :: a -> Int -> [a] -> a indexOr fallback idx xs = if (idx < length xs) then xs !! idx else fallback main :: IO () main = undefined }}} When compiling I get: {{{ [1 of 1] Compiling Main ( src/Examples/table-sort.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.0.0/build/fltkhs-table-sort /fltkhs-table-sort-tmp/Main.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.2.0.20170507 for x86_64-unknown-linux): idInfo a_a2ws Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1134:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in ghc:Outputable pprPanic, called at compiler/basicTypes/Var.hs:526:34 in ghc:Var Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Comment: I suspect we should merge this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13708#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler