GHC 9.2.1-alpha1–only panic (tyConAppTyCon)
The following program compiles with GHC 8.10.4 or 9.0.1:
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UnboxedTuples #-}
module Bug where
import GHC.Exts
f :: forall a b. a -> b
f = raise# @a @_ @b
But panics when compiled with GHC 9.2.1-alpha1:
$ ~/Software/ghc-9.2.1-alpha1/bin/ghc Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
ghc: panic! (the 'impossible' happened)
(GHC version 9.2.0.20210331:
tyConAppTyCon
r_aiJ
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Core/Type.hs:1426:52 in ghc:GHC.Core.Type