Basic polymorphic typechecking
Science of Computer Programming
Polymorphic type inference and containment
Information and Computation - Semantics of Data Types
The system f of variable types, 15 years later
Logical foundations of functional programming
Unification under a mixed prefix
Journal of Symbolic Computation
Type reconstruction in finite rank fragments of the second-order &lgr;-calculus
Information and Computation - Special issue: Selections from 1990 IEEE symposium on logic in computer science
FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
A direct algorithm for type inference in the rank-2 fragment of the second-order &lgr;-calculus
LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
Lisp and Symbolic Computation - Special issue on state in programming languages (part I)
TIL: a type-directed optimizing compiler for ML
PLDI '96 Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation
Putting type annotations to work
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Proofs about a folklore let-polymorphic type inference algorithm
ACM Transactions on Programming Languages and Systems (TOPLAS)
A transformation-based optimiser for Haskell
Science of Computer Programming - Special issue on the 6th European symposium on programming
From fast exponentiation to square matrices: an adventure in types
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
A simple applicative language: mini-ML
LFP '86 Proceedings of the 1986 ACM conference on LISP and functional programming
Semi-explicit first-class polymorphism for ML
Information and Computation
A new approach to generic functional programming
Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
POPL '01 Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A sequent calculus for subtyping polymorphic types
Information and Computation - Special issue on FLOC '96
Types and programming languages
Types and programming languages
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Higher Order Unification 30 Years Later
TPHOLs '02 Proceedings of the 15th International Conference on Theorem Proving in Higher Order Logics
The Subtyping Problem for Second-Order Types is Undecidable
LICS '96 Proceedings of the 11th Annual IEEE Symposium on Logic in Computer Science
Scripting the type inference process
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
MLF: raising ML to the power of system F
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Journal of Functional Programming
de Bruijn notation as a nested datatype
Journal of Functional Programming
Advanced Topics in Types and Programming Languages
Advanced Topics in Types and Programming Languages
Simple, partial type-inference for System F based on type-containment
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
ACM SIGPLAN Notices
Improving type error diagnosis
Haskell '04 Proceedings of the 2004 ACM SIGPLAN workshop on Haskell
Simple, partial type-inference for System F based on type-containment
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
PolyAML: a polymorphic aspect-oriented functional programming language
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
A history of Haskell: being lazy with class
Proceedings of the third ACM SIGPLAN conference on History of programming languages
A type directed translation of MLF to system F
ICFP '07 Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
Boxes go bananas: Encoding higher-order abstract syntax with parametric polymorphism*
Journal of Functional Programming
AspectML: A polymorphic aspect-oriented functional programming language
ACM Transactions on Programming Languages and Systems (TOPLAS)
HMF: simple type inference for first-class polymorphism
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
FPH: first-class polymorphism for Haskell
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Implementation and Application of Functional Languages
MPC '08 Proceedings of the 9th international conference on Mathematics of Program Construction
Flexible types: robust type inference for first-class polymorphism
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
ML Modules and Haskell Type Classes: A Constructive Comparison
APLAS '08 Proceedings of the 6th Asian Symposium on Programming Languages and Systems
APLAS '08 Proceedings of the 6th Asian Symposium on Programming Languages and Systems
HasCasl: Integrated higher-order specification and program development
Theoretical Computer Science
A pattern for almost compositional functions
Journal of Functional Programming
Information and Computation
Complete and decidable type inference for GADTs
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
QML: explicit first-class polymorphism for ML
Proceedings of the 2009 ACM SIGPLAN workshop on ML
Greedy bidirectional polymorphism
Proceedings of the 2009 ACM SIGPLAN workshop on ML
Programming Examples Needing Polymorphic Recursion
Electronic Notes in Theoretical Computer Science (ENTCS)
Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementation
EffectiveAdvice: disciplined advice with explicit effects
Proceedings of the 9th International Conference on Aspect-Oriented Software Development
IFL'06 Proceedings of the 18th international conference on Implementation and application of functional languages
HOL2P - a system of classical higher order logic with second order polymorphism
TPHOLs'07 Proceedings of the 20th international conference on Theorem proving in higher order logics
Ad-hoc polymorphism and dynamic typing in a statically typed functional language
Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
Factorising folds for faster functions
Journal of Functional Programming
A language for generic programming in the large
Science of Computer Programming
Taming wildcards in Java's type system
Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation
On the bright side of type classes: instance arguments in Agda
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Outsidein(x) modular type inference with local assumptions
Journal of Functional Programming - Dedicated to ICFP 2009
Tag-Free combinators for binding-time polymorphic program generation
FLOPS'10 Proceedings of the 10th international conference on Functional and Logic Programming
Functional programming with structured graphs
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Equality proofs and deferred type errors: a compiler pearl
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Complete and easy bidirectional typechecking for higher-rank polymorphism
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Programming errors in traversal programs over structured data
Science of Computer Programming
Time refinement in a functional synchronous language
Proceedings of the 15th Symposium on Principles and Practice of Declarative Programming
Synchronous digital circuits as functional programs
ACM Computing Surveys (CSUR)
Hi-index | 0.00 |
Haskell's popularity has driven the need for ever more expressive type system features, most of which threaten the decidability and practicality of Damas-Milner type inference. One such feature is the ability to write functions with higher-rank types – that is, functions that take polymorphic functions as their arguments. Complete type inference is known to be undecidable for higher-rank (impredicative) type systems, but in practice programmers are more than willing to add type annotations to guide the type inference engine, and to document their code. However, the choice of just what annotations are required, and what changes are required in the type system and its inference algorithm, has been an ongoing topic of research. We take as our starting point a $\lambda$-calculus proposed by Odersky and Läufer. Their system supports arbitrary-rank polymorphism through the exploitation of type annotations on $\lambda$-bound arguments and arbitrary sub-terms. Though elegant, and more convenient than some other proposals, Odersky and Läufer's system requires many annotations. We show how to use local type inference (invented by Pierce and Turner) to greatly reduce the annotation burden, to the point where higher-rank types become eminently usable. Higher-rank types have a very modest impact on type inference. We substantiate this claim in a very concrete way, by presenting a complete type-inference engine, written in Haskell, for a traditional Damas-Milner type system, and then showing how to extend it for higher-rank types. We write the type-inference engine using a monadic framework: it turns out to be a particularly compelling example of monads in action. The paper is long, but is strongly tutorial in style. Although we use Haskell as our example source language, and our implementation language, much of our work is directly applicable to any ML-like functional language.