summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/T4175.hs
blob: 0fc53e76e93e046fcf32cde53621042f14e843ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
module T4175 where

import GHC.Exts

type family A a b
type instance A Int Int = ()
type instance A (Maybe a) a = a
type instance A (B a) b = ()

data family B a
data instance B () = MkB

class C a where
    type D a b

instance C Int where
    type D Int () = String

instance C () where
    type D () () = Bool

type family E a where
    E ()  = Bool
    E Int = String

class Z a

class F (a :: Constraint)
instance F (Z a)

class G (a :: * -> *)
instance G B