Year: 2023
Type: conference-paper
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.
Source: HAL
Authors: Fissore, Davide, Tassi, Enrico
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W4391980370
