Type change tinsertto
tinsert :: (Ord a) => Tree a -> a -> Tree a
corrects him.
This is necessary because the functions (<)and (>)belong to the class Ord, and you need to have a type signature before that.
== (==) :: Eq a => a -> a -> Bool, Eq Ord, , (<) ==, , Eq a.