Skip to content

ASSERT failed! on T16135

{-# LANGUAGE ExistentialQuantification, ApplicativeDo #-}

module Bug where

data T f = forall a. MkT (f a)

runf :: forall f. Functor f => IO (T f)
runf = do
    return ()
    MkT fa <- runf
    return $ MkT fa

Leads to assertion failure

ghc: panic! (the 'impossible' happened)
  GHC version 9.3.20220221:
	ASSERT failed!
  2
  1
  a_aEs[tau:1]
  a_aEe[ssk:2]
  Call stack:
      CallStack (from HasCallStack):
        massertPpr, called at compiler/GHC/Tc/Utils/TcMType.hs:1027:10 in ghc:GHC.Tc.Utils.TcMType

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

Related to #21113 (closed)

Edited by Matthew Pickering
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information