ACM Sigplan Notices
Publication date:
2009-08-01
Volume:
44
Pages:
341 -
352
ISSN:
0362-1340
Publisher:
ACM Press
Author:
Schrijvers, Tom
Peyton Jones, Simon ; Sulzmann, Martin ; Vytiniotis, Dimitrios ; Hutton, Graham ; Tolmach, Andrew P
Keywords:
Haskell, GADTs, type inference, Science & Technology, Technology, Computer Science, Software Engineering, Computer Science, Algorithms, Languages, Software Engineering
Abstract:
GADTs have proven to be an invaluable language extension, for ensuring data invariants and program correctness among others. 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.