data Tree a = Leaf | Branch { left :: Tree a , key :: a , right :: Tree a } instance Serial a => Serial ( Tree a ) where series = cons0 Leaf \/ cons3 Branch