
#14105: ApplicativeDo causes GHC panic on irrefutable list pattern match -------------------------------------+------------------------------------- Reporter: BoteboTsebo | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: ApplicativeDo | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: None/Unknown (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- So this just happened: {{{#!hs {-# language ApplicativeDo #-} module Main where main :: IO () main = do [_] <- pure [] pure () }}} Compiling (under Stack) with `stack exec -- ghc --make src/Main.hs` yields {{{ [1 of 1] Compiling Main ( src/Main.hs, src/Main.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.2.1 for x86_64-unknown-linux): isStrictPattern Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} This does not happen on GHC-8.0.2. It does not happen when `ApplicativeDo` is not activated. It also does not happen when the pattern match line is changed to {{{#!hs [] <- pure [] }}} For completeness, the compiler used by `stack` is that which comes with `nightly-2017-08-10`. I am on Linux x64 (Ubuntu). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14105 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler