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

Constrained.Properties

Description

Useful properties for debugging custom HasSpec instances.

Synopsis

Documentation

forAllSpecShow ∷ (HasSpec fn a, Testable p) ⇒ Specification fn a → (a → String) → (a → p) → Property Source #

forAllSpec ∷ (HasSpec fn a, Testable p) ⇒ Specification fn a → (a → p) → Property Source #

forAllSpecDiscard ∷ (HasSpec fn a, Testable p) ⇒ Specification fn a → (a → p) → Property Source #

prop_completeHasSpec fn a ⇒ Specification fn a → Property Source #

`prop_complete ps` assumes that ps is satisfiable

prop_conformEmpty ∷ ∀ fn a. HasSpec fn a ⇒ a → Property Source #

prop_gen_sound ∷ ∀ fn a. HasSpec fn a ⇒ Specification fn a → Property Source #

showCtxWith ∷ ∀ fn as b. (Typeable as, TypeList as, All (HasSpec fn) as, HasSpec fn b) ⇒ fn as b → TestableCtx fn as → String Source #

data TestableFn fn where Source #

Constructors

TestableFn ∷ (All (HasSpec fn) as, TypeList as, HasSpec fn b, Typeable as, Arbitrary (Specification fn b), Typeable (FunTy as b)) ⇒ fn as b → TestableFn fn 

Instances

Instances details
fn ~ BaseFnArbitrary (TestableFn fn) Source # 
Instance details

Defined in Constrained.Properties

BaseUniverse fn ⇒ Show (TestableFn fn) Source # 
Instance details

Defined in Constrained.Properties

data TestableCtx fn as where Source #

Constructors

TestableCtxHasSpec fn a ⇒ ListCtx Value as (HOLE a) → TestableCtx fn as 

Instances

Instances details
(All (HasSpec fn) as, TypeList as) ⇒ Arbitrary (TestableCtx fn as) Source # 
Instance details

Defined in Constrained.Properties

Methods

arbitraryGen (TestableCtx fn as) Source #

shrinkTestableCtx fn as → [TestableCtx fn as] Source #

prop_mapSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ fn '[a] b → Specification fn a → Property Source #

prop_propagateSpecSound ∷ (HasSpec fn a, HasSpec fn b) ⇒ fn '[a] b → b → Property Source #