presentation of a binary tree back to an actual
-- binary tree. This function is inverse of 'fromBin'. It may fail if
-- constructors have wrong names
toBin ∷ BinG a → Maybe (Bin a)
toBin (LEFT  (CONS "Leaf" UNIT))               = Just Leaf
toBin (RIGHT (CONS "Bin" (PAI
toBin ∷ BinG a → Maybe (Bin a)
toBin (LEFT  (CONS "Leaf" UNIT))               = Just Leaf
toBin (LEFT  (CONS "Leaf" UNIT))               = Just Leaf