leancheck-0.7.7: Enumerative property-based testing

Copyright(c) 2015-2018 Rudy Matela
License3-Clause BSD (see the file LICENSE)
MaintainerRudy Matela <rudy@matela.com.br>
Safe HaskellNone
LanguageHaskell2010

Test.LeanCheck.Utils.Types

Contents

Description

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

Types to aid in property-based testing.

Synopsis

Integer types

Small-width integer types to aid in property-based testing. Sometimes it is useful to limit the possibilities of enumerated values when testing polymorphic functions, these types allow that.

The signed integer types IntN are of limited bit width N bounded by -2^(N-1) to 2^(N-1)-1. The unsigned integer types WordN are of limited bit width N bounded by 0 to 2^N-1.

Operations are closed and modulo 2^N. e.g.:

maxBound + 1      = minBound
read "2"          = -2 :: Int2
abs minBound      = minBound
negate n          = 2^N - n :: WordN

newtype Int1 Source #

Single-bit signed integers: -1, 0

Constructors

Int1 

Fields

Instances
Bounded Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Int1 -> Int1 #

pred :: Int1 -> Int1 #

toEnum :: Int -> Int1 #

fromEnum :: Int1 -> Int #

enumFrom :: Int1 -> [Int1] #

enumFromThen :: Int1 -> Int1 -> [Int1] #

enumFromTo :: Int1 -> Int1 -> [Int1] #

enumFromThenTo :: Int1 -> Int1 -> Int1 -> [Int1] #

Eq Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Int1 -> Int1 -> Bool #

(/=) :: Int1 -> Int1 -> Bool #

Integral Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Int1 -> Int1 -> Int1 #

rem :: Int1 -> Int1 -> Int1 #

div :: Int1 -> Int1 -> Int1 #

mod :: Int1 -> Int1 -> Int1 #

quotRem :: Int1 -> Int1 -> (Int1, Int1) #

divMod :: Int1 -> Int1 -> (Int1, Int1) #

toInteger :: Int1 -> Integer #

Num Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Int1 -> Int1 -> Int1 #

(-) :: Int1 -> Int1 -> Int1 #

(*) :: Int1 -> Int1 -> Int1 #

negate :: Int1 -> Int1 #

abs :: Int1 -> Int1 #

signum :: Int1 -> Int1 #

fromInteger :: Integer -> Int1 #

Ord Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Int1 -> Int1 -> Ordering #

(<) :: Int1 -> Int1 -> Bool #

(<=) :: Int1 -> Int1 -> Bool #

(>) :: Int1 -> Int1 -> Bool #

(>=) :: Int1 -> Int1 -> Bool #

max :: Int1 -> Int1 -> Int1 #

min :: Int1 -> Int1 -> Int1 #

Read Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int1 -> Rational #

Show Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int1 -> ShowS #

show :: Int1 -> String #

showList :: [Int1] -> ShowS #

Listable Int1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int1]] Source #

list :: [Int1] Source #

ShowFunction Int1 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Int1 -> [[Binding]] Source #

newtype Int2 Source #

Two-bit signed integers: -2, -1, 0, 1

Constructors

Int2 

Fields

Instances
Bounded Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Int2 -> Int2 #

pred :: Int2 -> Int2 #

toEnum :: Int -> Int2 #

fromEnum :: Int2 -> Int #

enumFrom :: Int2 -> [Int2] #

enumFromThen :: Int2 -> Int2 -> [Int2] #

enumFromTo :: Int2 -> Int2 -> [Int2] #

enumFromThenTo :: Int2 -> Int2 -> Int2 -> [Int2] #

Eq Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Int2 -> Int2 -> Bool #

(/=) :: Int2 -> Int2 -> Bool #

Integral Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Int2 -> Int2 -> Int2 #

rem :: Int2 -> Int2 -> Int2 #

div :: Int2 -> Int2 -> Int2 #

mod :: Int2 -> Int2 -> Int2 #

quotRem :: Int2 -> Int2 -> (Int2, Int2) #

divMod :: Int2 -> Int2 -> (Int2, Int2) #

toInteger :: Int2 -> Integer #

Num Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Int2 -> Int2 -> Int2 #

(-) :: Int2 -> Int2 -> Int2 #

(*) :: Int2 -> Int2 -> Int2 #

negate :: Int2 -> Int2 #

abs :: Int2 -> Int2 #

signum :: Int2 -> Int2 #

fromInteger :: Integer -> Int2 #

Ord Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Int2 -> Int2 -> Ordering #

(<) :: Int2 -> Int2 -> Bool #

(<=) :: Int2 -> Int2 -> Bool #

(>) :: Int2 -> Int2 -> Bool #

(>=) :: Int2 -> Int2 -> Bool #

max :: Int2 -> Int2 -> Int2 #

min :: Int2 -> Int2 -> Int2 #

Read Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int2 -> Rational #

Show Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int2 -> ShowS #

show :: Int2 -> String #

showList :: [Int2] -> ShowS #

Listable Int2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int2]] Source #

list :: [Int2] Source #

ShowFunction Int2 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Int2 -> [[Binding]] Source #

newtype Int3 Source #

Three-bit signed integers: -4, -3, -2, -1, 0, 1, 2, 3

Constructors

Int3 

Fields

Instances
Bounded Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Int3 -> Int3 #

pred :: Int3 -> Int3 #

toEnum :: Int -> Int3 #

fromEnum :: Int3 -> Int #

enumFrom :: Int3 -> [Int3] #

enumFromThen :: Int3 -> Int3 -> [Int3] #

enumFromTo :: Int3 -> Int3 -> [Int3] #

enumFromThenTo :: Int3 -> Int3 -> Int3 -> [Int3] #

Eq Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Int3 -> Int3 -> Bool #

(/=) :: Int3 -> Int3 -> Bool #

Integral Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Int3 -> Int3 -> Int3 #

rem :: Int3 -> Int3 -> Int3 #

div :: Int3 -> Int3 -> Int3 #

mod :: Int3 -> Int3 -> Int3 #

quotRem :: Int3 -> Int3 -> (Int3, Int3) #

divMod :: Int3 -> Int3 -> (Int3, Int3) #

toInteger :: Int3 -> Integer #

Num Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Int3 -> Int3 -> Int3 #

(-) :: Int3 -> Int3 -> Int3 #

(*) :: Int3 -> Int3 -> Int3 #

negate :: Int3 -> Int3 #

abs :: Int3 -> Int3 #

signum :: Int3 -> Int3 #

fromInteger :: Integer -> Int3 #

Ord Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Int3 -> Int3 -> Ordering #

(<) :: Int3 -> Int3 -> Bool #

(<=) :: Int3 -> Int3 -> Bool #

(>) :: Int3 -> Int3 -> Bool #

(>=) :: Int3 -> Int3 -> Bool #

max :: Int3 -> Int3 -> Int3 #

min :: Int3 -> Int3 -> Int3 #

Read Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int3 -> Rational #

Show Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int3 -> ShowS #

show :: Int3 -> String #

showList :: [Int3] -> ShowS #

Listable Int3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int3]] Source #

list :: [Int3] Source #

ShowFunction Int3 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Int3 -> [[Binding]] Source #

newtype Int4 Source #

Four-bit signed integers: -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7

Constructors

Int4 

Fields

Instances
Bounded Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Int4 -> Int4 #

pred :: Int4 -> Int4 #

toEnum :: Int -> Int4 #

fromEnum :: Int4 -> Int #

enumFrom :: Int4 -> [Int4] #

enumFromThen :: Int4 -> Int4 -> [Int4] #

enumFromTo :: Int4 -> Int4 -> [Int4] #

enumFromThenTo :: Int4 -> Int4 -> Int4 -> [Int4] #

Eq Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Int4 -> Int4 -> Bool #

(/=) :: Int4 -> Int4 -> Bool #

Integral Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Int4 -> Int4 -> Int4 #

rem :: Int4 -> Int4 -> Int4 #

div :: Int4 -> Int4 -> Int4 #

mod :: Int4 -> Int4 -> Int4 #

quotRem :: Int4 -> Int4 -> (Int4, Int4) #

divMod :: Int4 -> Int4 -> (Int4, Int4) #

toInteger :: Int4 -> Integer #

Num Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Int4 -> Int4 -> Int4 #

(-) :: Int4 -> Int4 -> Int4 #

(*) :: Int4 -> Int4 -> Int4 #

negate :: Int4 -> Int4 #

abs :: Int4 -> Int4 #

signum :: Int4 -> Int4 #

fromInteger :: Integer -> Int4 #

Ord Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Int4 -> Int4 -> Ordering #

(<) :: Int4 -> Int4 -> Bool #

(<=) :: Int4 -> Int4 -> Bool #

(>) :: Int4 -> Int4 -> Bool #

(>=) :: Int4 -> Int4 -> Bool #

max :: Int4 -> Int4 -> Int4 #

min :: Int4 -> Int4 -> Int4 #

Read Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int4 -> Rational #

Show Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int4 -> ShowS #

show :: Int4 -> String #

showList :: [Int4] -> ShowS #

Listable Int4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int4]] Source #

list :: [Int4] Source #

ShowFunction Int4 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Int4 -> [[Binding]] Source #

newtype Word1 Source #

Single-bit unsigned integer: 0, 1

Constructors

Word1 

Fields

Instances
Bounded Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Word1 -> Word1 -> Bool #

(/=) :: Word1 -> Word1 -> Bool #

Integral Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Word1 -> Word1 -> Ordering #

(<) :: Word1 -> Word1 -> Bool #

(<=) :: Word1 -> Word1 -> Bool #

(>) :: Word1 -> Word1 -> Bool #

(>=) :: Word1 -> Word1 -> Bool #

max :: Word1 -> Word1 -> Word1 #

min :: Word1 -> Word1 -> Word1 #

Read Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word1 -> Rational #

Show Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word1 -> ShowS #

show :: Word1 -> String #

showList :: [Word1] -> ShowS #

Listable Word1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word1]] Source #

list :: [Word1] Source #

ShowFunction Word1 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Word1 -> [[Binding]] Source #

newtype Word2 Source #

Two-bit unsigned integers: 0, 1, 2, 3

Constructors

Word2 

Fields

Instances
Bounded Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Word2 -> Word2 -> Bool #

(/=) :: Word2 -> Word2 -> Bool #

Integral Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Word2 -> Word2 -> Ordering #

(<) :: Word2 -> Word2 -> Bool #

(<=) :: Word2 -> Word2 -> Bool #

(>) :: Word2 -> Word2 -> Bool #

(>=) :: Word2 -> Word2 -> Bool #

max :: Word2 -> Word2 -> Word2 #

min :: Word2 -> Word2 -> Word2 #

Read Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word2 -> Rational #

Show Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word2 -> ShowS #

show :: Word2 -> String #

showList :: [Word2] -> ShowS #

Listable Word2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word2]] Source #

list :: [Word2] Source #

ShowFunction Word2 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Word2 -> [[Binding]] Source #

newtype Word3 Source #

Three-bit unsigned integers: 0, 1, 2, 3, 4, 5, 6, 7

Constructors

Word3 

Fields

Instances
Bounded Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Word3 -> Word3 -> Bool #

(/=) :: Word3 -> Word3 -> Bool #

Integral Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Word3 -> Word3 -> Ordering #

(<) :: Word3 -> Word3 -> Bool #

(<=) :: Word3 -> Word3 -> Bool #

(>) :: Word3 -> Word3 -> Bool #

(>=) :: Word3 -> Word3 -> Bool #

max :: Word3 -> Word3 -> Word3 #

min :: Word3 -> Word3 -> Word3 #

Read Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word3 -> Rational #

Show Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word3 -> ShowS #

show :: Word3 -> String #

showList :: [Word3] -> ShowS #

Listable Word3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word3]] Source #

list :: [Word3] Source #

ShowFunction Word3 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Word3 -> [[Binding]] Source #

newtype Word4 Source #

Four-bit unsigned integers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

Constructors

Word4 

Fields

Instances
Bounded Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Word4 -> Word4 -> Bool #

(/=) :: Word4 -> Word4 -> Bool #

Integral Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Word4 -> Word4 -> Ordering #

(<) :: Word4 -> Word4 -> Bool #

(<=) :: Word4 -> Word4 -> Bool #

(>) :: Word4 -> Word4 -> Bool #

(>=) :: Word4 -> Word4 -> Bool #

max :: Word4 -> Word4 -> Word4 #

min :: Word4 -> Word4 -> Word4 #

Read Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word4 -> Rational #

Show Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word4 -> ShowS #

show :: Word4 -> String #

showList :: [Word4] -> ShowS #

Listable Word4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word4]] Source #

list :: [Word4] Source #

ShowFunction Word4 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Word4 -> [[Binding]] Source #

newtype Nat Source #

Natural numbers (including 0): 0, 1, 2, 3, 4, 5, 6, 7, ...

Internally, this type is represented as an Int. So, it is limited by the maxBound of Int.

Constructors

Nat 

Fields

Instances
Bounded Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

minBound :: Nat #

maxBound :: Nat #

Enum Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat -> Nat #

pred :: Nat -> Nat #

toEnum :: Int -> Nat #

fromEnum :: Nat -> Int #

enumFrom :: Nat -> [Nat] #

enumFromThen :: Nat -> Nat -> [Nat] #

enumFromTo :: Nat -> Nat -> [Nat] #

enumFromThenTo :: Nat -> Nat -> Nat -> [Nat] #

Eq Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat -> Nat -> Bool #

(/=) :: Nat -> Nat -> Bool #

Integral Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat -> Nat -> Nat #

rem :: Nat -> Nat -> Nat #

div :: Nat -> Nat -> Nat #

mod :: Nat -> Nat -> Nat #

quotRem :: Nat -> Nat -> (Nat, Nat) #

divMod :: Nat -> Nat -> (Nat, Nat) #

toInteger :: Nat -> Integer #

Num Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat -> Nat -> Nat #

(-) :: Nat -> Nat -> Nat #

(*) :: Nat -> Nat -> Nat #

negate :: Nat -> Nat #

abs :: Nat -> Nat #

signum :: Nat -> Nat #

fromInteger :: Integer -> Nat #

Ord Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat -> Nat -> Ordering #

(<) :: Nat -> Nat -> Bool #

(<=) :: Nat -> Nat -> Bool #

(>) :: Nat -> Nat -> Bool #

(>=) :: Nat -> Nat -> Bool #

max :: Nat -> Nat -> Nat #

min :: Nat -> Nat -> Nat #

Read Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat -> Rational #

Show Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat -> ShowS #

show :: Nat -> String #

showList :: [Nat] -> ShowS #

Listable Nat Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat]] Source #

list :: [Nat] Source #

FunListable Nat Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: Nat -> [b] -> Bool Source #

invalidResults :: Nat -> [b] -> Bool Source #

funtiers :: [[(Int, [b] -> Nat -> b)]] Source #

CoListable Nat Source # 
Instance details

Defined in Test.LeanCheck.Function.CoListable

Methods

cotiers :: [[b]] -> [[Nat -> b]] Source #

ShowFunction Nat Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat -> [[Binding]] Source #

newtype Nat1 Source #

Natural numbers modulo 1: 0

Constructors

Nat1 

Fields

Instances
Bounded Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat1 -> Nat1 #

pred :: Nat1 -> Nat1 #

toEnum :: Int -> Nat1 #

fromEnum :: Nat1 -> Int #

enumFrom :: Nat1 -> [Nat1] #

enumFromThen :: Nat1 -> Nat1 -> [Nat1] #

enumFromTo :: Nat1 -> Nat1 -> [Nat1] #

enumFromThenTo :: Nat1 -> Nat1 -> Nat1 -> [Nat1] #

Eq Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat1 -> Nat1 -> Bool #

(/=) :: Nat1 -> Nat1 -> Bool #

Integral Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat1 -> Nat1 -> Nat1 #

rem :: Nat1 -> Nat1 -> Nat1 #

div :: Nat1 -> Nat1 -> Nat1 #

mod :: Nat1 -> Nat1 -> Nat1 #

quotRem :: Nat1 -> Nat1 -> (Nat1, Nat1) #

divMod :: Nat1 -> Nat1 -> (Nat1, Nat1) #

toInteger :: Nat1 -> Integer #

Num Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat1 -> Nat1 -> Nat1 #

(-) :: Nat1 -> Nat1 -> Nat1 #

(*) :: Nat1 -> Nat1 -> Nat1 #

negate :: Nat1 -> Nat1 #

abs :: Nat1 -> Nat1 #

signum :: Nat1 -> Nat1 #

fromInteger :: Integer -> Nat1 #

Ord Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat1 -> Nat1 -> Ordering #

(<) :: Nat1 -> Nat1 -> Bool #

(<=) :: Nat1 -> Nat1 -> Bool #

(>) :: Nat1 -> Nat1 -> Bool #

(>=) :: Nat1 -> Nat1 -> Bool #

max :: Nat1 -> Nat1 -> Nat1 #

min :: Nat1 -> Nat1 -> Nat1 #

Read Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat1 -> Rational #

Show Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat1 -> ShowS #

show :: Nat1 -> String #

showList :: [Nat1] -> ShowS #

Listable Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat1]] Source #

list :: [Nat1] Source #

ShowFunction Nat1 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat1 -> [[Binding]] Source #

newtype Nat2 Source #

Natural numbers modulo 2: 0, 1

Constructors

Nat2 

Fields

Instances
Bounded Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat2 -> Nat2 #

pred :: Nat2 -> Nat2 #

toEnum :: Int -> Nat2 #

fromEnum :: Nat2 -> Int #

enumFrom :: Nat2 -> [Nat2] #

enumFromThen :: Nat2 -> Nat2 -> [Nat2] #

enumFromTo :: Nat2 -> Nat2 -> [Nat2] #

enumFromThenTo :: Nat2 -> Nat2 -> Nat2 -> [Nat2] #

Eq Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat2 -> Nat2 -> Bool #

(/=) :: Nat2 -> Nat2 -> Bool #

Integral Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat2 -> Nat2 -> Nat2 #

rem :: Nat2 -> Nat2 -> Nat2 #

div :: Nat2 -> Nat2 -> Nat2 #

mod :: Nat2 -> Nat2 -> Nat2 #

quotRem :: Nat2 -> Nat2 -> (Nat2, Nat2) #

divMod :: Nat2 -> Nat2 -> (Nat2, Nat2) #

toInteger :: Nat2 -> Integer #

Num Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat2 -> Nat2 -> Nat2 #

(-) :: Nat2 -> Nat2 -> Nat2 #

(*) :: Nat2 -> Nat2 -> Nat2 #

negate :: Nat2 -> Nat2 #

abs :: Nat2 -> Nat2 #

signum :: Nat2 -> Nat2 #

fromInteger :: Integer -> Nat2 #

Ord Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat2 -> Nat2 -> Ordering #

(<) :: Nat2 -> Nat2 -> Bool #

(<=) :: Nat2 -> Nat2 -> Bool #

(>) :: Nat2 -> Nat2 -> Bool #

(>=) :: Nat2 -> Nat2 -> Bool #

max :: Nat2 -> Nat2 -> Nat2 #

min :: Nat2 -> Nat2 -> Nat2 #

Read Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat2 -> Rational #

Show Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat2 -> ShowS #

show :: Nat2 -> String #

showList :: [Nat2] -> ShowS #

Listable Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat2]] Source #

list :: [Nat2] Source #

FunListable Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: Nat2 -> [b] -> Bool Source #

invalidResults :: Nat2 -> [b] -> Bool Source #

funtiers :: [[(Int, [b] -> Nat2 -> b)]] Source #

CoListable Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Function.CoListable

Methods

cotiers :: [[b]] -> [[Nat2 -> b]] Source #

ShowFunction Nat2 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat2 -> [[Binding]] Source #

newtype Nat3 Source #

Natural numbers modulo 3: 0, 1, 2

Constructors

Nat3 

Fields

Instances
Bounded Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat3 -> Nat3 #

pred :: Nat3 -> Nat3 #

toEnum :: Int -> Nat3 #

fromEnum :: Nat3 -> Int #

enumFrom :: Nat3 -> [Nat3] #

enumFromThen :: Nat3 -> Nat3 -> [Nat3] #

enumFromTo :: Nat3 -> Nat3 -> [Nat3] #

enumFromThenTo :: Nat3 -> Nat3 -> Nat3 -> [Nat3] #

Eq Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat3 -> Nat3 -> Bool #

(/=) :: Nat3 -> Nat3 -> Bool #

Integral Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat3 -> Nat3 -> Nat3 #

rem :: Nat3 -> Nat3 -> Nat3 #

div :: Nat3 -> Nat3 -> Nat3 #

mod :: Nat3 -> Nat3 -> Nat3 #

quotRem :: Nat3 -> Nat3 -> (Nat3, Nat3) #

divMod :: Nat3 -> Nat3 -> (Nat3, Nat3) #

toInteger :: Nat3 -> Integer #

Num Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat3 -> Nat3 -> Nat3 #

(-) :: Nat3 -> Nat3 -> Nat3 #

(*) :: Nat3 -> Nat3 -> Nat3 #

negate :: Nat3 -> Nat3 #

abs :: Nat3 -> Nat3 #

signum :: Nat3 -> Nat3 #

fromInteger :: Integer -> Nat3 #

Ord Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat3 -> Nat3 -> Ordering #

(<) :: Nat3 -> Nat3 -> Bool #

(<=) :: Nat3 -> Nat3 -> Bool #

(>) :: Nat3 -> Nat3 -> Bool #

(>=) :: Nat3 -> Nat3 -> Bool #

max :: Nat3 -> Nat3 -> Nat3 #

min :: Nat3 -> Nat3 -> Nat3 #

Read Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat3 -> Rational #

Show Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat3 -> ShowS #

show :: Nat3 -> String #

showList :: [Nat3] -> ShowS #

Listable Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat3]] Source #

list :: [Nat3] Source #

FunListable Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: Nat3 -> [b] -> Bool Source #

invalidResults :: Nat3 -> [b] -> Bool Source #

funtiers :: [[(Int, [b] -> Nat3 -> b)]] Source #

CoListable Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Function.CoListable

Methods

cotiers :: [[b]] -> [[Nat3 -> b]] Source #

ShowFunction Nat3 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat3 -> [[Binding]] Source #

newtype Nat4 Source #

Natural numbers modulo 4: 0, 1, 2, 3

Constructors

Nat4 

Fields

Instances
Bounded Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat4 -> Nat4 #

pred :: Nat4 -> Nat4 #

toEnum :: Int -> Nat4 #

fromEnum :: Nat4 -> Int #

enumFrom :: Nat4 -> [Nat4] #

enumFromThen :: Nat4 -> Nat4 -> [Nat4] #

enumFromTo :: Nat4 -> Nat4 -> [Nat4] #

enumFromThenTo :: Nat4 -> Nat4 -> Nat4 -> [Nat4] #

Eq Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat4 -> Nat4 -> Bool #

(/=) :: Nat4 -> Nat4 -> Bool #

Integral Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat4 -> Nat4 -> Nat4 #

rem :: Nat4 -> Nat4 -> Nat4 #

div :: Nat4 -> Nat4 -> Nat4 #

mod :: Nat4 -> Nat4 -> Nat4 #

quotRem :: Nat4 -> Nat4 -> (Nat4, Nat4) #

divMod :: Nat4 -> Nat4 -> (Nat4, Nat4) #

toInteger :: Nat4 -> Integer #

Num Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat4 -> Nat4 -> Nat4 #

(-) :: Nat4 -> Nat4 -> Nat4 #

(*) :: Nat4 -> Nat4 -> Nat4 #

negate :: Nat4 -> Nat4 #

abs :: Nat4 -> Nat4 #

signum :: Nat4 -> Nat4 #

fromInteger :: Integer -> Nat4 #

Ord Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat4 -> Nat4 -> Ordering #

(<) :: Nat4 -> Nat4 -> Bool #

(<=) :: Nat4 -> Nat4 -> Bool #

(>) :: Nat4 -> Nat4 -> Bool #

(>=) :: Nat4 -> Nat4 -> Bool #

max :: Nat4 -> Nat4 -> Nat4 #

min :: Nat4 -> Nat4 -> Nat4 #

Read Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat4 -> Rational #

Show Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat4 -> ShowS #

show :: Nat4 -> String #

showList :: [Nat4] -> ShowS #

Listable Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat4]] Source #

list :: [Nat4] Source #

ShowFunction Nat4 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat4 -> [[Binding]] Source #

newtype Nat5 Source #

Natural numbers modulo 5: 0, 1, 2, 3, 4

Constructors

Nat5 

Fields

Instances
Bounded Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat5 -> Nat5 #

pred :: Nat5 -> Nat5 #

toEnum :: Int -> Nat5 #

fromEnum :: Nat5 -> Int #

enumFrom :: Nat5 -> [Nat5] #

enumFromThen :: Nat5 -> Nat5 -> [Nat5] #

enumFromTo :: Nat5 -> Nat5 -> [Nat5] #

enumFromThenTo :: Nat5 -> Nat5 -> Nat5 -> [Nat5] #

Eq Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat5 -> Nat5 -> Bool #

(/=) :: Nat5 -> Nat5 -> Bool #

Integral Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat5 -> Nat5 -> Nat5 #

rem :: Nat5 -> Nat5 -> Nat5 #

div :: Nat5 -> Nat5 -> Nat5 #

mod :: Nat5 -> Nat5 -> Nat5 #

quotRem :: Nat5 -> Nat5 -> (Nat5, Nat5) #

divMod :: Nat5 -> Nat5 -> (Nat5, Nat5) #

toInteger :: Nat5 -> Integer #

Num Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat5 -> Nat5 -> Nat5 #

(-) :: Nat5 -> Nat5 -> Nat5 #

(*) :: Nat5 -> Nat5 -> Nat5 #

negate :: Nat5 -> Nat5 #

abs :: Nat5 -> Nat5 #

signum :: Nat5 -> Nat5 #

fromInteger :: Integer -> Nat5 #

Ord Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat5 -> Nat5 -> Ordering #

(<) :: Nat5 -> Nat5 -> Bool #

(<=) :: Nat5 -> Nat5 -> Bool #

(>) :: Nat5 -> Nat5 -> Bool #

(>=) :: Nat5 -> Nat5 -> Bool #

max :: Nat5 -> Nat5 -> Nat5 #

min :: Nat5 -> Nat5 -> Nat5 #

Read Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat5 -> Rational #

Show Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat5 -> ShowS #

show :: Nat5 -> String #

showList :: [Nat5] -> ShowS #

Listable Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat5]] Source #

list :: [Nat5] Source #

ShowFunction Nat5 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat5 -> [[Binding]] Source #

newtype Nat6 Source #

Natural numbers modulo 6: 0, 1, 2, 3, 4, 5

Constructors

Nat6 

Fields

Instances
Bounded Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat6 -> Nat6 #

pred :: Nat6 -> Nat6 #

toEnum :: Int -> Nat6 #

fromEnum :: Nat6 -> Int #

enumFrom :: Nat6 -> [Nat6] #

enumFromThen :: Nat6 -> Nat6 -> [Nat6] #

enumFromTo :: Nat6 -> Nat6 -> [Nat6] #

enumFromThenTo :: Nat6 -> Nat6 -> Nat6 -> [Nat6] #

Eq Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat6 -> Nat6 -> Bool #

(/=) :: Nat6 -> Nat6 -> Bool #

Integral Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat6 -> Nat6 -> Nat6 #

rem :: Nat6 -> Nat6 -> Nat6 #

div :: Nat6 -> Nat6 -> Nat6 #

mod :: Nat6 -> Nat6 -> Nat6 #

quotRem :: Nat6 -> Nat6 -> (Nat6, Nat6) #

divMod :: Nat6 -> Nat6 -> (Nat6, Nat6) #

toInteger :: Nat6 -> Integer #

Num Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat6 -> Nat6 -> Nat6 #

(-) :: Nat6 -> Nat6 -> Nat6 #

(*) :: Nat6 -> Nat6 -> Nat6 #

negate :: Nat6 -> Nat6 #

abs :: Nat6 -> Nat6 #

signum :: Nat6 -> Nat6 #

fromInteger :: Integer -> Nat6 #

Ord Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat6 -> Nat6 -> Ordering #

(<) :: Nat6 -> Nat6 -> Bool #

(<=) :: Nat6 -> Nat6 -> Bool #

(>) :: Nat6 -> Nat6 -> Bool #

(>=) :: Nat6 -> Nat6 -> Bool #

max :: Nat6 -> Nat6 -> Nat6 #

min :: Nat6 -> Nat6 -> Nat6 #

Read Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat6 -> Rational #

Show Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat6 -> ShowS #

show :: Nat6 -> String #

showList :: [Nat6] -> ShowS #

Listable Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat6]] Source #

list :: [Nat6] Source #

ShowFunction Nat6 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat6 -> [[Binding]] Source #

newtype Nat7 Source #

Natural numbers modulo 7: 0, 1, 2, 3, 4, 5, 6

Constructors

Nat7 

Fields

Instances
Bounded Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

succ :: Nat7 -> Nat7 #

pred :: Nat7 -> Nat7 #

toEnum :: Int -> Nat7 #

fromEnum :: Nat7 -> Int #

enumFrom :: Nat7 -> [Nat7] #

enumFromThen :: Nat7 -> Nat7 -> [Nat7] #

enumFromTo :: Nat7 -> Nat7 -> [Nat7] #

enumFromThenTo :: Nat7 -> Nat7 -> Nat7 -> [Nat7] #

Eq Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Nat7 -> Nat7 -> Bool #

(/=) :: Nat7 -> Nat7 -> Bool #

Integral Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

quot :: Nat7 -> Nat7 -> Nat7 #

rem :: Nat7 -> Nat7 -> Nat7 #

div :: Nat7 -> Nat7 -> Nat7 #

mod :: Nat7 -> Nat7 -> Nat7 #

quotRem :: Nat7 -> Nat7 -> (Nat7, Nat7) #

divMod :: Nat7 -> Nat7 -> (Nat7, Nat7) #

toInteger :: Nat7 -> Integer #

Num Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(+) :: Nat7 -> Nat7 -> Nat7 #

(-) :: Nat7 -> Nat7 -> Nat7 #

(*) :: Nat7 -> Nat7 -> Nat7 #

negate :: Nat7 -> Nat7 #

abs :: Nat7 -> Nat7 #

signum :: Nat7 -> Nat7 #

fromInteger :: Integer -> Nat7 #

Ord Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Nat7 -> Nat7 -> Ordering #

(<) :: Nat7 -> Nat7 -> Bool #

(<=) :: Nat7 -> Nat7 -> Bool #

(>) :: Nat7 -> Nat7 -> Bool #

(>=) :: Nat7 -> Nat7 -> Bool #

max :: Nat7 -> Nat7 -> Nat7 #

min :: Nat7 -> Nat7 -> Nat7 #

Read Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat7 -> Rational #

Show Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat7 -> ShowS #

show :: Nat7 -> String #

showList :: [Nat7] -> ShowS #

Listable Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat7]] Source #

list :: [Nat7] Source #

ShowFunction Nat7 Source # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

tBindings :: Nat7 -> [[Binding]] Source #

newtype Natural Source #

Natural numbers (including 0): 0, 1, 2, 3, 4, 5, 6, 7, ...

Internally, this type is represented as an Integer allowing for an infinity of possible values.

Its Enum and Listable instances only produce non-negative values. Negatives can still be generated by negate or subtraction.

Constructors

Natural 

Fields

Instances
Enum Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Integral Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Read Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Natural Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Natural]] Source #

list :: [Natural] Source #

Aliases to word types (deprecated)

type UInt1 = Word1 Source #

Deprecated. Use Word1.

type UInt2 = Word2 Source #

Deprecated. Use Word2.

type UInt3 = Word3 Source #

Deprecated. Use Word3.

type UInt4 = Word4 Source #

Deprecated. Use Word4.

Extreme Integers

newtype X a Source #

X type to be wrapped around integer types for an e-X-treme integer enumeration. See the Listable instance for X. Use X when testing properties about overflows and the like:

> check $ \x -> x + 1 > (x :: Int)
+++ OK, passed 200 tests.
> check $ \(X x) -> x + 1 > (x :: Int)
+++ Failed! Falsifiable (after 4 tests):
9223372036854775807

Constructors

X 

Fields

Instances
Eq a => Eq (X a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: X a -> X a -> Bool #

(/=) :: X a -> X a -> Bool #

Ord a => Ord (X a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: X a -> X a -> Ordering #

(<) :: X a -> X a -> Bool #

(<=) :: X a -> X a -> Bool #

(>) :: X a -> X a -> Bool #

(>=) :: X a -> X a -> Bool #

max :: X a -> X a -> X a #

min :: X a -> X a -> X a #

Show a => Show (X a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> X a -> ShowS #

show :: X a -> String #

showList :: [X a] -> ShowS #

(Integral a, Bounded a) => Listable (X a) Source #

Extremily large integers are intercalated with small integers.

list :: [X Int] = map X
  [ 0, 1, -1, maxBound,   minBound
     , 2, -2, maxBound-1, minBound+1
     , 3, -3, maxBound-2, minBound+2
     , ... ]
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[X a]] Source #

list :: [X a] Source #

newtype Xs a Source #

Wrap around lists of integers for an enumeration containing e-X-treme integer values.

> check $ \xs -> all (>=0) xs ==> sum (take 1 xs :: [Int]) <= sum xs
+++ OK, passed 200 tests.
> check $ \(Xs xs) -> all (>=0) xs ==> sum (take 1 xs :: [Int]) <= sum xs
*** Failed! Falsifiable (after 56 tests):
[1,9223372036854775807]

Constructors

Xs [a] 
Instances
Eq a => Eq (Xs a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Xs a -> Xs a -> Bool #

(/=) :: Xs a -> Xs a -> Bool #

Ord a => Ord (Xs a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Xs a -> Xs a -> Ordering #

(<) :: Xs a -> Xs a -> Bool #

(<=) :: Xs a -> Xs a -> Bool #

(>) :: Xs a -> Xs a -> Bool #

(>=) :: Xs a -> Xs a -> Bool #

max :: Xs a -> Xs a -> Xs a #

min :: Xs a -> Xs a -> Xs a #

Read a => Read (Xs a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (Xs a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Xs a -> ShowS #

show :: Xs a -> String #

showList :: [Xs a] -> ShowS #

(Integral a, Bounded a) => Listable (Xs a) Source #

Lists with elements of the X type.

Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Xs a]] Source #

list :: [Xs a] Source #

List-wrapper types

newtype NoDup a Source #

Lists without repeated elements.

> take 6 $ list :: [NoDup Nat]
[NoDup [],NoDup [0],NoDup [1],NoDup [0,1],NoDup [1,0],NoDup [2]]

Example, checking the property that nub is an identity:

import Data.List (nub)
> check $ \xs -> nub xs == (xs :: [Int])
*** Failed! Falsifiable (after 3 tests):
[0,0]
> check $ \(NoDup xs) -> nub xs == (xs :: [Int])
+++ OK, passed 200 tests.

Constructors

NoDup [a] 
Instances
Eq a => Eq (NoDup a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: NoDup a -> NoDup a -> Bool #

(/=) :: NoDup a -> NoDup a -> Bool #

Ord a => Ord (NoDup a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: NoDup a -> NoDup a -> Ordering #

(<) :: NoDup a -> NoDup a -> Bool #

(<=) :: NoDup a -> NoDup a -> Bool #

(>) :: NoDup a -> NoDup a -> Bool #

(>=) :: NoDup a -> NoDup a -> Bool #

max :: NoDup a -> NoDup a -> NoDup a #

min :: NoDup a -> NoDup a -> NoDup a #

Read a => Read (NoDup a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (NoDup a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> NoDup a -> ShowS #

show :: NoDup a -> String #

showList :: [NoDup a] -> ShowS #

Listable a => Listable (NoDup a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[NoDup a]] Source #

list :: [NoDup a] Source #

newtype Bag a Source #

Lists representing bags (multisets). The Listable tiers enumeration will not have repeated bags.

> take 6 (list :: [Bag Nat])
[Bag [],Bag [0],Bag [0,0],Bag [1],Bag [0,0,0],Bag [0,1]]

See also: bagsOf and bagCons.

Constructors

Bag [a] 
Instances
Eq a => Eq (Bag a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Bag a -> Bag a -> Bool #

(/=) :: Bag a -> Bag a -> Bool #

Ord a => Ord (Bag a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Bag a -> Bag a -> Ordering #

(<) :: Bag a -> Bag a -> Bool #

(<=) :: Bag a -> Bag a -> Bool #

(>) :: Bag a -> Bag a -> Bool #

(>=) :: Bag a -> Bag a -> Bool #

max :: Bag a -> Bag a -> Bag a #

min :: Bag a -> Bag a -> Bag a #

Read a => Read (Bag a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (Bag a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Bag a -> ShowS #

show :: Bag a -> String #

showList :: [Bag a] -> ShowS #

Listable a => Listable (Bag a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Bag a]] Source #

list :: [Bag a] Source #

newtype Set a Source #

Lists representing sets. The Listable tiers enumeration will not have repeated sets.

> take 6 (list :: [Set Nat])
[Set [],Set [0],Set [1],Set [0,1],Set [2],Set [0,2]]

Constructors

Set [a] 
Instances
Eq a => Eq (Set a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

Ord a => Ord (Set a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

Read a => Read (Set a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (Set a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Listable a => Listable (Set a) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Set a]] Source #

list :: [Set a] Source #

newtype Map a b Source #

Lists of pairs representing maps. The Listable tiers enumeration will not have repeated maps.

> take 6 (list :: [Map Nat Nat])
[Map [],Map [(0,0)],Map [(0,1)],Map [(1,0)],Map [(0,2)],Map [(1,1)]]

Constructors

Map [(a, b)] 
Instances
(Eq a, Eq b) => Eq (Map a b) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

(==) :: Map a b -> Map a b -> Bool #

(/=) :: Map a b -> Map a b -> Bool #

(Ord a, Ord b) => Ord (Map a b) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

compare :: Map a b -> Map a b -> Ordering #

(<) :: Map a b -> Map a b -> Bool #

(<=) :: Map a b -> Map a b -> Bool #

(>) :: Map a b -> Map a b -> Bool #

(>=) :: Map a b -> Map a b -> Bool #

max :: Map a b -> Map a b -> Map a b #

min :: Map a b -> Map a b -> Map a b #

(Read a, Read b) => Read (Map a b) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

readsPrec :: Int -> ReadS (Map a b) #

readList :: ReadS [Map a b] #

readPrec :: ReadPrec (Map a b) #

readListPrec :: ReadPrec [Map a b] #

(Show a, Show b) => Show (Map a b) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Map a b -> ShowS #

show :: Map a b -> String #

showList :: [Map a b] -> ShowS #

(Listable a, Listable b) => Listable (Map a b) Source # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Map a b]] Source #

list :: [Map a b] Source #