Module

Data.Refined.Predicate

#Predicate

class Predicate p x  where

Members

Instances

#IdPred

data IdPred

A 'Predicate' for which everything is valid

Instances

#And

data And l r

A 'Predicate' ensuring that both given Predicates are valid

Instances

#Or

data Or l r

A 'Predicate' ensuring that one of two given Predicates is valid

Instances

#SizeEqualTo

data SizeEqualTo a

A 'Predicate' ensuring that the length of a foldable is equal to a given int

Instances

#SizeGreaterThan

data SizeGreaterThan a

A 'Predicate' ensuring that the length of a foldable is greater than a given int

Instances

#SizeLessThan

data SizeLessThan a

A 'Predicate' ensuring that the length of a foldable is less than a given int

Instances

#Not

data Not a

A 'Predicate' ensuring that the opposite of another Predicate passes

Instances

#LessThan

data LessThan n

A 'Predicate' ensuring that the value is less than a given int

Instances

#GreaterThan

data GreaterThan n

A 'Predicate' ensuring that the value is greater than a given int

Instances

#From

data From n

A 'Predicate' ensuring that the value is equal to or greater than a given int

Instances

#To

data To n

A 'Predicate' ensuring that the value is up and including a given int

Instances

#FromTo

data FromTo m n

A 'Predicate' ensuring that the value is between two given ints (inclusive)

Instances

#EqualTo

data EqualTo n

A 'Predicate' ensuring that the value is equal to a given int

Instances

#NotEqualTo

data NotEqualTo n

A 'Predicate' ensuring that the value is not equal to a given int

Instances

#Positive

type Positive = GreaterThan D0

A 'Predicate' ensuring that the value is greater than zero.

#NonPositive

type NonPositive = To D0

A 'Predicate' ensuring that the value is less than or equal to zero.

#Negative

type Negative = LessThan D0

A 'Predicate' ensuring that the value is less than zero.

#NonNegative

type NonNegative = From D0

A 'Predicate' ensuring that the value is greater than or equal to zero.

#ZeroToOne

type ZeroToOne = FromTo D0 D1

An inclusive range of values from zero to one.

#NonZero

type NonZero = NotEqualTo D0

A 'Predicate' ensuring that the value is not equal to zero.

#NonEmpty

type NonEmpty = SizeGreaterThan D0

A 'Predicate' ensuring that the 'Foldable' is non-empty.

Modules