## Flexible types: robust type inference for first-class polymorphism (2009)

### Cached

### Download Links

- [research.microsoft.com]
- [research.microsoft.com]
- [research.microsoft.com]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proceedings of the 36th ACM Symposium on Principles of Programming Languages (POPL’09 |

Citations: | 12 - 1 self |

### BibTeX

@INPROCEEDINGS{Leijen09flexibletypes:,

author = {Daan Leijen},

title = {Flexible types: robust type inference for first-class polymorphism},

booktitle = {In Proceedings of the 36th ACM Symposium on Principles of Programming Languages (POPL’09},

year = {2009}

}

### OpenURL

### Abstract

We present HML, a type inference system that supports full firstclass polymorphism where few annotations are needed: only function parameters with a polymorphic type need to be annotated. HML is a simplification of MLF where only flexibly quantified types are used. This makes the types easier to work with from a programmers perspective, and simplifies the implementation of the type inference algorithm. Still, HML retains much of the expressiveness of MLF, it is robust with respect to small program transformations, and has a simple specification of the type rules with an effective type inference algorithm that infers principal types. A small reference implementation with many examples is

### Citations

938 | A theory of type polymorphism in programming - Milner - 1978 |

359 |
Principal type-schemes for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ...ds 1. Introduction Languages, Design, Theory First-class polymorphism, System F, MLF Most type inference systems used in practice are based on HindleyMilner type inference (Hindley 1969; Milner 1978; =-=Damas and Milner 1982-=-). This is an attractive type system since it has a simple logical specification, and an effective type inference algorithm that can automatically infer most general, or principal, types for expressio... |

108 |
The principal type scheme of an object in combinatory logic
- Hindley
- 1969
(Show Context)
Citation Context ...rphism General Terms Keywords 1. Introduction Languages, Design, Theory First-class polymorphism, System F, MLF Most type inference systems used in practice are based on HindleyMilner type inference (=-=Hindley 1969-=-; Milner 1978; Damas and Milner 1982). This is an attractive type system since it has a simple logical specification, and an effective type inference algorithm that can automatically infer most genera... |

95 |
Type assignment in programming languages
- Damas
- 1985
(Show Context)
Citation Context ...phism where let-bound values can have a polymorphic type. Damas and Milner (1982) later proved the completeness of Milner’s algorithm, extending the type inference system with polymorphic references (=-=Damas 1985-=-). Wells (1999) shows that general type inference for unannotated System F is undecidable. Jones (1997) extends Hindley-Milner with first class polymorphism by wrapping polymorphic values into type co... |

95 | Putting type annotations to work
- Odersky, Laufer
- 1996
(Show Context)
Citation Context ...morphism practical. There is a long list of research papers that propose type inference systems for System F (Peyton Jones et al. 2007; Rémy 2005; Jones 1997; Le Botlan and Rémy 2003; Le Botlan 2004; =-=Odersky and Läufer 1996-=-; Garrigue and Rémy 1999; Vytiniotis et al. 2006; Dijkstra 2005; Leijen 2008a). All of these systems mostly differ in where type annotations are needed in the program, and how easy it is for the progr... |

47 | First-class polymorphism with type inference
- Jones
- 1997
(Show Context)
Citation Context ...annotations to make programming with first-class polymorphism practical. There is a long list of research papers that propose type inference systems for System F (Peyton Jones et al. 2007; Rémy 2005; =-=Jones 1997-=-; Le Botlan and Rémy 2003; Le Botlan 2004; Odersky and Läufer 1996; Garrigue and Rémy 1999; Vytiniotis et al. 2006; Dijkstra 2005; Leijen 2008a). All of these systems mostly differ in where type annot... |

22 | Botlan and Didier Rémy. MLF: Raising ML to the power of System-F - Le - 2003 |

21 | MLF: Une extension de ML avec polymorphisme de second ordre et instanciation implicite - BOTLAN - 2004 |

20 | Semi-explicit first-class polymorphism for ML
- Garrigue, Rémy
- 1999
(Show Context)
Citation Context ... is a long list of research papers that propose type inference systems for System F (Peyton Jones et al. 2007; Rémy 2005; Jones 1997; Le Botlan and Rémy 2003; Le Botlan 2004; Odersky and Läufer 1996; =-=Garrigue and Rémy 1999-=-; Vytiniotis et al. 2006; Dijkstra 2005; Leijen 2008a). All of these systems mostly differ in where type annotations are needed in the program, and how easy it is for the programmer to determine where... |

15 | A graphical presentation of MLF types with a linear-time unification algorithm
- Rémy, Yakobowski
- 2007
(Show Context)
Citation Context ...n in (Le Botlan and Rémy 2007). In the same work, Rémy and Le Botlan conjecture the completeness of the iMLF relation based on a proof sketch based on an intermediate graphic representation of types (=-=Rémy and Yakobowski 2007-=-). 5.4 Restricted equivalence The equivalence relation in HML differs from the one of (Implicit) MLF as it is not stated under a prefix. This is an important technical distinction to make type inferen... |

12 |
Stepping through Haskell
- Dijkstra
- 2005
(Show Context)
Citation Context ...type inference systems for System F (Peyton Jones et al. 2007; Rémy 2005; Jones 1997; Le Botlan and Rémy 2003; Le Botlan 2004; Odersky and Läufer 1996; Garrigue and Rémy 1999; Vytiniotis et al. 2006; =-=Dijkstra 2005-=-; Leijen 2008a). All of these systems mostly differ in where type annotations are needed in the program, and how easy it is for the programmer to determine where to put them in practice. The MLF type ... |

9 | FPH: First-class polymorphism for Haskell - Vytiniotis, Weirich, et al. |

9 | Botlan and Didier Rémy. Recasting MLF - Le - 2007 |

3 | Botlan and Didier Rémy. Recasting MLF. Research Report 6228 - Le - 2007 |

2 | partial type-inference for System-F based on type-containment - Simple - 2005 |

1 |
Efficient ML type inference using ranked type variables
- Kuan, MacQueen
- 2007
(Show Context)
Citation Context ...n an actual implementation, this operation can be implemented efficiently using ranked type variables similar to the usual optimization used for generalization over free variables in the environment (=-=Kuan and MacQueen 2007-=-; Leijen 2008b). The update function update(Q, α � ϕ) updates a prefix Q that contains a binding for α with a new binding ϕ taking care to maintain the invariants on Q. First the prefix is split accor... |

1 | 2008b. Daan Leijen. A type directed translation from MLF to System F - html |