Complete and decidable type inference for GADTs

  • Authors:
  • Tom Schrijvers;Simon Peyton Jones;Martin Sulzmann;Dimitrios Vytiniotis

  • Affiliations:
  • Katholieke Universiteit Leuven, Leuven, Belgium;Microsoft Research, Cambridge, United Kingdom;Intaris Software GmbH, Freiburg, Germany;Microsoft Research, Cambridge, United Kingdom

  • Venue:
  • Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.