QuickLook regression in GHC 9.12
The following program is accepted by GHC 9.10 and rejected by GHC 9.12.
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
module T26030 where
import Data.Kind
type S :: Type -> Type
data S a where
S1 :: S Bool
S2 :: S Char
type F :: Type -> Type
type family F a where
F Bool = Bool
F Char = Char
foo :: forall a. S a -> IO (F a)
foo sa1 = do
() <- return ()
case sa1 of
S1 -> return $ False
S2 -> return 'x'
The program is accepted with any of the following changes:
- Remove the
$
inreturn $ False
, - Add a certain type signature:
return $ ( False :: F a )
- Remove the
() <- return ()
line.
Edited by sheaf