leancheck-0.8.0: 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 #

Single-bit signed integers: -1, 0

Constructors

Int1 

Fields

Instances
Bounded Int1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int1 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Int1 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int1 -> Rational #

Show Int1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int1 -> ShowS #

show :: Int1 -> String #

showList :: [Int1] -> ShowS #

Listable Int1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int1]] #

list :: [Int1] #

ShowFunction Int1 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Int1 -> [[Binding]] #

newtype Int2 #

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

Constructors

Int2 

Fields

Instances
Bounded Int2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int2 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Int2 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int2 -> Rational #

Show Int2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int2 -> ShowS #

show :: Int2 -> String #

showList :: [Int2] -> ShowS #

Listable Int2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int2]] #

list :: [Int2] #

ShowFunction Int2 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Int2 -> [[Binding]] #

newtype Int3 #

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

Constructors

Int3 

Fields

Instances
Bounded Int3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int3 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Int3 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int3 -> Rational #

Show Int3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int3 -> ShowS #

show :: Int3 -> String #

showList :: [Int3] -> ShowS #

Listable Int3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int3]] #

list :: [Int3] #

ShowFunction Int3 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Int3 -> [[Binding]] #

newtype Int4 #

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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Int4 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Int4 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Int4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Int4 -> Rational #

Show Int4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Int4 -> ShowS #

show :: Int4 -> String #

showList :: [Int4] -> ShowS #

Listable Int4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Int4]] #

list :: [Int4] #

ShowFunction Int4 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Int4 -> [[Binding]] #

newtype Word1 #

Single-bit unsigned integer: 0, 1

Constructors

Word1 

Fields

Instances
Bounded Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word1 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word1 -> Rational #

Show Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word1 -> ShowS #

show :: Word1 -> String #

showList :: [Word1] -> ShowS #

Listable Word1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word1]] #

list :: [Word1] #

ShowFunction Word1 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Word1 -> [[Binding]] #

newtype Word2 #

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

Constructors

Word2 

Fields

Instances
Bounded Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word2 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word2 -> Rational #

Show Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word2 -> ShowS #

show :: Word2 -> String #

showList :: [Word2] -> ShowS #

Listable Word2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word2]] #

list :: [Word2] #

ShowFunction Word2 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Word2 -> [[Binding]] #

newtype Word3 #

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

Constructors

Word3 

Fields

Instances
Bounded Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word3 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word3 -> Rational #

Show Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word3 -> ShowS #

show :: Word3 -> String #

showList :: [Word3] -> ShowS #

Listable Word3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word3]] #

list :: [Word3] #

ShowFunction Word3 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Word3 -> [[Binding]] #

newtype Word4 #

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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Word4 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Word4 -> Rational #

Show Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Word4 -> ShowS #

show :: Word4 -> String #

showList :: [Word4] -> ShowS #

Listable Word4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Word4]] #

list :: [Word4] #

ShowFunction Word4 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Word4 -> [[Binding]] #

newtype Nat #

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.

Its Enum, Listable and Num instances only produce non-negative values. When x < y then x - y = 0.

Constructors

Nat 

Fields

Instances
Bounded Nat # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

minBound :: Nat #

maxBound :: Nat #

Enum Nat # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat -> Rational #

Show Nat # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat -> ShowS #

show :: Nat -> String #

showList :: [Nat] -> ShowS #

Listable Nat # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat]] #

list :: [Nat] #

ShowFunction Nat # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat -> [[Binding]] #

newtype Nat1 #

Natural numbers modulo 1: 0

Constructors

Nat1 

Fields

Instances
Bounded Nat1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat1 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat1 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat1 -> Rational #

Show Nat1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat1 -> ShowS #

show :: Nat1 -> String #

showList :: [Nat1] -> ShowS #

Listable Nat1 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat1]] #

list :: [Nat1] #

ShowFunction Nat1 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat1 -> [[Binding]] #

newtype Nat2 #

Natural numbers modulo 2: 0, 1

Constructors

Nat2 

Fields

Instances
Bounded Nat2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat2 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat2 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat2 -> Rational #

Show Nat2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat2 -> ShowS #

show :: Nat2 -> String #

showList :: [Nat2] -> ShowS #

Listable Nat2 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat2]] #

list :: [Nat2] #

ShowFunction Nat2 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat2 -> [[Binding]] #

newtype Nat3 #

Natural numbers modulo 3: 0, 1, 2

Constructors

Nat3 

Fields

Instances
Bounded Nat3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat3 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat3 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat3 -> Rational #

Show Nat3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat3 -> ShowS #

show :: Nat3 -> String #

showList :: [Nat3] -> ShowS #

Listable Nat3 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat3]] #

list :: [Nat3] #

ShowFunction Nat3 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat3 -> [[Binding]] #

newtype Nat4 #

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

Constructors

Nat4 

Fields

Instances
Bounded Nat4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat4 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat4 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat4 -> Rational #

Show Nat4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat4 -> ShowS #

show :: Nat4 -> String #

showList :: [Nat4] -> ShowS #

Listable Nat4 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat4]] #

list :: [Nat4] #

ShowFunction Nat4 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat4 -> [[Binding]] #

newtype Nat5 #

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

Constructors

Nat5 

Fields

Instances
Bounded Nat5 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat5 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat5 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat5 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat5 -> Rational #

Show Nat5 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat5 -> ShowS #

show :: Nat5 -> String #

showList :: [Nat5] -> ShowS #

Listable Nat5 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat5]] #

list :: [Nat5] #

ShowFunction Nat5 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat5 -> [[Binding]] #

newtype Nat6 #

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

Constructors

Nat6 

Fields

Instances
Bounded Nat6 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat6 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat6 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat6 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat6 -> Rational #

Show Nat6 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat6 -> ShowS #

show :: Nat6 -> String #

showList :: [Nat6] -> ShowS #

Listable Nat6 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat6]] #

list :: [Nat6] #

ShowFunction Nat6 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat6 -> [[Binding]] #

newtype Nat7 #

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

Constructors

Nat7 

Fields

Instances
Bounded Nat7 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Enum Nat7 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Nat7 # 
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 # 
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 # 
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 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Nat7 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

toRational :: Nat7 -> Rational #

Show Nat7 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Nat7 -> ShowS #

show :: Nat7 -> String #

showList :: [Nat7] -> ShowS #

Listable Nat7 # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Nat7]] #

list :: [Nat7] #

ShowFunction Nat7 # 
Instance details

Defined in Test.LeanCheck.Function.ShowFunction

Methods

bindtiers :: Nat7 -> [[Binding]] #

newtype Natural #

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, Listable and Num instances only produce non-negative values. When x < y then x - y = 0.

Constructors

Natural 

Fields

Instances
Enum Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Eq Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Integral Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Num Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Ord Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Read Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Real Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Natural # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Natural]] #

list :: [Natural] #

Aliases to word types (deprecated)

type UInt1 = Word1 #

Deprecated. Use Word1.

type UInt2 = Word2 #

Deprecated. Use Word2.

type UInt3 = Word3 #

Deprecated. Use Word3.

type UInt4 = Word4 #

Deprecated. Use Word4.

Extreme Integers

newtype X a #

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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Ord a => Ord (X a) # 
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) # 
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) #

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]] #

list :: [X a] #

newtype Xs a #

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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Ord a => Ord (Xs a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (Xs a) # 
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) #

Lists with elements of the X type.

Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Xs a]] #

list :: [Xs a] #

List-wrapper types

newtype NoDup a #

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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Ord a => Ord (NoDup a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (NoDup a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[NoDup a]] #

list :: [NoDup a] #

newtype Bag a #

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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Ord a => Ord (Bag a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (Bag a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Bag a]] #

list :: [Bag a] #

newtype Set a #

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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

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

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

Ord a => Ord (Set a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Show a => Show (Set a) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Set a]] #

list :: [Set a] #

newtype Map a b #

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) # 
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) # 
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) # 
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) # 
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) # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Map a b]] #

list :: [Map a b] #

Character types

data Space #

Constructors

Space 

Fields

Instances
Show Space # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Space -> ShowS #

show :: Space -> String #

showList :: [Space] -> ShowS #

Listable Space # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Space]] #

list :: [Space] #

data Lower #

Constructors

Lower 

Fields

Instances
Show Lower # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Lower -> ShowS #

show :: Lower -> String #

showList :: [Lower] -> ShowS #

Listable Lower # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Lower]] #

list :: [Lower] #

data Upper #

Constructors

Upper 

Fields

Instances
Show Upper # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Upper -> ShowS #

show :: Upper -> String #

showList :: [Upper] -> ShowS #

Listable Upper # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Upper]] #

list :: [Upper] #

data Alpha #

Constructors

Alpha 

Fields

Instances
Show Alpha # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Alpha -> ShowS #

show :: Alpha -> String #

showList :: [Alpha] -> ShowS #

Listable Alpha # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Alpha]] #

list :: [Alpha] #

data Digit #

Constructors

Digit 

Fields

Instances
Show Digit # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

showsPrec :: Int -> Digit -> ShowS #

show :: Digit -> String #

showList :: [Digit] -> ShowS #

Listable Digit # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Digit]] #

list :: [Digit] #

data AlphaNum #

Constructors

AlphaNum 

Fields

Instances
Show AlphaNum # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable AlphaNum # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[AlphaNum]] #

list :: [AlphaNum] #

data Letter #

Constructors

Letter 

Fields

Instances
Show Letter # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Letter # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Letter]] #

list :: [Letter] #

String types

data Spaces #

Constructors

Spaces 

Fields

Instances
Show Spaces # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Spaces # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Spaces]] #

list :: [Spaces] #

data Lowers #

Constructors

Lowers 

Fields

Instances
Show Lowers # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Lowers # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Lowers]] #

list :: [Lowers] #

data Uppers #

Constructors

Uppers 

Fields

Instances
Show Uppers # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Uppers # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Uppers]] #

list :: [Uppers] #

data Alphas #

Constructors

Alphas 

Fields

Instances
Show Alphas # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Alphas # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Alphas]] #

list :: [Alphas] #

data Digits #

Constructors

Digits 

Fields

Instances
Show Digits # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Digits # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Digits]] #

list :: [Digits] #

data AlphaNums #

Constructors

AlphaNums 

Fields

Instances
Show AlphaNums # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable AlphaNums # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[AlphaNums]] #

list :: [AlphaNums] #

data Letters #

Constructors

Letters 

Fields

Instances
Show Letters # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Listable Letters # 
Instance details

Defined in Test.LeanCheck.Utils.Types

Methods

tiers :: [[Letters]] #

list :: [Letters] #