SCC analysis for instances as well as types/classes
[ghc.git] / testsuite / tests / typecheck / should_compile / tc252.hs
1 {-# LANGUAGE TypeFamilies #-}
2 module ShouldCompile where
3
4 class Cls a where
5 type Fam a :: *
6 type Fam a = Maybe a
7
8 instance Cls Int where
9 -- Overriding default
10 type Fam Int = Bool
11
12 nott :: (Fam a ~ Bool) => a -> Fam a -> Fam a
13 nott _proxy False = True
14 nott _proxy True = False
15
16 foo :: Bool -> Bool
17 foo = nott (undefined :: Int)