Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- buildArbAny :: Int -> Q [Dec]
Documentation
buildArbAny :: Int -> Q [Dec] Source #
automatically build functions named buildArbn
where n is an integer
greater than 0. $(buildArbAny 3) creates a function buildArb3 which takes
a constructor that takes 3 parameters, and returns an arbitrary instances
of that constructor. It assumes that the constructors type is an instance
of Arbitrary.
buildArb1 :: Arbitrary a => (a -> b) -> Gen b buildArb1 f = f $ arbitrary
buildArb2 :: (Arbitrary a, Arbitrary a1) => (a1 -> a -> b) -> Gen b buildArb2 f = f $ arbitrary * arbitrary