A new Type-Class solver for Coq in Elpi - Inria - Institut national de recherche en sciences et technologies du numérique
Communication Dans Un Congrès Année : 2023

A new Type-Class solver for Coq in Elpi

Résumé

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
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

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

Licence

Identifiants

  • HAL Id : hal-04467855 , version 1

Citer

Davide Fissore, Enrico Tassi. A new Type-Class solver for Coq in Elpi. The Coq Workshop 2023, Jul 2023, Białystok, Poland. ⟨hal-04467855⟩
55 Consultations
34 Téléchargements

Partager

More