HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

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.

Contents
  1. Testing driver
  2. The type class
  3. Automatic derivation
  4. Accessing data
Synopsis

Testing driver

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

The type class

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, …

Automatic derivation

Accessing data

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.