A new Type-Class solver for Coq in Elpi - Inria - Institut national de recherche en sciences et technologies du numérique
Conference Papers Year : 2023

A new Type-Class solver for Coq in Elpi

Abstract

Type classes [6] were first introduced in the Haskell language as a way to implement ad-hoc polymorphism, i.e. symbol overloading. The Haskell compiler synthesizes the appropriate implementation for the overloaded symbol by looking at the types of its arguments and by composing user-provided implementations for atomic types and type formers. We call the software component in charge of this synthesis the type class solver. Type classes soon were introduced in Coq version 8.2, 15 years ago, by Sozeau and Oury [5]. Given the expressiveness of the language, Coq type classes not only relate a type to some operations, but also give them a specification. For example the Eq type class below links a type T to a boolean function eqb which is proved to be correct.
Fichier principal
Vignette du fichier
coq2023_TC-elpi.pdf (202.59 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04467855 , version 1 (20-02-2024)

Licence

Identifiers

  • HAL Id : hal-04467855 , version 1

Cite

Davide Fissore, Enrico Tassi. A new Type-Class solver for Coq in Elpi. The Coq Workshop 2023, Jul 2023, Białystok, Poland. ⟨hal-04467855⟩
50 View
30 Download

Share

More