module Test.QuickCheck.DynamicLogic.Utils where

import Test.QuickCheck
import Test.QuickCheck.Property

withSize :: Testable prop => (Int -> prop) -> Property
withSize :: (Int -> prop) -> Property
withSize Int -> prop
f = Gen Prop -> Property
MkProperty (Gen Prop -> Property)
-> ((Int -> Gen Prop) -> Gen Prop) -> (Int -> Gen Prop) -> Property
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Gen Prop) -> Gen Prop
forall a. (Int -> Gen a) -> Gen a
sized ((Int -> Gen Prop) -> Property) -> (Int -> Gen Prop) -> Property
forall a b. (a -> b) -> a -> b
$ Property -> Gen Prop
unProperty (Property -> Gen Prop) -> (Int -> Property) -> Int -> Gen Prop
forall b c a. (b -> c) -> (a -> b) -> a -> c
. prop -> Property
forall prop. Testable prop => prop -> Property
property (prop -> Property) -> (Int -> prop) -> Int -> Property
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> prop
f