Some approaches to implementation of type class inheritance in Haskell.
ClassInheritanceBasic.hs contains initial approach with less dependencies on GHC's pragmas.
ClassInheritanceProxified.hs uses ConstraintKinds magic (based on this article).
Both approaches provide examples on manipulations with the following tree type:
data Tree a
= Node (Tree a) (Tree a)
| Leaf a