Stating and checking laws for type class methods

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by Patrik Jansson and Johan Jeuring
Maintained by

The specification of a class in Haskell often starts with stating, in text, the laws that should be satisfied by methods defined in instances of the class, followed by the type of the methods of the class. The ClassLaws library is a framework that supports testing such class laws using QuickCheck. Our framework is a light-weight class law testing framework, which requires a limited amount of work per class law, and per datatype for which the class law is tested. We also show how to test class laws with partially-defined values. Using partially-defined values, we show that the standard lazy and strict implementations of the state monad do not satisfy the expected laws. More information can be found at Built with ghc-7.4.2 and ghc-7.6.1. (Fails to build with ghc-7.2.2 due to Could be worked around.)

Depends on 4 packages:
Used by 1 package:
comments powered byDisqus