[Haskell-cafe] QuickCheck properties: export or not?

David Benbennick dbenbenn at gmail.com
Tue Jan 15 00:35:21 EST 2008


I think that type classes with nontrivial requirements should export
QuickCheck properties that test those requirements.  For example, the
Data.Monoid module
(http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Monoid.html)
could export properties that check the monoid laws (for an Arbitrary
Monoid with Eq).  That would serve as a formal specification of the
requirements, and allow any user to check that their implementation is
right.

-- 
I'm doing Science and I'm still alive.


More information about the Haskell-Cafe mailing list