1 {-# LANGUAGE FlexibleContexts, UndecidableInstances, StandaloneDeriving #-}
2 {-# LANGUAGE TypeSynonymInstances, FlexibleInstances, DeriveRepresentable #-}
3 {-# LANGUAGE Generics #-}
9 data Tree a = Leaf | Node a (Tree a) (Tree a) deriving Representable0
11 instance Representable0 Char
12 instance (Representable0 (Tree a)) => Show (Tree a)
14 -- deriving instance Representable0 (Tree a)
16 tree1, tree2 :: Tree Char
17 tree1 = Node 'a' Leaf Leaf
18 tree2 = Node 'c' tree1 tree1