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

Modulequickcheck-classes-base-0.6.2.0Haskell2010

Test.QuickCheck.Classes.Internal

This module is exported, but it is not part of the stable public API and is not subject to PVP. It is used by other modules in quickcheck-classes-base and by modules in the quickcheck-classes library as well. Functions and types in this module are either auxiliary functions that are reused by many different laws tests, or they are compatibility shims that make it possible to build with older versions GHC and transformers.

  • 15 types
  • 23 values

Common Types and Functions

33 declarations
datadata Laws
#

A set of laws associated with a typeclass.

Note: Most of the top-level functions provided by this library have the shape `forall a. (Ctx a) => Proxy a -> Laws`. You can just as easily provide your own Laws in libraries/test suites using regular QuickCheck machinery.

Constructors

newtypenewtype SmallList a
#

Constructors

  • SmallList
    • getSmallList :: [a]
Instances3Eq, Show, Arbitrary
  • Eq a => Eq (SmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show a => Show (SmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary a => Arbitrary (SmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
newtypenewtype VerySmallList a
#

Constructors

  • VerySmallList
    • getVerySmallList :: [a]
Instances5Eq, Show, Semigroup, Monoid, Arbitrary
  • Eq a => Eq (VerySmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show a => Show (VerySmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Semigroup (VerySmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Monoid (VerySmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary a => Arbitrary (VerySmallList a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
newtypenewtype ShowReadPrecedence
#

Constructors

  • ShowReadPrecedence Int
Instances4Eq, Ord, Show, Arbitrary
  • Eq ShowReadPrecedenceDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Ord ShowReadPrecedenceDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show ShowReadPrecedenceDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary ShowReadPrecedenceDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
newtypenewtype Apply (f :: Type -> Type) a
#

Constructors

  • Apply
    • getApply :: f a
Instances5Eq, Show, Semigroup, Monoid, Arbitrary
  • (forall x. Eq x => Eq (f x), Eq a) => Eq (Apply f a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (forall x. Show x => Show (f x), Show a) => Show (Apply f a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (Applicative f, Monoid a) => Semigroup (Apply f a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (Applicative f, Monoid a) => Monoid (Apply f a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (forall x. Arbitrary x => Arbitrary (f x), Arbitrary a) => Arbitrary (Apply f a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
newtypenewtype Apply2 (f :: Type -> Type -> Type) a b
#

Constructors

  • Apply2
    • getApply2 :: f a b
Instances3Eq, Show, Arbitrary
  • (forall x y. (Eq x, Eq y) => Eq (f x y), Eq a, Eq b) => Eq (Apply2 f a b)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (forall x y. (Show x, Show y) => Show (f x y), Show a, Show b) => Show (Apply2 f a b)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (forall x y. (Arbitrary x, Arbitrary y) => Arbitrary (f x y), Arbitrary a, Arbitrary b) => Arbitrary (Apply2 f a b)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata Triple a
#

Constructors

  • Triple a a a
Instances10Functor, Applicative, Foldable, Traversable, Eq1, Show1, …
  • Functor TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Applicative TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Foldable TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Traversable TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Eq1 TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show1 TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary1 TripleDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Eq a => Eq (Triple a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show a => Show (Triple a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary a => Arbitrary (Triple a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata ChooseFirst
#
Instances3Eq, Show, Arbitrary
  • Eq ChooseFirstDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show ChooseFirstDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary ChooseFirstDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata ChooseSecond
#
Instances3Eq, Show, Arbitrary
  • Eq ChooseSecondDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show ChooseSecondDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary ChooseSecondDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata LastNothing
#
Instances3Eq, Show, Arbitrary
  • Eq LastNothingDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show LastNothingDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary LastNothingDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata Bottom a
#

Constructors

  • BottomUndefined
  • BottomValue a
Instances3Eq, Show, Arbitrary
  • Eq a => Eq (Bottom a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show a => Show (Bottom a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary a => Arbitrary (Bottom a)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata LinearEquation
#

Constructors

  • LinearEquation
Instances3Eq, Show, Arbitrary
  • Eq LinearEquationDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show LinearEquationDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary LinearEquationDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata LinearEquationM (m :: Type -> Type)
#

Constructors

  • LinearEquationM (m LinearEquation) (m LinearEquation)
Instances3Eq, Show, Arbitrary
  • (forall x. Eq x => Eq (m x)) => Eq (LinearEquationM m)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (forall a. Show a => Show (m a)) => Show (LinearEquationM m)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • (forall a. Arbitrary a => Arbitrary (m a)) => Arbitrary (LinearEquationM m)Defined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata QuadraticEquation
#

Constructors

  • QuadraticEquation
    • _quadraticEquationQuadratic :: Integer
    • _quadraticEquationLinear :: Integer
    • _quadraticEquationConstant :: Integer
Instances3Eq, Show, Arbitrary
  • Eq QuadraticEquationDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show QuadraticEquationDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary QuadraticEquationDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
datadata LinearEquationTwo
#

Constructors

  • LinearEquationTwo
Instances3Eq, Show, Arbitrary
  • Eq LinearEquationTwoDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Show LinearEquationTwoDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
  • Arbitrary LinearEquationTwoDefined in quickcheck-classes-base-0.6.2.0 · Test.QuickCheck.Classes.Internal
valuenestedEq1
  1. :: (forall x. Eq x => Eq (f x), forall x. Eq x => Eq (g x), Eq a)
  2. => f (g a)
  3. -> f (g a)
  4. -> Bool
#
valueflipPair :: (a, b) -> (b, a)
#
valuereverseTriple :: Triple a -> Triple a
#

Compatibility Shims

5 declarations
valueeq1 :: (forall x. Eq x => Eq (f x), Eq a) => f a -> f a -> Bool
#
valueeq2
  1. :: (forall a1. (Eq a1, Eq b) => Eq (f a1 b), Eq a, Eq b)
  2. => f a b
  3. -> f a b
  4. -> Bool
#
valueeq1_2
  1. :: (forall a. Eq a => Eq (f a), forall a b. (Eq a, Eq b) => Eq (g a b), Eq x, Eq y)
  2. => f (g x y)
  3. -> f (g x y)
  4. -> Bool
#
valuereadMaybe :: Read a => String -> Maybe a
#

Parse a string using the Read instance. Succeeds if there is exactly one valid result.

Example1 expression
readMaybe "123" :: Maybe IntJust 123
Example1 expression
readMaybe "hello" :: Maybe IntNothing