error-or-utils-0.2.0: Utilities using ErrorOr datatype
Safe HaskellNone
LanguageHaskell2010

Data.ErrorOr.Validation

Description

Utilities for data validation

Synopsis

Documentation

(>!) :: (Ord a, Show a) => a -> a -> ErrorOr () infix 4 Source #

(>=!) :: (Ord a, Show a) => a -> a -> ErrorOr () infix 4 Source #

(<!) :: (Ord a, Show a) => a -> a -> ErrorOr () infix 4 Source #

(<=!) :: (Ord a, Show a) => a -> a -> ErrorOr () infix 4 Source #

(=!) :: (Eq a, Show a) => a -> a -> ErrorOr () infix 4 Source #

(/=!) :: (Eq a, Show a) => a -> a -> ErrorOr () infix 4 Source #

approxEqual Source #

Arguments

:: (RealFrac a, Show a) 
=> Double

ratio

-> a 
-> a 
-> ErrorOr () 

Checks the difference of the numbers is less than ratio times the average of the two numbers.

ensureAll :: Show a => (a -> ErrorOr ()) -> [a] -> ErrorOr () Source #

It annotates a failure with the element's show result.