Module

Data.Refined.Predicate

Package
purescript-refined
Repository
danieljharvey/purescript-refined

#Predicate Source

class Predicate p x  where

Members

Instances

#IdPred Source

data IdPred

A 'Predicate' for which everything is valid

Instances

#And Source

data And l r

A 'Predicate' ensuring that both given Predicates are valid

Instances

#Or Source

data Or l r

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

Instances

#SizeEqualTo Source

data SizeEqualTo a

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

Instances

#SizeGreaterThan Source

data SizeGreaterThan a

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

Instances

#SizeLessThan Source

data SizeLessThan a

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

Instances

#Not Source

data Not a

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

Instances

#LessThan Source

data LessThan n

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

Instances

#GreaterThan Source

data GreaterThan n

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

Instances

#From Source

data From n

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

Instances

#To Source

data To n

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

Instances

#FromTo Source

data FromTo m n

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

Instances

#EqualTo Source

data EqualTo n

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

Instances

#NotEqualTo Source

data NotEqualTo n

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

Instances

#Positive Source

type Positive = GreaterThan D0

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

#NonPositive Source

type NonPositive = To D0

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

#Negative Source

type Negative = LessThan D0

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

#NonNegative Source

type NonNegative = From D0

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

#ZeroToOne Source

type ZeroToOne = FromTo D0 D1

An inclusive range of values from zero to one.

#NonZero Source

type NonZero = NotEqualTo D0

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

#NonEmpty Source

type NonEmpty = SizeGreaterThan D0

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