Journal of Functional Programming · 1995 · 93 citations · 16 references
ComputingComputer ScienceAlgorithmsProgramming LanguagesSyntaxData TypesFunctional ProgrammingRecursion TheoryType CheckingType SystemsMonadsPolymorphic Type SystemsPolymorphic TypesPolymorphism StudiesType ClassesType ConstructorsType InferenceType Theory
Abstract This paper describes a flexible type system that combines overloading and higher-order polymorphism in an implicitly typed language using a system of constructor classes —a natural generalization of type classes in Haskell. We present a range of examples to demonstrate the usefulness of such a system. In particular, we show how constructor classes can be used to support the use of monads in a functional language. The underlying type system permits higher-order polymorphism but retains many of the attractive features that have made Hindley/Milner type systems so popular. In particular, there is an effective algorithm that can be used to calculate principal types without the need for explicit type or kind annotations. A prototype implementation has been developed providing, amongst other things, the first concrete implementation of monad comprehensions known to us at the time of writing.
16
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Principal type-schemes for functional programs
Robin Milner · 1982 · 1.1K citations
Report on the programming language Haskell
Paul Hudak, Simon Peyton Jones, Philip Wadler et al. · ACM SIGPLAN Notices · 1992 · 1K citations · Full text
Computational lambda-calculus and monads
Eugenio Moggi · 2003 · 858 citations
Computing, Computer Science, Algebra +13