Steffen Mazanek wrote:
Hello,
I want to quickcheck a property on a datatype representing
programs (=[Stmt]) and need to define a specific instance
instance Arbitrary [Stmt]
(mainly to restrict the size of the list).
you don't always need to use instances. for example, I have (where
Predicate is a type I defined which I gave a separate normal Arbitrary
instance)
arbpredicate :: Gen Predicate
arbpredicate = do ...
prop_assocUnify :: Property
prop_assocUnify =
forAll arbpredicate $ \a ->
forAll arbpredicate $ \b ->
forAll arbpredicate $ \c -> ...boolean result
Isaac
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe