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 a, Testable p) ⇒ Specification a → (a → String) → (a → p) → Property Source #

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

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

prop_completeHasSpec a ⇒ Specification a → Property Source #

`prop_complete ps` assumes that ps is satisfiable

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

main ∷ IO () Source #

specTypeSpecification a → String Source #

showCtxWith ∷ ∀ fn as b. AppRequires fn as b ⇒ fn as b → TestableCtx as → String Source #

data TestableFn where Source #

Constructors

TestableFn ∷ (Arbitrary (Specification b), Typeable (FunTy as b), AppRequires t as b) ⇒ t as b → TestableFn 

Instances

Instances details
Arbitrary TestableFn Source # 
Instance details

Defined in Constrained.Properties

Show TestableFn Source # 
Instance details

Defined in Constrained.Properties

Methods

showsPrec ∷ Int → TestableFn → ShowS

showTestableFn → String

showList ∷ [TestableFn] → ShowS

data TestableCtx as where Source #

Constructors

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

Instances

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

Defined in Constrained.Properties

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

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