Complete and Decidable Type Inference for GADTs
- Tom Schrijvers ,
- Simon Peyton Jones ,
- Martin Sulzmann ,
- Dimitrios Vytiniotis
Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming |
Published by Association for Computing Machinery, Inc.
This new paper comes with a prototype implementation for a Haskell-like language, available for download.
GADTs have proven to be an invaluable language extension, a.o. for ensuring data invariants and program correctness. Unfortunately, they pose a tough problem for type inference: we lose the principal-type property, which is necessary for modular type inference.
We present a novel and simplified type inference approach for local type assumptions from GADT pattern matches. Our approach is complete and decidable, while more liberal than previous such approaches.
The main PDF above is a slightly corrected version of the paper as published by ACM, which is here.
Copyright © 2007 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or firstname.lastname@example.org. The definitive version of this paper can be found at ACM's Digital Library --http://www.acm.org/dl/.