How to make ad-hoc polymorphism less ad hoc
POPL '89 Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Higher-order modules and the phase distinction
POPL '90 Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
ESOP'92 Symposium proceedings on 4th European symposium on programming
Qualified types: theory and practice
Qualified types: theory and practice
Simplifying and improving qualified types
FPCA '95 Proceedings of the seventh international conference on Functional programming languages and computer architecture
Using parameterized signatures to express modular structure
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A type-theoretic interpretation of standard ML
Proof, language, and interaction
The Definition of Standard ML
Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A type system for higher-order modules
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
LFP '84 Proceedings of the 1984 ACM Symposium on LISP and functional programming
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Essential language support for generic programming
Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Understanding and evolving the ml module system
Understanding and evolving the ml module system
A language for generic programming
A language for generic programming
System F with type equality coercions
TLDI '07 Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation
Generics for the working ML'er
ML '07 Proceedings of the 2007 workshop on Workshop on ML
Practical generic programming in OCaml
ML '07 Proceedings of the 2007 workshop on Workshop on ML
ML Modules and Haskell Type Classes: A Constructive Comparison
APLAS '08 Proceedings of the 6th Asian Symposium on Programming Languages and Systems
Principal type schemes for modular programs
ESOP'07 Proceedings of the 16th European conference on Programming
Type classes as objects and implicits
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
A language for generic programming in the large
Science of Computer Programming
On the bright side of type classes: instance arguments in Agda
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Type checking modular multiple dispatch with parametric polymorphism and multiple inheritance
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
The implicit calculus: a new foundation for generic programming
Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation
Dependently typed programming with singletons
Proceedings of the 2012 Haskell Symposium
Mixin’ Up the ML Module System
ACM Transactions on Programming Languages and Systems (TOPLAS)
Hi-index | 0.00 |
ML modules and Haskell type classes have proven to be highly effective tools for program structuring. Modules emphasize explicit configuration of program components and the use of data abstraction. Type classes emphasize implicit program construction and ad hoc polymorphism. In this paper, we show how the implicitly-typed style of type class programming may be supported within the framework of an explicitly-typed module language by viewing type classes as a particular mode of use of modules. This view offers a harmonious integration of modules and type classes, where type class features, such as class hierarchies and associated types, arise naturally as uses of existing module-language constructs, such as module hierarchies and type components. In addition, programmers have explicit control over which type class instances are available for use by type inference in a given scope. We formalize our approach as a Harper-Stone-style elaboration relation, and provide a sound type inference algorithm as a guide to implementation.