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

Moduletesting-feat-1.1.1.1Haskell2010

Test.Feat

This module contains a (hopefully) manageable subset of the functionality of Feat. The rest resides only in the Test.Feat.* modules.

  • 2 types
  • 1 class
  • 18 values

Testing driver

4 declarations
datadata Options
#

Basic options for executing a test. Unlike FlexibleOptions this type has Show/Read instances.

Constructors

Instances2Read, Show
  • Read OptionsDefined in testing-feat-1.1.1.1 · Test.Feat.Driver
  • Show OptionsDefined in testing-feat-1.1.1.1 · Test.Feat.Driver
valuedefOptions :: Options
#

60 seconds timeout, maximum size of 100, bound of 100000 tests per size

The type class

11 declarations
datadata Enumerate a
#

A functional enumeration of type t is a partition of t into finite numbered sets. Each part contains values of a certain cost (typically the size of the value).

Instances6Functor, Applicative, Alternative, Sized, Semigroup, Monoid
classclass Typeable a => Enumerable a where
#

Methods

Instances30Enumerable, …
valuec0 :: Sized f => a -> Shareable f a
#

Takes a constructor with arity 0 (a pure value)

Automatic derivation

Accessing data

5 declarations
valueoptimal :: Enumerable a => Enumerate a
#

Memoised enumeration. Note that all cardinalities are kept in memory until your program terminates.

valueindex :: Enumerable a => Integer -> a
#

Index into an enumeration. Mainly used for party tricks (give it a really large number), since usually you want to distinguish values by size.

valueselect :: Enumerable a => Int -> Index -> a
#

A more fine grained version of index that takes a size and an index into the values of that size. select p i is only defined for i within bounds (meaning i < fst (values !! p)).

valuevalues :: Enumerable a => [(Integer, [a])]
#

All values of the enumeration by increasing cost (which is the number of constructors for most types). Also contains the length of each list.

valueuniform :: Enumerable a => Int -> Gen a
#

Compatibility with QuickCheck. Distribution is uniform generator over values bounded by the given size. Typical use: sized uniform.