HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulefoundation-0.0.30Haskell2010

Foundation.Check

An implementation of a test framework and property expression & testing

  • 5 types
  • 2 classes
  • 14 values
  • Packagefoundation-0.0.30
  • Exports21
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCheck.hs
newtypenewtype Gen a
#

Generator monad

Instances3Monad, Functor, Applicative
  • Monad GenDefined in foundation-0.0.30 · Foundation.Check.Gen
  • Functor GenDefined in foundation-0.0.30 · Foundation.Check.Gen
  • Applicative GenDefined in foundation-0.0.30 · Foundation.Check.Gen
classclass Arbitrary a where
#

How to generate an arbitrary value for a

Methods

Instances34Arbitrary, …

Property

9 declarations
classclass IsProperty p where
#

Methods

Instances5IsProperty
valuepropertyCompare
  1. :: (Show a, Typeable a)
  2. => String

    name of the function used for comparaison, e.g. (<)

  3. -> (a -> a -> Bool)

    function used for value comparaison

  4. -> a

    value left of the operator

  5. -> a

    value right of the operator

  6. -> PropertyCheck
#

A property that check for a specific comparaison of its 2 members.

This is equivalent to === but with compare

valuepropertyCompareWith
  1. :: String

    name of the function used for comparaison, e.g. (<)

  2. -> (a -> a -> Bool)

    function used for value comparaison

  3. -> (a -> String)

    function used to pretty print the values

  4. -> a

    value left of the operator

  5. -> a

    value right of the operator

  6. -> PropertyCheck
#

A property that check for a specific comparaison of its 2 members.

This is equivalent to === but with compare and a given method to pretty print the values.

Check Plan

4 declarations
newtypenewtype Check a
#
Instances5Monad, Functor, Applicative, MonadState, State
  • Monad CheckDefined in foundation-0.0.30 · Foundation.Check.Types
  • Functor CheckDefined in foundation-0.0.30 · Foundation.Check.Types
  • Applicative CheckDefined in foundation-0.0.30 · Foundation.Check.Types
  • MonadState CheckDefined in foundation-0.0.30 · Foundation.Check.Types
  • type State Check = PlanStateDefined in foundation-0.0.30 · Foundation.Check.Types