Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Constrained.Properties
Description
Useful properties for debugging custom HasSpec
instances.
Synopsis
- conformsToSpecProp ∷ ∀ a. HasSpec a ⇒ a → Specification a → Property
- forAllSpecShow ∷ (HasSpec a, Testable p) ⇒ Specification a → (a → String) → (a → p) → Property
- forAllSpec ∷ (HasSpec a, Testable p) ⇒ Specification a → (a → p) → Property
- forAllSpecDiscard ∷ (HasSpec a, Testable p) ⇒ Specification a → (a → p) → Property
- prop_sound ∷ HasSpec a ⇒ Specification a → Property
- prop_constrained_satisfies_sound ∷ HasSpec a ⇒ Specification a → Property
- prop_constrained_explained ∷ HasSpec a ⇒ Specification a → Property
- prop_complete ∷ HasSpec a ⇒ Specification a → Property
- prop_constrained_satisfies_complete ∷ HasSpec a ⇒ Specification a → Property
- prop_shrink_sound ∷ HasSpec a ⇒ Specification a → Property
- prop_conformEmpty ∷ ∀ a. HasSpec a ⇒ a → Property
- prop_univSound ∷ TestableFn → Property
- main ∷ IO ()
- prop_gen_sound ∷ ∀ a. HasSpec a ⇒ Specification a → Property
- specType ∷ Specification a → String
- showCtxWith ∷ ∀ fn as b. AppRequires fn as b ⇒ fn as b → TestableCtx as → String
- data TestableFn where
- TestableFn ∷ (Arbitrary (Specification b), Typeable (FunTy as b), AppRequires t as b) ⇒ t as b → TestableFn
- data TestableCtx as where
- TestableCtx ∷ HasSpec a ⇒ ListCtx Value as (HOLE a) → TestableCtx as
- genTestableFn ∷ Gen TestableFn
- prop_mapSpec ∷ (HasSpec a, AppRequires t '[a] b) ⇒ t '[a] b → Specification a → Property
- prop_propagateSpecSound ∷ (HasSpec a, AppRequires t '[a] b) ⇒ t '[a] b → b → Property
Documentation
conformsToSpecProp ∷ ∀ a. HasSpec a ⇒ a → Specification a → Property Source #
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_sound ∷ HasSpec a ⇒ Specification a → Property Source #
prop_complete ∷ HasSpec a ⇒ Specification a → Property Source #
`prop_complete ps` assumes that ps
is satisfiable
prop_shrink_sound ∷ HasSpec a ⇒ Specification a → Property Source #
prop_conformEmpty ∷ ∀ a. HasSpec a ⇒ a → Property Source #
prop_gen_sound ∷ ∀ a. HasSpec a ⇒ Specification a → Property Source #
specType ∷ Specification 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
Arbitrary TestableFn Source # | |
Defined in Constrained.Properties | |
Show TestableFn Source # | |
Defined in Constrained.Properties Methods showsPrec ∷ Int → TestableFn → ShowS show ∷ TestableFn → String showList ∷ [TestableFn] → ShowS |
data TestableCtx as where Source #
Constructors
TestableCtx ∷ HasSpec a ⇒ ListCtx Value as (HOLE a) → TestableCtx as |
Instances
(All HasSpec as, TypeList as) ⇒ Arbitrary (TestableCtx as) Source # | |
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 #