Programming with constructor classes
Polymorphic type systems offer both type security and flexibility, allowing the definition and use of values which behave uniformly across a range of types. Constructor classes are one attempt to increase the expressiveness of such systems without losing the benefits of effective type inference. Combining overloading in the style of Haskell type classes, and a simple form of higher-order polymorphism, constructor classes encourage the definition and use of general purpose operations that behave uniformly across a range of type constructors. We describe a number of examples, concentrating in particular on the application to programming with monads in a functional language, to illustrate the benefits of a language with support for constructor classes.