blob: f5b129f6bf9142487008334b597689af72c237ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE TypeFamilies #-}
module ShouldCompile where
class Cls a where
type Fam a :: *
type Fam a = Maybe a
instance Cls Int where
-- Overriding default
type Fam Int = Bool
nott :: (Fam a ~ Bool) => a -> Fam a -> Fam a
nott _proxy False = True
nott _proxy True = False
foo :: Bool -> Bool
foo = nott (undefined :: Int)
|