First-Class Type Classes

  • Authors:
  • Matthieu Sozeau;Nicolas Oury

  • Affiliations:
  • Univ. Paris Sud, CNRS,Laboratoire LRI, UMR 8623,Orsay, F-91405 INRIA Saclay, ProVal, Parc Orsay Université, F-91893;University of Nottingham,

  • Venue:
  • TPHOLs '08 Proceedings of the 21st International Conference on Theorem Proving in Higher Order Logics
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type Classes have met a large success in Haskelland Isabelle, as a solution for sharing notations by overloading and for specifying with abstract structures by quantification on contexts. However, both systems are limited by second-class implementations of these constructs, and these limitations are only overcomed by ad-hoc extensions to the respective systems. We propose an embedding of type classes into a dependent type theory that is first-class and supports some of the most popular extensions right away. The implementation is correspondingly cheap, general and integrates well inside the system, as we have experimented in Coq. We show how it can be used to help structured programming and proving by way of examples.