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.Function.Listable.FunListable

Contents

Description

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

This module exports a Listable instance for function enumeration by means of a FunListable typeclass (similar to CoListable).

This module does not currently work, it it just a sketch and a stub.

Synopsis

Documentation

class FunListable a where Source #

This typeclass _does not currently work_. It is a stub and a sketch.

FunListable is similar to CoListable but a bit more complex to avoid some repetitions.

Minimal complete definition

funtiers

Methods

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

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

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

Instances
FunListable Bool Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

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

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

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

FunListable Int Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

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

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

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

FunListable () Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: () -> [b] -> Bool Source #

invalidResults :: () -> [b] -> Bool Source #

funtiers :: [[(Int, [b] -> () -> b)]] 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 #

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 #

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 #

FunListable a => FunListable [a] Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

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

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

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

FunListable a => FunListable (Maybe a) Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: Maybe a -> [b] -> Bool Source #

invalidResults :: Maybe a -> [b] -> Bool Source #

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

(FunListable a, FunListable b) => FunListable (Either a b) Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: Either a b -> [b0] -> Bool Source #

invalidResults :: Either a b -> [b0] -> Bool Source #

funtiers :: [[(Int, [b0] -> Either a b -> b0)]] Source #

(FunListable a, FunListable b) => FunListable (a, b) Source # 
Instance details

Defined in Test.LeanCheck.Function.Listable.FunListable

Methods

validResults :: (a, b) -> [b0] -> Bool Source #

invalidResults :: (a, b) -> [b0] -> Bool Source #

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

Orphan instances

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

Methods

tiers :: [[a -> b]] Source #

list :: [a -> b] Source #