aboutsummaryrefslogtreecommitdiff
path: root/examples/test-kinds.hs
blob: ddd4817558d96999c2a00045525c14767b0fa1bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
data Tree a
  = Node (Tree a) a (Tree a)
  | Leaf

data A f = A1 (f ()) | A2 (f (Tree ()))

data Either a b = Left a | Right b

data ExceptT e m a = ExceptT (Either e (m a))

data ExceptT2 e m a = ExceptT2 (m (Either e a))

data TreeF a r
  = NodeF r a r
  | LeafF

data Fix f = In (f (Fix f))

data Tree' a = Tree' (Fix (TreeF a))