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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulequickcheck-dynamic-4.0.1Haskell2010

Test.QuickCheck.StateModel.Variables

Synopsis
newtypenewtype Var a

A symbolic variable for a value of type a

Instances5Eq, Data, Ord, Show, HasVariables
  • Eq (Var a)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • Data a => Data (Var a)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • Ord (Var a)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • Show (Var a)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • Typeable a => HasVariables (Var a)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
datadata Any (f :: Type -> Type) where
#

Constructors

Instances4Eq, Ord, Show, HasVariables
  • Eq (Any f)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • (forall a. Ord (f a)) => Ord (Any f)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • (forall a. Show (Action state a)) => Show (Any (Action state))Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel
  • (forall a. HasVariables (f a)) => HasVariables (Any f)Defined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
classclass HasVariables a where

This type class gives you a way to get all the symbolic variables that appear in a value.

Methods

Instances17HasVariables, …
newtypenewtype VarContext
#
Instances3Show, Semigroup, Monoid
  • Show VarContextDefined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • Semigroup VarContextDefined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
  • Monoid VarContextDefined in quickcheck-dynamic-4.0.1 · Test.QuickCheck.StateModel.Variables
valuemkVar :: Int -> Var a

Create a fresh symbolic variable with given identifier. While Vars are usually created by action generators, this function can be used for example to create a Var in the initialState of a StateModel. A good default value for the identifier is '-1' as this will not be generated otherwise.