Proving Type Class Laws for Haskell
Preprint, 2016

Type classes in Haskell are used to implement ad-hoc poly- morphism, i.e. a way to ensure both to the programmer and the compiler that a set of functions are defined for a specific data type. All instances of such type classes are expected to behave in a certain way and satisfy laws associated with the respective class. These are however typically just stated in comments and as such, there is no real way to enforce that they hold. In this paper we describe an extension to the inductive theorem prover HipSpec, which allows the user to write down type class laws which are then automatically instantiated and sent to the theorem prover when declaring a new instance of a type class.

Author

Andreas Arvidsson

Chalmers, Computer Science and Engineering (Chalmers)

Moa Johansson

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

Robin Touche

Chalmers, Computer Science and Engineering (Chalmers)

Areas of Advance

Information and Communication Technology

Subject Categories

Computer and Information Science

More information

Created

10/7/2017