Generalized categorical Haskell base type classes with class constraints.