module Test.Predicates.QuickCheck (satisfies) where
import Test.Predicates (Predicate (accept, explain))
import Test.QuickCheck (Property, counterexample)
satisfies :: a -> Predicate a -> Property
a
x satisfies :: a -> Predicate a -> Property
`satisfies` Predicate a
p = String -> Bool -> Property
forall prop. Testable prop => String -> prop -> Property
counterexample (Predicate a -> a -> String
forall a. Predicate a -> a -> String
explain Predicate a
p a
x) (Predicate a -> a -> Bool
forall a. Predicate a -> a -> Bool
accept Predicate a
p a
x)