
13 Jul
2013
13 Jul
'13
4:10 a.m.
Am 07/12/2013 09:18 AM, schrieb Roman Cheplyaka:
QuickCheck's Gen is a functor. So you can generate a list, and then use fmap to add a hash to it.
instance Arbitrary HashedList where arbitrary = addHashToList <$> arbitrary
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?