Implements common Haskell type classes using the constraint kinds pattern to allow constraints.