On Sat, 13 Jul 2013 10:10:39 +0200 martin <[email protected]> wrote:
> This requires HashedList to be a new type, right? So far my code only > used type synonyms. > > Does this mean I have to convert type synonyms into types in order to > use QuickCheck? > > Does this mean I have to "plan for QuickCheck" when I design my types? You can still create your own Gen manually and have several generators for different 'types'. You will need to use 'forAll' combinator to perform the testing like this: data A type ListA = [A] type OtherListA = [A] genListA :: Gen ListA genOtherListA :: Gen OtherListA checkListA :: ListA -> Property checkOtherListA :: OtherListA -> Property prop1 = forAll genListA checkListA prop2 = forAll genOtherListA checkOtherListA -- Aleksey Uymanov <[email protected]> _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
