HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Modulequickcheck-dynamic-4.0.1Haskell2010

Test.QuickCheck.DynamicLogic.Internal

Contents
  1. Building formulae
  2. Generate Properties
Synopsis
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

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).

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.

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

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.