Abstract
AbstractThis 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.
Publisher
Cambridge University Press (CUP)
Reference23 articles.
1. Jones M. P. (1991) Introduction to Gofer—included as part of the Gofer distribution, available by anonymous ftp from nebula.cs.yale.edu in the directory pub/haskell/gofer.
2. Breazu-Tannen V. , Coquand T. , Gunter C. A. and Scedrov A. (1989) Inheritance and coercion. IEEE Symposium on Logic in Computer Science.
3. Wadler P. (1992) The essence of functional programming. 19th Ann. ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Santa Fe, NM.
4. A Machine-Oriented Logic Based on the Resolution Principle
Cited by
33 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. HOTGP- Higher-Order Typed Genetic Programming;2023
2. Kind inference for datatypes;Proceedings of the ACM on Programming Languages;2020-01
3. Modular implicits;Electronic Proceedings in Theoretical Computer Science;2015-12-05
4. Lightweight Higher-Kinded Polymorphism;Functional and Logic Programming;2014
5. Generic Programming with Adjunctions;Lecture Notes in Computer Science;2012