@MISC{Sternagel15derivingclass, author = {Christian Sternagel and Rene ́ Thiemann}, title = {Deriving class instances for datatypes.∗}, year = {2015} }
Share
OpenURL
Abstract
We provide a framework for registering automatic methods to de-rive class instances of datatypes, as it is possible using Haskell’s “de-riving Ord, Show,... ” feature. We further implemented such automatic methods to derive com-parators, linear orders, parametrizable equality functions, and hash-functions which are required in the Isabelle Collection Framework [1] and the Container Framework [2]. Moreover, for the tactic of Blanchette to show that a datatype is countable, we implemented a wrapper so that this tactic becomes accessible in our framework. All of the generators are based on the infrastructure that is provided by the BNF-based datatype package. Our formalization was performed as part of the IsaFoR/CeTA project1 [3]. With our new tactics we could remove several tedious proofs for (conditional) linear orders, and conditional equality operators within