leancheck-0.6.6: Cholesterol-free property-based testing

Test.LeanCheck.Basic

Contents

Description

This module is part of LeanCheck, a simple enumerative property-based testing library.

This module exports Test.LeanCheck.Core along with:

• support for Listable 6-tuples up to 12-tuples;
• tiers constructors (consN) with arities from 6 up to 12;
• a Listable Ratio instance (consequently Listable Rational);
• a Listable Word instance;
• the operators addWeight and ofWeight.

Test.LeanCheck already exports everything from this module. You are probably better off importing it.

You should only import Test.LeanCheck.Basic if you only want the above basic functionality.

Synopsis

# Documentation

cons6 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f) => (a -> b -> c -> d -> e -> f -> g) -> [[g]] Source #

cons7 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g) => (a -> b -> c -> d -> e -> f -> g -> h) -> [[h]] Source #

cons8 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h) => (a -> b -> c -> d -> e -> f -> g -> h -> i) -> [[i]] Source #

cons9 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> [[j]] Source #

cons10 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i, Listable j) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> [[k]] Source #

cons11 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i, Listable j, Listable k) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> [[l]] Source #

cons12 :: (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i, Listable j, Listable k, Listable l) => (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> [[m]] Source #

ofWeight :: [[a]] -> Int -> [[a]] Source #

Resets the weight of a constructor (or tiers) Typically used as an infix constructor when defining Listable instances:

cons<N> ofWeight <W>

Be careful: do not apply ofWeight 0 to recursive data structure constructors. In general this will make the list of size 0 infinite, breaking the tier invariant (each tier must be finite).

ofWeight is closely related to reset.

addWeight :: [[a]] -> Int -> [[a]] Source #

Adds to the weight of tiers of a constructor

addWeight is closely related to delay.

# Orphan instances

 Source # Methodstiers :: [[Word]] Source #list :: [Word] Source # (Integral a, Listable a) => Listable (Ratio a) Source # Methodstiers :: [[Ratio a]] Source #list :: [Ratio a] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f) => Listable (a, b, c, d, e, f) Source # Methodstiers :: [[(a, b, c, d, e, f)]] Source #list :: [(a, b, c, d, e, f)] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g) => Listable (a, b, c, d, e, f, g) Source # Methodstiers :: [[(a, b, c, d, e, f, g)]] Source #list :: [(a, b, c, d, e, f, g)] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h) => Listable (a, b, c, d, e, f, g, h) Source # Methodstiers :: [[(a, b, c, d, e, f, g, h)]] Source #list :: [(a, b, c, d, e, f, g, h)] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i) => Listable (a, b, c, d, e, f, g, h, i) Source # Methodstiers :: [[(a, b, c, d, e, f, g, h, i)]] Source #list :: [(a, b, c, d, e, f, g, h, i)] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i, Listable j) => Listable (a, b, c, d, e, f, g, h, i, j) Source # Methodstiers :: [[(a, b, c, d, e, f, g, h, i, j)]] Source #list :: [(a, b, c, d, e, f, g, h, i, j)] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i, Listable j, Listable k) => Listable (a, b, c, d, e, f, g, h, i, j, k) Source # Methodstiers :: [[(a, b, c, d, e, f, g, h, i, j, k)]] Source #list :: [(a, b, c, d, e, f, g, h, i, j, k)] Source # (Listable a, Listable b, Listable c, Listable d, Listable e, Listable f, Listable g, Listable h, Listable i, Listable j, Listable k, Listable l) => Listable (a, b, c, d, e, f, g, h, i, j, k, l) Source # Methodstiers :: [[(a, b, c, d, e, f, g, h, i, j, k, l)]] Source #list :: [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #