summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/T4175.hs
blob: ef34a4891d8cd8b3e112cc506e8d6db6c5d003d9 (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 Data.Kind

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 :: Type -> Type)
instance G B