Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Useful properties for debugging custom HasSpec
instances.
Synopsis
- forAllSpecShow ∷ (HasSpec fn a, Testable p) ⇒ Specification fn a → (a → String) → (a → p) → Property
- forAllSpec ∷ (HasSpec fn a, Testable p) ⇒ Specification fn a → (a → p) → Property
- forAllSpecDiscard ∷ (HasSpec fn a, Testable p) ⇒ Specification fn a → (a → p) → Property
- prop_sound ∷ HasSpec fn a ⇒ Specification fn a → Property
- prop_constrained_satisfies_sound ∷ HasSpec fn a ⇒ Specification fn a → Property
- prop_complete ∷ HasSpec fn a ⇒ Specification fn a → Property
- prop_constrained_satisfies_complete ∷ HasSpec fn a ⇒ Specification fn a → Property
- prop_shrink_sound ∷ HasSpec fn a ⇒ Specification fn a → Property
- prop_conformEmpty ∷ ∀ fn a. HasSpec fn a ⇒ a → Property
- prop_univSound ∷ ∀ fn. TestableFn fn → Property
- prop_gen_sound ∷ ∀ fn a. HasSpec fn a ⇒ Specification fn a → Property
- specType ∷ Specification fn a → String
- showCtxWith ∷ ∀ fn as b. (Typeable as, TypeList as, All (HasSpec fn) as, HasSpec fn b) ⇒ fn as b → TestableCtx fn as → String
- data TestableFn fn where
- 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
- data TestableCtx fn as where
- TestableCtx ∷ HasSpec fn a ⇒ ListCtx Value as (HOLE a) → TestableCtx fn as
- prop_mapSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ fn '[a] b → Specification fn a → Property
- prop_propagateSpecSound ∷ (HasSpec fn a, HasSpec fn b) ⇒ fn '[a] b → b → Property
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_sound ∷ HasSpec fn a ⇒ Specification fn a → Property Source #
prop_constrained_satisfies_sound ∷ HasSpec fn a ⇒ Specification fn a → Property Source #
prop_complete ∷ HasSpec fn a ⇒ Specification fn a → Property Source #
`prop_complete ps` assumes that ps
is satisfiable
prop_constrained_satisfies_complete ∷ HasSpec fn a ⇒ Specification fn a → Property Source #
prop_shrink_sound ∷ HasSpec fn a ⇒ Specification fn a → Property Source #
prop_conformEmpty ∷ ∀ fn a. HasSpec fn a ⇒ a → Property Source #
prop_univSound ∷ ∀ fn. TestableFn fn → Property Source #
prop_gen_sound ∷ ∀ fn a. HasSpec fn a ⇒ Specification fn a → Property Source #
specType ∷ Specification fn a → String 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 #
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
fn ~ BaseFn ⇒ Arbitrary (TestableFn fn) Source # | |
Defined in Constrained.Properties arbitrary ∷ Gen (TestableFn fn) Source # shrink ∷ TestableFn fn → [TestableFn fn] Source # | |
BaseUniverse fn ⇒ Show (TestableFn fn) Source # | |
Defined in Constrained.Properties |
data TestableCtx fn as where Source #
TestableCtx ∷ HasSpec fn a ⇒ ListCtx Value as (HOLE a) → TestableCtx fn as |
Instances
(All (HasSpec fn) as, TypeList as) ⇒ Arbitrary (TestableCtx fn as) Source # | |
Defined in Constrained.Properties arbitrary ∷ Gen (TestableCtx fn as) Source # shrink ∷ TestableCtx fn as → [TestableCtx fn as] Source # |
prop_mapSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ fn '[a] b → Specification fn a → Property Source #