leancheck-0.6.3: Cholesterol-free property-based testing

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

Test.LeanCheck.Error

Description

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

This module re-exports Test.LeanCheck but some test functions have been specialized to catch errors (see the explicit export list below).

This module is unsafe as it uses unsafePerformIO to catch errors.

Synopsis

Documentation

holds :: Testable a => Int -> a -> Bool Source #

fails :: Testable a => Int -> a -> Bool Source #

exists :: Testable a => Int -> a -> Bool Source #

witness :: Testable a => Int -> a -> Maybe [String] Source #

witnesses :: Testable a => Int -> a -> [[String]] Source #

results :: Testable a => a -> [([String], Bool)] Source #

fromError :: a -> a -> a Source #

errorToNothing :: a -> Maybe a Source #

Transforms a value into Just that value or Nothing on some errors:

  • ArithException
  • ArrayException
  • ErrorCall
  • PatternMatchFail

anyErrorToNothing :: a -> Maybe a Source #

Transforms a value into Just that value or Nothing on error.