Add GHCi help message for :def! and :: commands
[ghc.git] / testsuite / tests / typecheck / should_compile / tc252.hs
1 {-# LANGUAGE TypeFamilies #-}
2 module ShouldCompile where
3
4 import Data.Kind (Type)
5
6 class Cls a where
7 type Fam a :: Type
8 type Fam a = Maybe a
9
10 instance Cls Int where
11 -- Overriding default
12 type Fam Int = Bool
13
14 nott :: (Fam a ~ Bool) => a -> Fam a -> Fam a
15 nott _proxy False = True
16 nott _proxy True = False
17
18 foo :: Bool -> Bool
19 foo = nott (undefined :: Int)