Skip to content

isUnliftedType GHC panic on pattern with True :: Maybe

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Oops where

pattern What = True :: Maybe

Fails on 8.4.3 with:

ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.3 for x86_64-unknown-linux):
	isUnliftedType
  (Maybe |> {co_a1Dg3}) :: TYPE t_a1Dg9[tau:1]
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
        pprPanic, called at compiler/types/Type.hs:1939:10 in ghc:Type

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

I'm currently cloning from git, and will try to get around to check it with HEAD over the next days. BTW, it's not a show-stopper for me.

Trac metadata
Trac field Value
Version 8.4.3
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture aarch64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information