HORIZON HASKELLDocslts/ghc-10.0.xc62e4de2026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · c62e4de · 2026-10-19

Modulequickcheck-dynamic-4.0.1Haskell2010

Test.QuickCheck.DynamicLogic.Internal

  • 11 types
  • 1 class
  • 72 values
datadata DynLogic s
#

Base Dynamic logic formulae language. Formulae are parameterised over the type of state s to which they apply. A DynLogic value cannot be constructed directly, one has to use the various "smart constructors" provided, see the Building formulae section.

Constructors

Building formulae

40 declarations
valueignore :: DynFormula s
#

Ignore this formula, i.e. backtrack and try something else. forAllScripts ignore (const True) will discard all test cases (equivalent to False ==> True).

value(|||) :: DynFormula s -> DynFormula s -> DynFormula s
#

Disjunction for DL formulae. Is True if either formula is True. The choice is angelic, ie. it is always made by the "caller". This is mostly important in case a test is Stuck.

valueforAllQ
  1. :: Quantifiable q
  2. => q
  3. -> Quantifies q -> DynFormula s
  4. -> DynFormula s
#

First-order quantification of variables. Formula f is True iff. it is True for all possible values of q. The underlying framework will generate values of q and check the formula holds for those values. Quantifiable values are thus values that can be generated and checked and the Test.QuickCheck.DynamicLogic.Quantify module defines basic combinators to build those from building blocks.

valueweight :: Double -> DynFormula s -> DynFormula s
#

Adjust weight for selecting formula. This is mostly useful in relation with (|||) combinator, in order to tweak the priority for generating the next step(s) of the test that matches the formula.

valuemonitorDL :: (Property -> Property) -> DynFormula s -> DynFormula s
#

Embed QuickCheck's monitoring functions (eg. label, tabulate) in a formula. This is useful to improve the reporting from test execution, esp. in the case of failures.

valuealways :: (Annotated s -> DynFormula s) -> Annotated s -> DynFormula s
#

Formula should hold at any state. In effect this leads to exploring alternatives from a given state s and ensuring formula holds in all those states.

datadata FailingAction s
#

Constructors

Instances3Eq, Show, HasVariables
datadata Witnesses r where
#

Constructors

Instances5Functor, Foldable, Traversable, Eq, Show
  • Functor WitnessesDefined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.DynamicLogic.Internal
  • Foldable WitnessesDefined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.DynamicLogic.Internal
  • Traversable WitnessesDefined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.DynamicLogic.Internal
  • Eq r => Eq (Witnesses r)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.DynamicLogic.Internal
  • Show r => Show (Witnesses r)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.DynamicLogic.Internal
classclass StateModel s => DynLogicModel s where
#

Restricted calls are not generated by AfterAny; they are included in tests explicitly using After in order to check specific properties at controlled times, so they are likely to fail if invoked at other times.

Methods

Generate Properties

46 declarations

Validate generated test case.

Test case generation does not always produce a valid test case. In some cases, we did not find a suitable test case matching some DynFormula and we are Stuck, hence we want to discard the test case and start over ; in other cases we found a genuine issue with the formula leading to the impossibility of producing a valid test case.