Hyper-polymorphic basic classes for categorical programming