constrained-generators-0.2.0.0: Framework for generating constrained random data using a subset of first order logic
Safe HaskellSafe-Inferred
LanguageHaskell2010

Constrained.Conformance

Synopsis

Documentation

checkPred ∷ ∀ m. MonadGenError m ⇒ EnvPred → m Bool Source #

Does the Pred evaluate to true under the given Env. If it doesn't, some explanation appears in the failure of the monad m

checkPredsENonEmpty StringEnv → [Pred] → Maybe (NonEmpty String) Source #

Like checkPred, But it takes [Pred] rather than a single Pred, and it builds a much more involved explanation if it fails. Does the Pred evaluate to True under the given Env? If it doesn't, an involved explanation appears in the (Just message) If it does, then it returns Nothing

checkPredEEnvNonEmpty StringPredMaybe (NonEmpty String) Source #

An involved explanation for a single Pred The most important explanations come when an assertion fails.

conformsToSpecE ∷ ∀ a. HasSpec a ⇒ a → Specification a → NonEmpty StringMaybe (NonEmpty String) Source #

conformsToSpec with explanation. Nothing if (conformsToSpec a spec), but (Just explanations) if not(conformsToSpec a spec).

satisfies ∷ ∀ a. HasSpec a ⇒ Term a → Specification a → Pred Source #

monitorSpecTestable p ⇒ Specification a → a → p → Property Source #

Collect the monitor calls from a specification instantiated to the given value. Typically,

quickCheck $ forAll (genFromSpec spec) $ \ x -> monitorSpec spec x $ ...

monitorPred ∷ ∀ m. MonadGenError m ⇒ EnvPred → m (PropertyProperty) Source #

Orphan instances