Equality proofs and deferred type errors: a compiler pearl

  • Authors:
  • Dimitrios Vytiniotis;Simon Peyton Jones;José Pedro Magalhães

  • Affiliations:
  • Microsoft Research, Cambridge, United Kingdom;Microsoft Research, Cambridge, United Kingdom;Utrecht University, Utrecht, Netherlands

  • Venue:
  • Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Glasgow Haskell Compiler is an optimizing compiler that expresses and manipulates first-class equality proofs in its intermediate language. We describe a simple, elegant technique that exploits these equality proofs to support deferred type errors. The technique requires us to treat equality proofs as possibly-divergent terms; we show how to do so without losing either soundness or the zero-overhead cost model that the programmer expects.