
15 Jan
2008
15 Jan
'08
12:35 a.m.
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.