Prelude

0.40.0

Classes

class Add [a : Type]

Source

A type class for addition.

Signatures
def add ( x : a y : a ) : a \ Pure with Add[a]
Source
Instances
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance String
Source
instance Down[a] with Add[a]
Source
instance Identity[a] with Add[a]
Source

class Applicative [m : Type -> Type] with Functor[m]

Source

A type class for functors that support application, i.e. allow to:

  • Make an applicative value out of a normal value (embed it into a default context), e.g. embed 5 into Some(5).
  • Apply a function-type applicative to a matching argument-type applicative, resulting in an applicative of the function's result type.

The meaning of the application realized by the ap function is defined by the respective instance. Conceptually this can be understood as applying functions "contained" in the first applicative to arguments in the second applicative, where the possible quantity of functions/arguments depends on the type m. For example, an Option[a -> b] can be None, or contain a function of type a -> b, and only in the latter case a function is applied. A List[a -> b] is an applicative that contains a list of functions, which are all to be applied to all arguments contained in the arguments list.

A minimal implementation must define point and at least one of ap and map2 (if map2 is implemented, ap can be defined based on map2 as shown below). If both ap and map2 are defined, they must be equivalent to their default definitions: ap(f: m[a -> b \ e], x: m[a]): m[b] \ ef = map2(identity, f, x) map2(f: a -> b -> c \ e, x: m[a], y: m[b]): m[c] \ ef = ap(Functor.map(f, x), y)

Signatures
def ap [aefb] ( f : m[a -> b \ ef] x : m[a] ) : m[b] \ ef with Applicative[m]
Source
def point [a] ( x : a ) : m[a] \ Pure with Applicative[m]
Source
Definitions
def map2 [t1t2efr] ( f : t1 -> (t2 -> r \ ef) x1 : m[t1] x2 : m[t2] ) : m[r] \ ef with Applicative[m]
Source
def map3 [t1t2t3efr] ( f : t1 -> (t2 -> (t3 -> r \ ef)) x1 : m[t1] x2 : m[t2] x3 : m[t3] ) : m[r] \ ef with Applicative[m]
Source

Lift a ternary function to work on Applicatives. Instances can define more efficient implementations than the default implementation (which is Applicative.ap(Applicative.map2(f, x1, x2), x3)).

def map4 [t1t2t3t4efr] ( f : t1 -> (t2 -> (t3 -> (t4 -> r \ ef))) x1 : m[t1] x2 : m[t2] x3 : m[t3] x4 : m[t4] ) : m[r] \ ef with Applicative[m]
Source

Lift a 4-ary function to work on Applicatives. Instances can define more efficient implementations than the default implementation (which is Applicative.ap(Applicative.map3(f, x1, x2, x3), x4)).

def map5 [t1t2t3t4t5efr] ( f : t1 -> (t2 -> (t3 -> (t4 -> (t5 -> r \ ef)))) x1 : m[t1] x2 : m[t2] x3 : m[t3] x4 : m[t4] x5 : m[t5] ) : m[r] \ ef with Applicative[m]
Source

Lift a 5-ary function to work on Applicatives. Instances can define more efficient implementations than the default implementation (which is Applicative.ap(Applicative.map3(f, x1, x2, x3), x4)).

Instances
instance Chain
Source
instance DelayList
Source
instance Identity
Source
instance List
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance Result[e]
Source
instance Validation[e]
Source
instance Vector
Source

class Closeable [a : Type]

Source

A type class for types that can be closed.

Signatures
def close ( x : a ) : Unit \ IO with Closeable[a]
Source
Instances

class Collectable [m : Type -> Type]

Source

A class representing collections that can be produced from an Iterator.

Signatures
def collect [aefr] ( iter : Iterator[a, ef, r] ) : m[a] \ ef + r with Collectable[m] Order[a]
Source
Instances
instance Chain
Source
instance List
Source
instance Set
Source
instance Vector
Source

class CommutativeGroup [a : Type] with Group[a] CommutativeMonoid[a]

Source

A type class for types that form a commutative group (abelian group) i.e. groups where the combine function is commutative.

The default instances for number define the additive inverse in the real numbers.

Instances
instance Unit
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance (a1, a2) with CommutativeGroup[a1] CommutativeGroup[a2]
Source
instance (a1, a2, a3) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3]
Source
instance (a1, a2, a3, a4) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4]
Source
instance (a1, a2, a3, a4, a5) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4] CommutativeGroup[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4] CommutativeGroup[a5] CommutativeGroup[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4] CommutativeGroup[a5] CommutativeGroup[a6] CommutativeGroup[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4] CommutativeGroup[a5] CommutativeGroup[a6] CommutativeGroup[a7] CommutativeGroup[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4] CommutativeGroup[a5] CommutativeGroup[a6] CommutativeGroup[a7] CommutativeGroup[a8] CommutativeGroup[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with CommutativeGroup[a1] CommutativeGroup[a2] CommutativeGroup[a3] CommutativeGroup[a4] CommutativeGroup[a5] CommutativeGroup[a6] CommutativeGroup[a7] CommutativeGroup[a8] CommutativeGroup[a9] CommutativeGroup[a10]
Source

class CommutativeMonoid [a : Type] with Monoid[a]

Source

A type class for types that form a commutative monoid.

Definitions
def combine ( x : a y : a ) : a \ Pure with CommutativeMonoid[a]
Source

An associative & commutative binary operation on a.

def empty : a \ Pure with CommutativeMonoid[a]
Source
Instances
instance Unit
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance (a1, a2) with CommutativeMonoid[a1] CommutativeMonoid[a2]
Source
instance (a1, a2, a3) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3]
Source
instance (a1, a2, a3, a4) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4]
Source
instance (a1, a2, a3, a4, a5) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4] CommutativeMonoid[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4] CommutativeMonoid[a5] CommutativeMonoid[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4] CommutativeMonoid[a5] CommutativeMonoid[a6] CommutativeMonoid[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4] CommutativeMonoid[a5] CommutativeMonoid[a6] CommutativeMonoid[a7] CommutativeMonoid[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4] CommutativeMonoid[a5] CommutativeMonoid[a6] CommutativeMonoid[a7] CommutativeMonoid[a8] CommutativeMonoid[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with CommutativeMonoid[a1] CommutativeMonoid[a2] CommutativeMonoid[a3] CommutativeMonoid[a4] CommutativeMonoid[a5] CommutativeMonoid[a6] CommutativeMonoid[a7] CommutativeMonoid[a8] CommutativeMonoid[a9] CommutativeMonoid[a10]
Source
instance Map[k, v] with Order[k] CommutativeMonoid[v]
Source
instance MultiMap[k, v] with Order[k] Order[v]
Source
instance Option[a] with CommutativeMonoid[a]
Source
instance Any
Source
instance All
Source
instance Set[a] with Order[a]
Source

class CommutativeSemiGroup [a : Type] with SemiGroup[a]

Source

A type class for types that form a commutative semigroup.

Definitions
def combine ( x : a y : a ) : a \ Pure with CommutativeSemiGroup[a]
Source
Instances
instance Unit
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance (a1, a2) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2]
Source
instance (a1, a2, a3) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3]
Source
instance (a1, a2, a3, a4) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4]
Source
instance (a1, a2, a3, a4, a5) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4] CommutativeSemiGroup[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4] CommutativeSemiGroup[a5] CommutativeSemiGroup[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4] CommutativeSemiGroup[a5] CommutativeSemiGroup[a6] CommutativeSemiGroup[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4] CommutativeSemiGroup[a5] CommutativeSemiGroup[a6] CommutativeSemiGroup[a7] CommutativeSemiGroup[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4] CommutativeSemiGroup[a5] CommutativeSemiGroup[a6] CommutativeSemiGroup[a7] CommutativeSemiGroup[a8] CommutativeSemiGroup[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with CommutativeSemiGroup[a1] CommutativeSemiGroup[a2] CommutativeSemiGroup[a3] CommutativeSemiGroup[a4] CommutativeSemiGroup[a5] CommutativeSemiGroup[a6] CommutativeSemiGroup[a7] CommutativeSemiGroup[a8] CommutativeSemiGroup[a9] CommutativeSemiGroup[a10]
Source
instance Map[k, v] with Order[k] CommutativeSemiGroup[v]
Source
instance MultiMap[k, v] with Order[k] Order[v]
Source
instance Option[a] with CommutativeSemiGroup[a]
Source
instance Set[a] with Order[a]
Source

class Div [a : Type]

Source

A type class for division.

Signatures
def div ( x : a y : a ) : a \ Pure with Div[a]
Source
Instances
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance String
Source
instance Identity[a] with Div[a]
Source

class Eq [a : Type]

Source
Signatures
def eq ( x : a y : a ) : Bool \ Pure with Eq[a]
Source
Definitions
def neq ( x : a y : a ) : Bool \ Pure with Eq[a]
Source
Instances
instance Boxed
Source
instance Chain[a] with Eq[a]
Source
instance ViewLeft[t] with Eq[t]
Source
instance ViewRight[t] with Eq[t]
Source
instance Comparison
Source
instance DelayList[a] with Eq[a]
Source
instance DelayMap[k, v] with Eq[k] Eq[v]
Source
instance Down[a] with Eq[a]
Source
instance Unit
Source
instance Bool
Source
instance Char
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance String
Source
instance (a1, a2) with Eq[a1] Eq[a2]
Source
instance (a1, a2, a3) with Eq[a1] Eq[a2] Eq[a3]
Source
instance (a1, a2, a3, a4) with Eq[a1] Eq[a2] Eq[a3] Eq[a4]
Source
instance (a1, a2, a3, a4, a5) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9] Eq[a10]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9] Eq[a10] Eq[a11]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9] Eq[a10] Eq[a11] Eq[a12]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9] Eq[a10] Eq[a11] Eq[a12] Eq[a13]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9] Eq[a10] Eq[a11] Eq[a12] Eq[a13] Eq[a14]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) with Eq[a1] Eq[a2] Eq[a3] Eq[a4] Eq[a5] Eq[a6] Eq[a7] Eq[a8] Eq[a9] Eq[a10] Eq[a11] Eq[a12] Eq[a13] Eq[a14] Eq[a15]
Source
instance FileType
Source
instance PrecedenceEdge
Source
instance VarSym
Source
instance RamSym[v]
Source
instance RowVar
Source
instance PredSym
Source
instance Identity[a] with Eq[a]
Source
instance List[a] with Eq[a]
Source
instance Map[k, v] with Eq[k] Eq[v]
Source
instance MultiMap[k, v] with Eq[k] Eq[v]
Source
instance Nec[a] with Eq[a]
Source
instance ViewLeft[a] with Eq[a]
Source
instance ViewRight[a] with Eq[a]
Source
instance Nel[a] with Eq[a]
Source
instance Option[t] with Eq[t]
Source
instance RedBlackTree[k, v] with Eq[k] Eq[v]
Source
instance Flag
Source
instance Result[e, t] with Eq[e] Eq[t]
Source
instance Set[a] with Eq[a]
Source
instance Validation[e, t] with Eq[e] Eq[t]
Source
instance Vector[a] with Eq[a]
Source

class Filterable [m : Type -> Type] with Functor[m]

Source

A type class for filtering container functors.

Signatures
def filterMap [aefb] ( f : a -> Option[b] \ ef t : m[a] ) : m[b] \ ef with Filterable[m]
Source
Definitions
def filter [aef] ( f : a -> Bool \ ef t : m[a] ) : m[a] \ ef with Filterable[m]
Source
Instances
instance Chain
Source
instance DelayList
Source
instance List
Source
instance Map[k] with Order[k]
Source
instance Option
Source
instance RedBlackTree[k] with Order[k]
Source
instance Vector
Source

class Foldable [t : Type -> Type]

Source

A type class for data structures that can be folded.

Signatures
def foldLeft [baef] ( f : b -> (a -> b \ ef) s : b t : t[a] ) : b \ ef with Foldable[t]
Source
def foldRight [abef] ( f : a -> (b -> b \ ef) s : b t : t[a] ) : b \ ef with Foldable[t]
Source
def foldRightWithCont [aefb] ( f : a -> ((Unit -> b \ ef) -> b \ ef) s : b t : t[a] ) : b \ ef with Foldable[t]
Source
Definitions
def count [aef] ( f : a -> Bool \ ef t : t[a] ) : Int32 \ ef with Foldable[t]
Source

Returns the number of elements in t that satisfy the predicate f.

def dropWhile [a] ( f : a -> Bool t : t[a] ) : List[a] \ Pure with Foldable[t]
Source

Returns t without the longest prefix that satisfies the predicate f.

Returns an immutable list.

def exists [aef] ( f : a -> Bool \ ef t : t[a] ) : Bool \ ef with Foldable[t]
Source

Returns true if and only if at least one element in t satisfies the predicate f.

Returns false if t is empty.

def filter [a] ( f : a -> Bool t : t[a] ) : List[a] \ Pure with Foldable[t]
Source

Returns an immutable list of all the elements in t that satisfy the predicate f.

def findLeft [aef] ( f : a -> Bool \ ef t : t[a] ) : Option[a] \ ef with Foldable[t]
Source

Optionally returns the first element of t that satisfies the predicate f when searching from left to right.

Returns None if t is empty.

def findRight [a] ( f : a -> Bool t : t[a] ) : Option[a] \ Pure with Foldable[t]
Source

Optionally returns the first element of t that satisfies the predicate f when searching from right to left.

Returns None if t is empty.

def foldLeftM [baefm] ( f : b -> (a -> m[b] \ ef) s : b t : t[a] ) : m[b] \ ef with Foldable[t] Monad[m]
Source

A monadic version of foldLeft.

Applies the monadic f to a start value s and all elements in t going from left to right.

def foldMap [aefb] ( f : a -> b \ ef t : t[a] ) : b \ ef with Foldable[t] Monoid[b]
Source

Returns the result of mapping each element and combining the results.

def foldRightM [abefm] ( f : a -> (b -> m[b] \ ef) s : b t : t[a] ) : m[b] \ ef with Foldable[t] Monad[m]
Source

A monadic version of foldRight.

Applies the monadic f to a start value s and all elements in t going from right to left.

def forAll [aef] ( f : a -> Bool \ ef t : t[a] ) : Bool \ ef with Foldable[t]
Source

Returns true if and only if all elements in t satisfy the predicate f.

Returns true if t is empty.

def forEach [aef] ( f : a -> Unit \ ef t : t[a] ) : Unit \ ef with Foldable[t]
Source

Applies f to each element in t.

def forEachM [aefmb] ( f : a -> m[b] \ ef t : t[a] ) : m[Unit] \ ef with Foldable[t] Monad[m]
Source

A monadic version of forEach.

Apply f to every value in t. f is applied for its monadic effect, the answer it produces is discarded.

def head [a] ( t : t[a] ) : Option[a] \ Pure with Foldable[t]
Source

Optionally returns the first element of t.

Returns None if t is empty.

def isEmpty [a] ( t : t[a] ) : Bool \ Pure with Foldable[t]
Source

Returns true if and only if t is empty.

def join [a] ( sep : String t : t[a] ) : String \ Pure with Foldable[t] ToString[a]
Source

Returns the concatenation of the string representation of each element in t with sep inserted between each element.

def joinWith [aef] ( f : a -> String \ ef sep : String t : t[a] ) : String \ ef with Foldable[t]
Source

Returns the concatenation of the string representation of each element in t according to f with sep inserted between each element.

def last [a] ( t : t[a] ) : Option[a] \ Pure with Foldable[t]
Source

Optionally returns the last element of t.

Returns None if t is empty.

def length [a] ( t : t[a] ) : Int32 \ Pure with Foldable[t]
Source
def maximum [a] ( t : t[a] ) : Option[a] \ Pure with Foldable[t] Order[a]
Source

Optionally finds the largest element of t according to the Order on a.

Returns None if t is empty.

def maximumBy [a] ( cmp : a -> (a -> Comparison) t : t[a] ) : Option[a] \ Pure with Foldable[t]
Source

Optionally finds the largest element of t according to the given comparator cmp.

Returns None if t is empty.

def memberOf [a] ( x : a t : t[a] ) : Bool \ Pure with Foldable[t] Eq[a]
Source

Returns true if and only if the element x is in t.

def minimum [a] ( t : t[a] ) : Option[a] \ Pure with Foldable[t] Order[a]
Source

Optionally finds the smallest element of t according to the Order on a.

Returns None if t is empty.

def minimumBy [a] ( cmp : a -> (a -> Comparison) t : t[a] ) : Option[a] \ Pure with Foldable[t]
Source

Optionally finds the smallest element of t according to the given comparator cmp.

Returns None if t is empty.

def reduceLeft [aef] ( f : a -> (a -> a \ ef) t : t[a] ) : Option[a] \ ef with Foldable[t]
Source

Optionally applies f to all elements in t going from left to right until a single value is obtained.

Returns None if t is empty.

def reduceRight [aef] ( f : a -> (a -> a \ ef) t : t[a] ) : Option[a] \ ef with Foldable[t]
Source

Optionally applies f to all elements in t going from right to left until a single value is obtained.

Returns None if t is empty.

def sum ( t : t[Int32] ) : Int32 \ Pure with Foldable[t]
Source

Returns the sum of all elements in t.

def sumWith [aef] ( f : a -> Int32 \ ef t : t[a] ) : Int32 \ ef with Foldable[t]
Source

Returns the sum of all elements in t according to the function f.

def takeWhile [a] ( f : a -> Bool t : t[a] ) : List[a] \ Pure with Foldable[t]
Source

Returns the longest prefix of t that satisfies the predicate f.

Returns an immutable list.

def toArray [ra] ( rc : Region[r] t : t[a] ) : Array[a, r] \ r with Foldable[t]
Source

Returns t as an array.

def toChain [a] ( t : t[a] ) : Chain[a] \ Pure with Foldable[t]
Source

Returns t as a chain.

def toDelayList [a] ( t : t[a] ) : DelayList[a] \ Pure with Foldable[t]
Source

Returns t as a DelayList.

def toDelayMap [kv] ( t : t[(k, v)] ) : DelayMap[k, v] \ Pure with Foldable[t] Order[k]
Source

Returns t as a DelayMap

def toList [a] ( t : t[a] ) : List[a] \ Pure with Foldable[t]
Source

Returns t as an immutable list.

def toMap [kv] ( t : t[(k, v)] ) : Map[k, v] \ Pure with Foldable[t] Order[k]
Source

Returns t as a map.

def toMapWith [ab] ( f : a -> b s : t[a] ) : Map[a, b] \ Pure with Foldable[t] Order[a]
Source

Returns a map with elements of s as keys and f applied as values.

def toMutDeque [ra] ( rc : Region[r] t : t[a] ) : MutDeque[a, r] \ r with Foldable[t]
Source

Returns t as a MutDeque.

def toMutList [ra] ( rc : Region[r] t : t[a] ) : MutList[a, r] \ r with Foldable[t]
Source

Returns t as a mutable list.

def toMutMap [rkv] ( rc : Region[r] t : t[(k, v)] ) : MutMap[k, v, r] \ r with Foldable[t] Order[k]
Source

Returns t as a MutMap.

def toMutSet [ra] ( rc : Region[r] t : t[a] ) : MutSet[a, r] \ r with Foldable[t] Order[a]
Source

Returns the set s as a MutSet.

def toNec [a] ( t : t[a] ) : Option[Nec[a]] \ Pure with Foldable[t]
Source

Optionally returns t as a non empty chain.

def toNel [a] ( t : t[a] ) : Option[Nel[a]] \ Pure with Foldable[t]
Source

Optionally returns t as a non empty list.

def toSet [a] ( t : t[a] ) : Set[a] \ Pure with Foldable[t] Order[a]
Source

Returns t as a set.

def toVector [a] ( t : t[a] ) : Vector[a] \ Pure with Foldable[t]
Source

Returns t as a vector.

Instances
instance Chain
Source
instance DelayList
Source
instance DelayMap[k]
Source
instance Identity
Source
instance List
Source
instance Map[k]
Source
instance MultiMap[k]
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance RedBlackTree[k]
Source
instance Set
Source
instance Vector
Source

class FromString [a : Type]

Source

A type class for types that can be constructed from strings.

Signatures
def fromString ( x : String ) : Option[a] \ Pure with FromString[a]
Source
Instances
instance Unit
Source
instance Bool
Source
instance Char
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance String
Source

class Functor [m : Type -> Type]

Source

A type class for types that can be mapped over.

Signatures
def map [aefb] ( f : a -> b \ ef x : m[a] ) : m[b] \ ef with Functor[m]
Source
Instances
instance Chain
Source
instance DelayList
Source
instance DelayMap[k]
Source
instance Identity
Source
instance List
Source
instance Map[k]
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance RedBlackTree[k]
Source
instance Result[e]
Source
instance Validation[e]
Source
instance Vector
Source

class Group [a : Type] with Monoid[a]

Source

A type class for types that form a group.

The default instances for numbers define the additive inverse in the real numbers.

Signatures
def inverse ( x : a ) : a \ Pure with Group[a]
Source

Returns the inverse element of x.

Definitions
def combine ( x : a y : a ) : a \ Pure with Group[a]
Source
def empty : a \ Pure with Group[a]
Source
def remove ( x : a y : a ) : a \ Pure with Group[a]
Source

Returns y removed from x.

Equivalent to Group.combine(x, Group.inverse(y))

Instances
instance Unit
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance (a1, a2) with Group[a1] Group[a2]
Source
instance (a1, a2, a3) with Group[a1] Group[a2] Group[a3]
Source
instance (a1, a2, a3, a4) with Group[a1] Group[a2] Group[a3] Group[a4]
Source
instance (a1, a2, a3, a4, a5) with Group[a1] Group[a2] Group[a3] Group[a4] Group[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with Group[a1] Group[a2] Group[a3] Group[a4] Group[a5] Group[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with Group[a1] Group[a2] Group[a3] Group[a4] Group[a5] Group[a6] Group[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with Group[a1] Group[a2] Group[a3] Group[a4] Group[a5] Group[a6] Group[a7] Group[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with Group[a1] Group[a2] Group[a3] Group[a4] Group[a5] Group[a6] Group[a7] Group[a8] Group[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with Group[a1] Group[a2] Group[a3] Group[a4] Group[a5] Group[a6] Group[a7] Group[a8] Group[a9] Group[a10]
Source

class Hash [a : Type]

Source

A type class for types that can be hashed.

Signatures
def hash ( x : a ) : Int32 \ Pure with Hash[a]
Source
Instances
instance Unit
Source
instance Bool
Source
instance Char
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance String
Source
instance BigInt
Source
instance (a1, a2) with Hash[a1] Hash[a2]
Source
instance (a1, a2, a3) with Hash[a1] Hash[a2] Hash[a3]
Source
instance (a1, a2, a3, a4) with Hash[a1] Hash[a2] Hash[a3] Hash[a4]
Source
instance (a1, a2, a3, a4, a5) with Hash[a1] Hash[a2] Hash[a3] Hash[a4] Hash[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with Hash[a1] Hash[a2] Hash[a3] Hash[a4] Hash[a5] Hash[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with Hash[a1] Hash[a2] Hash[a3] Hash[a4] Hash[a5] Hash[a6] Hash[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with Hash[a1] Hash[a2] Hash[a3] Hash[a4] Hash[a5] Hash[a6] Hash[a7] Hash[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with Hash[a1] Hash[a2] Hash[a3] Hash[a4] Hash[a5] Hash[a6] Hash[a7] Hash[a8] Hash[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with Hash[a1] Hash[a2] Hash[a3] Hash[a4] Hash[a5] Hash[a6] Hash[a7] Hash[a8] Hash[a9] Hash[a10]
Source
instance Identity[a] with Hash[a]
Source
instance List[a] with Hash[a]
Source
instance Map[k, v] with Hash[k] Hash[v]
Source
instance MultiMap[k, v] with Hash[k] Hash[v]
Source
instance Nec[a] with Hash[a]
Source
instance Nel[a] with Hash[a]
Source
instance Option[a] with Hash[a]
Source
instance Result[e, t] with Hash[e] Hash[t]
Source
instance Set[a] with Hash[a]
Source
instance Validation[e, t] with Hash[e] Hash[t]
Source
instance Vector[a] with Hash[a]
Source

class Iterable [t : Type -> Type]

Source

A type class for immutable data structures that can be iterated.

Signatures
def iterator [ra] ( rc : Region[r] t : t[a] ) : Iterator[a, r, r] \ r with Iterable[t]
Source
Definitions
def enumerator [ra] ( rc : Region[r] t : t[a] ) : Iterator[(Int32, a), r, r] \ r with Iterable[t]
Source
Instances
instance Chain
Source
instance DelayList
Source
instance DelayMap[k]
Source
instance List
Source
instance Map[k]
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance RedBlackTree[k]
Source
instance Set
Source
instance Vector
Source

class JoinLattice [a : Type] with PartialOrder[a]

Source
Signatures
def leastUpperBound ( x : a y : a ) : a \ Pure with JoinLattice[a]
Source
Instances
instance Down[a] with MeetLattice[a]
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance (a1, a2) with JoinLattice[a1] JoinLattice[a2]
Source
instance (a1, a2, a3) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3]
Source
instance (a1, a2, a3, a4) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4]
Source
instance (a1, a2, a3, a4, a5) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4] JoinLattice[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4] JoinLattice[a5] JoinLattice[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4] JoinLattice[a5] JoinLattice[a6] JoinLattice[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4] JoinLattice[a5] JoinLattice[a6] JoinLattice[a7] JoinLattice[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4] JoinLattice[a5] JoinLattice[a6] JoinLattice[a7] JoinLattice[a8] JoinLattice[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with JoinLattice[a1] JoinLattice[a2] JoinLattice[a3] JoinLattice[a4] JoinLattice[a5] JoinLattice[a6] JoinLattice[a7] JoinLattice[a8] JoinLattice[a9] JoinLattice[a10]
Source
instance Map[k, v] with Order[k] Eq[v] JoinLattice[v]
Source
instance Option[t] with JoinLattice[t]
Source
instance Set[a] with Order[a]
Source

class LowerBound [a : Type]

Source

A type class for partially ordered types that have a lower bound.

Signatures
def minValue : a \ Pure with LowerBound[a]
Source
Instances
instance Bool
Source
instance Char
Source
instance Down[a] with UpperBound[a]
Source
instance Float32
Source
instance Float64
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance Int8
Source
instance (a1, a2) with LowerBound[a1] LowerBound[a2]
Source
instance (a1, a2, a3) with LowerBound[a1] LowerBound[a2] LowerBound[a3]
Source
instance (a1, a2, a3, a4) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4]
Source
instance (a1, a2, a3, a4, a5) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4] LowerBound[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4] LowerBound[a5] LowerBound[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4] LowerBound[a5] LowerBound[a6] LowerBound[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4] LowerBound[a5] LowerBound[a6] LowerBound[a7] LowerBound[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4] LowerBound[a5] LowerBound[a6] LowerBound[a7] LowerBound[a8] LowerBound[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with LowerBound[a1] LowerBound[a2] LowerBound[a3] LowerBound[a4] LowerBound[a5] LowerBound[a6] LowerBound[a7] LowerBound[a8] LowerBound[a9] LowerBound[a10]
Source
instance Unit
Source
instance Map[k, v]
Source
instance Option[t]
Source
instance Set[a]
Source

class MeetLattice [a : Type] with PartialOrder[a]

Source
Signatures
def greatestLowerBound ( x : a y : a ) : a \ Pure with MeetLattice[a]
Source
Instances
instance Down[a] with JoinLattice[a]
Source
instance Map[k, v] with Order[k] Eq[v] MeetLattice[v]
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance (a1, a2) with MeetLattice[a1] MeetLattice[a2]
Source
instance (a1, a2, a3) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3]
Source
instance (a1, a2, a3, a4) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4]
Source
instance (a1, a2, a3, a4, a5) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4] MeetLattice[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4] MeetLattice[a5] MeetLattice[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4] MeetLattice[a5] MeetLattice[a6] MeetLattice[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4] MeetLattice[a5] MeetLattice[a6] MeetLattice[a7] MeetLattice[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4] MeetLattice[a5] MeetLattice[a6] MeetLattice[a7] MeetLattice[a8] MeetLattice[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with MeetLattice[a1] MeetLattice[a2] MeetLattice[a3] MeetLattice[a4] MeetLattice[a5] MeetLattice[a6] MeetLattice[a7] MeetLattice[a8] MeetLattice[a9] MeetLattice[a10]
Source
instance Option[t] with MeetLattice[t]
Source
instance Set[a] with Order[a]
Source

class Monad [m : Type -> Type] with Applicative[m]

Source

A type class for applicatives that support monadic bind (flatMap), i.e., allow to apply a function that takes a normal value and produces a monadic value to a monadic value. That is, the bind mechanism supports extraction of monadic values, or, viewed differently, allows to combine (flatten) nested monadic values (flapMap can be understood as a Functor.map followed by a flatten).

Signatures
def flatMap [aefb] ( f : a -> m[b] \ ef x : m[a] ) : m[b] \ ef with Monad[m]
Source
Instances
instance Chain
Source
instance DelayList
Source
instance Identity
Source
instance List
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance Result[e]
Source
instance Vector
Source

class MonadZero [m : Type -> Type] with Monad[m]

Source

A type class for Monads that have a zero element.

Signatures
def empty [t] : m[t] \ Pure with MonadZero[m]
Source
Instances
instance Chain
Source
instance DelayList
Source
instance List
Source
instance Option
Source
instance Vector
Source

class MonadZip [m : Type -> Type] with Monad[m]

Source

A type class for zipping Monads, typically container monads like List.

A minimal implementation must define zipWith and zipWithA.

Signatures
def zipWith [abefc] ( f : a -> (b -> c \ ef) ma : m[a] mb : m[b] ) : m[c] \ ef with MonadZip[m]
Source
def zipWithA [abeffc] ( f : a -> (b -> f[c] \ ef) ma : m[a] mb : m[b] ) : f[m[c]] \ ef with MonadZip[m] Applicative[f]
Source

Generalized version of zipWith where f zips an applicative functor across the (monadic) containers ma and mb.

Definitions
def unzip [ab] ( mx : m[(a, b)] ) : (m[a], m[b]) \ Pure with MonadZip[m]
Source

Returns a pair of monads, the first containing the element (or elements) of the left part of mx the second containing the element (or elements) of the right part of mx.

def zip [ab] ( ma : m[a] mb : m[b] ) : m[(a, b)] \ Pure with MonadZip[m]
Source
Instances
instance Chain
Source
instance Identity
Source
instance List
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance Vector
Source

class Monoid [a : Type] with SemiGroup[a]

Source

A type class for Monoids, objects that support an associative binary operation combine and neutral element empty.

Signatures
def empty : a \ Pure with Monoid[a]
Source
Definitions
def combine ( x : a y : a ) : a \ Pure with Monoid[a]
Source
Instances
instance Chain[a]
Source
instance DelayList[a]
Source
instance PrecedenceGraph
Source
instance Identity[a] with Monoid[a]
Source
instance List[a]
Source
instance Map[k, v] with Order[k] Monoid[v]
Source
instance Unit
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance String
Source
instance (a1, a2) with Monoid[a1] Monoid[a2]
Source
instance (a1, a2, a3) with Monoid[a1] Monoid[a2] Monoid[a3]
Source
instance (a1, a2, a3, a4) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4]
Source
instance (a1, a2, a3, a4, a5) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4] Monoid[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4] Monoid[a5] Monoid[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4] Monoid[a5] Monoid[a6] Monoid[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4] Monoid[a5] Monoid[a6] Monoid[a7] Monoid[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4] Monoid[a5] Monoid[a6] Monoid[a7] Monoid[a8] Monoid[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with Monoid[a1] Monoid[a2] Monoid[a3] Monoid[a4] Monoid[a5] Monoid[a6] Monoid[a7] Monoid[a8] Monoid[a9] Monoid[a10]
Source
instance MultiMap[k, v] with Order[k] Order[v]
Source
instance Option[a] with Monoid[a]
Source
instance Any
Source
instance All
Source
instance Set[a] with Order[a]
Source
instance Validation[e, t] with Monoid[t]
Source
instance Vector[a]
Source

class Mul [a : Type]

Source

A type class for multiplication.

Signatures
def mul ( x : a y : a ) : a \ Pure with Mul[a]
Source
Instances
instance Identity[a] with Mul[a]
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source

class Neg [a : Type]

Source

A type class for negation.

Signatures
def neg ( x : a ) : a \ Pure with Neg[a]
Source
Instances
instance Identity[a] with Neg[a]
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source

class Order [a : Type] with Eq[a]

Source
Signatures
def compare ( x : a y : a ) : Comparison \ Pure with Order[a]
Source
Definitions
def greater ( x : a y : a ) : Bool \ Pure with Order[a]
Source

Returns true if and only if x > y.

def greaterEqual ( x : a y : a ) : Bool \ Pure with Order[a]
Source

Returns true if and only if x >= y.

def less ( x : a y : a ) : Bool \ Pure with Order[a]
Source
def lessEqual ( x : a y : a ) : Bool \ Pure with Order[a]
Source

Returns true if and only if x <= y.

def max ( x : a y : a ) : a \ Pure with Order[a]
Source

Returns the maximum of x and y.

def min ( x : a y : a ) : a \ Pure with Order[a]
Source

Returns the minimum of x and y.

Instances
instance Boxed
Source
instance Chain[a] with Order[a]
Source
instance DelayList[a] with Order[a]
Source
instance DelayMap[k, v] with Order[k] Order[v]
Source
instance Down[a] with Order[a]
Source
instance FileType
Source
instance PrecedenceEdge
Source
instance VarSym
Source
instance RamSym[v]
Source
instance RowVar
Source
instance PredSym
Source
instance Identity[a] with Order[a]
Source
instance List[a] with Order[a]
Source
instance Map[k, v] with Order[k] Order[v]
Source
instance MultiMap[k, v] with Order[k] Order[v]
Source
instance Nec[a] with Order[a]
Source
instance Nel[a] with Order[a]
Source
instance Option[t] with Order[t]
Source
instance Unit
Source
instance Bool
Source
instance Char
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance String
Source
instance (a1, a2) with Order[a1] Order[a2]
Source
instance (a1, a2, a3) with Order[a1] Order[a2] Order[a3]
Source
instance (a1, a2, a3, a4) with Order[a1] Order[a2] Order[a3] Order[a4]
Source
instance (a1, a2, a3, a4, a5) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9] Order[a10]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9] Order[a10] Order[a11]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9] Order[a10] Order[a11] Order[a12]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9] Order[a10] Order[a11] Order[a12] Order[a13]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9] Order[a10] Order[a11] Order[a12] Order[a13] Order[a14]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) with Order[a1] Order[a2] Order[a3] Order[a4] Order[a5] Order[a6] Order[a7] Order[a8] Order[a9] Order[a10] Order[a11] Order[a12] Order[a13] Order[a14] Order[a15]
Source
instance Flag
Source
instance Result[e, t] with Order[e] Order[t]
Source
instance Set[a] with Order[a]
Source
instance Validation[e, t] with Order[e] Order[t]
Source
instance Vector[a] with Order[a]
Source

class PartialOrder [a : Type]

Source
Signatures
def lessEqual ( x : a y : a ) : Bool \ Pure with PartialOrder[a]
Source
Instances
instance Down[a] with PartialOrder[a]
Source
instance Map[k, v] with Order[k] Eq[v]
Source
instance Option[t] with PartialOrder[t]
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance (a1, a2) with PartialOrder[a1] PartialOrder[a2]
Source
instance (a1, a2, a3) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3]
Source
instance (a1, a2, a3, a4) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4]
Source
instance (a1, a2, a3, a4, a5) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4] PartialOrder[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4] PartialOrder[a5] PartialOrder[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4] PartialOrder[a5] PartialOrder[a6] PartialOrder[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4] PartialOrder[a5] PartialOrder[a6] PartialOrder[a7] PartialOrder[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4] PartialOrder[a5] PartialOrder[a6] PartialOrder[a7] PartialOrder[a8] PartialOrder[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with PartialOrder[a1] PartialOrder[a2] PartialOrder[a3] PartialOrder[a4] PartialOrder[a5] PartialOrder[a6] PartialOrder[a7] PartialOrder[a8] PartialOrder[a9] PartialOrder[a10]
Source
instance Set[a] with Order[a]
Source

class Reducible [t : Type -> Type]

Source

A type class for types that can be reduced to a summary value.

Reducible is like a non-empty Foldable and may only be implemented on non-empty data structures.

Signatures
def reduceLeftTo [baef1ef2] ( f : b -> (a -> b \ ef1) g : a -> b \ ef2 t : t[a] ) : b \ ef1 + ef2 with Reducible[t]
Source
def reduceRightTo [abef1ef2] ( f : a -> (b -> b \ ef1) g : a -> b \ ef2 t : t[a] ) : b \ ef1 + ef2 with Reducible[t]
Source
Definitions
def count [aef] ( f : a -> Bool \ ef t : t[a] ) : Int32 \ ef with Reducible[t]
Source

Returns the number of elements in t that satisfy the predicate f.

def dropWhile [aef] ( f : a -> Bool \ ef t : t[a] ) : List[a] \ ef with Reducible[t]
Source

Returns t as a list without the longest prefix that satisfies the predicate f.

def exists [aef] ( f : a -> Bool \ ef t : t[a] ) : Bool \ ef with Reducible[t]
Source

Returns true if and only if at least one element in t satisfies the predicate f.

def find [aef] ( f : a -> Bool \ ef t : t[a] ) : Option[a] \ ef with Reducible[t]
Source

Alias for findLeft.

Optionally returns the first element of t that satisfies the predicate f when searching from left to right.

def findLeft [aef] ( f : a -> Bool \ ef t : t[a] ) : Option[a] \ ef with Reducible[t]
Source

Optionally returns the first element of t that satisfies the predicate f when searching from left to right.

def findRight [aef] ( f : a -> Bool \ ef t : t[a] ) : Option[a] \ ef with Reducible[t]
Source

Optionally returns the first element of t that satisfies the predicate f when searching from right to left.

def fold [a] ( t : t[a] ) : a \ Pure with Reducible[t] SemiGroup[a]
Source

Alias for reduce.

Reduce t using the derived SemiGroup instance.

def foldLeft [baef] ( f : b -> (a -> b \ ef) s : b t : t[a] ) : b \ ef with Reducible[t]
Source

Left-associative fold of a structure. Applies f to a start value s and all elements in t going from left to right.

def foldRight [abef] ( f : a -> (b -> b \ ef) s : b t : t[a] ) : b \ ef with Reducible[t]
Source

Right-associative fold of a structure. Applies f to a start value s and all elements in t going from right to left.

def foldRightWithCont [aefb] ( f : a -> ((Unit -> b \ ef) -> b \ ef) z : b t : t[a] ) : b \ ef with Reducible[t]
Source

Right-associative fold of a structure. Applies f to a start value s and all elements in t going from right to left.

A foldRightWithCont allows early termination by not calling the continuation.

def forAll [aef] ( f : a -> Bool \ ef t : t[a] ) : Bool \ ef with Reducible[t]
Source

Returns true if and only if all elements in t satisfy the predicate f.

def forEach [aef] ( f : a -> Unit \ ef t : t[a] ) : Unit \ ef with Reducible[t]
Source

Applies f to each element in t.

def head [a] ( t : t[a] ) : a \ Pure with Reducible[t]
Source

Returns the first element of t.

def init [a] ( t : t[a] ) : List[a] \ Pure with Reducible[t]
Source

Returns t as a list without the last element.

def intersperse [a] ( a : a t : t[a] ) : List[a] \ Pure with Reducible[t]
Source

Returns t as a list with a inserted between every two adjacent elements.

def last [a] ( t : t[a] ) : a \ Pure with Reducible[t]
Source

Returns the last element of t.

def length [a] ( t : t[a] ) : Int32 \ Pure with Reducible[t]
Source

Returns the number of elements in t.

def maximum [a] ( t : t[a] ) : a \ Pure with Reducible[t] Order[a]
Source

Finds the largest element of t according to the Order on a.

def maximumBy [a] ( cmp : a -> (a -> Comparison) t : t[a] ) : a \ Pure with Reducible[t]
Source

Finds the largest element of t according to the given comparator cmp.

def memberOf [a] ( a : a t : t[a] ) : Bool \ Pure with Reducible[t] Eq[a]
Source

Returns true if and only if the element a is in t.

def minimum [a] ( t : t[a] ) : a \ Pure with Reducible[t] Order[a]
Source

Finds the smallest element of t according to the Order on a.

def minimumBy [a] ( cmp : a -> (a -> Comparison) t : t[a] ) : a \ Pure with Reducible[t]
Source

Finds the smallest element of t according to the given comparator cmp.

def reduce [a] ( t : t[a] ) : a \ Pure with Reducible[t] SemiGroup[a]
Source

Reduce t using the derived SemiGroup instance.

def reduceLeft [aef] ( f : a -> (a -> a \ ef) t : t[a] ) : a \ ef with Reducible[t]
Source
def reduceMap [aefb] ( f : a -> b \ ef t : t[a] ) : b \ ef with Reducible[t] SemiGroup[b]
Source

Applies f to each element of t and combines them using the derived SemiGroup instance.

def reduceRight [aef] ( f : a -> (a -> a \ ef) t : t[a] ) : a \ ef with Reducible[t]
Source

Right-associative reduction on t using f.

def reverse [a] ( t : t[a] ) : List[a] \ Pure with Reducible[t]
Source

Returns the reverse of t as a list.

def sum ( t : t[Int32] ) : Int32 \ Pure with Reducible[t]
Source

Returns the sum of all elements in t.

def sumWith [aef] ( f : a -> Int32 \ ef t : t[a] ) : Int32 \ ef with Reducible[t]
Source

Returns the sum of all elements in t according to the function f.

def tail [a] ( t : t[a] ) : List[a] \ Pure with Reducible[t]
Source

Returns the tail of t as a list.

def takeWhile [aef] ( f : a -> Bool \ ef t : t[a] ) : List[a] \ ef with Reducible[t]
Source

Returns the longest prefix of t as a list that satisfies the predicate f.

def toArray [ra] ( rc : Region[r] t : t[a] ) : Array[a, r] \ r with Reducible[t]
Source

Returns t as an array.

def toList [a] ( t : t[a] ) : List[a] \ Pure with Reducible[t]
Source

Returns t as a list.

def toMap [kv] ( t : t[(k, v)] ) : Map[k, v] \ Pure with Reducible[t] Order[k]
Source

Returns t as a map.

def toNel [a] ( t : t[a] ) : Nel[a] \ Pure with Reducible[t]
Source

Returns t as a non-empty list.

def toSet [a] ( t : t[a] ) : Set[a] \ Pure with Reducible[t] Order[a]
Source

Returns t as a set.

def toVector [a] ( t : t[a] ) : Vector[a] \ Pure with Reducible[t]
Source

Returns t as a vector.

Instances
instance Nec
Source
instance Nel
Source

class SemiGroup [a : Type]

Source

A type class for types that form a semigroup.

Signatures
def combine ( x : a y : a ) : a \ Pure with SemiGroup[a]
Source
Definitions
def combineN ( x : a n : Int32 ) : a \ Pure with SemiGroup[a]
Source
Instances
instance Chain[a]
Source
instance DelayList[a]
Source
instance PrecedenceGraph
Source
instance Identity[a] with SemiGroup[a]
Source
instance List[a]
Source
instance Map[k, v] with Order[k] SemiGroup[v]
Source
instance MultiMap[k, v] with Order[k] Order[v]
Source
instance Nec[a]
Source
instance Nel[a]
Source
instance Option[a] with SemiGroup[a]
Source
instance Unit
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance String
Source
instance (a1, a2) with SemiGroup[a1] SemiGroup[a2]
Source
instance (a1, a2, a3) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3]
Source
instance (a1, a2, a3, a4) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4]
Source
instance (a1, a2, a3, a4, a5) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4] SemiGroup[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4] SemiGroup[a5] SemiGroup[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4] SemiGroup[a5] SemiGroup[a6] SemiGroup[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4] SemiGroup[a5] SemiGroup[a6] SemiGroup[a7] SemiGroup[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4] SemiGroup[a5] SemiGroup[a6] SemiGroup[a7] SemiGroup[a8] SemiGroup[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with SemiGroup[a1] SemiGroup[a2] SemiGroup[a3] SemiGroup[a4] SemiGroup[a5] SemiGroup[a6] SemiGroup[a7] SemiGroup[a8] SemiGroup[a9] SemiGroup[a10]
Source
instance Any
Source
instance All
Source
instance Set[a] with Order[a]
Source
instance Validation[e, t] with SemiGroup[t]
Source
instance Vector[a]
Source

class Sendable [a : Type]

Source

A type class for types that can be passed to Channel.send.

Instances
instance Boxed
Source
instance Chain[t] with Sendable[t]
Source
instance Comparison
Source
instance DelayList[a] with Sendable[a]
Source
instance DelayMap[k, v] with Sendable[k] Sendable[v]
Source
instance Down[a] with Sendable[a]
Source
instance Identity[a] with Sendable[a]
Source
instance List[t] with Sendable[t]
Source
instance Map[k, v] with Sendable[k] Sendable[v]
Source
instance MultiMap[k, v] with Sendable[k] Sendable[v]
Source
instance Nec[t] with Sendable[t]
Source
instance Nel[a] with Sendable[a]
Source
instance Option[t] with Sendable[t]
Source
instance RedBlackTree[k, v] with Sendable[k] Sendable[v]
Source
instance Result[e, t] with Sendable[e] Sendable[t]
Source
instance Unit
Source
instance Bool
Source
instance Char
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source
instance String
Source
instance (a1, a2) with Sendable[a1] Sendable[a2]
Source
instance (a1, a2, a3) with Sendable[a1] Sendable[a2] Sendable[a3]
Source
instance (a1, a2, a3, a4) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4]
Source
instance (a1, a2, a3, a4, a5) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9] Sendable[a10]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9] Sendable[a10] Sendable[a11]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9] Sendable[a10] Sendable[a11] Sendable[a12]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9] Sendable[a10] Sendable[a11] Sendable[a12] Sendable[a13]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9] Sendable[a10] Sendable[a11] Sendable[a12] Sendable[a13] Sendable[a14]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) with Sendable[a1] Sendable[a2] Sendable[a3] Sendable[a4] Sendable[a5] Sendable[a6] Sendable[a7] Sendable[a8] Sendable[a9] Sendable[a10] Sendable[a11] Sendable[a12] Sendable[a13] Sendable[a14] Sendable[a15]
Source
instance Set[t] with Sendable[t]
Source
instance Validation[e, t] with Sendable[e] Sendable[t]
Source

class Sub [a : Type]

Source

A type class for subtraction.

Signatures
def sub ( x : a y : a ) : a \ Pure with Sub[a]
Source
Instances
instance Identity[a] with Sub[a]
Source
instance Float32
Source
instance Float64
Source
instance BigDecimal
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance BigInt
Source

class ToJava [t : Type]

Source

A type class for marshaling values to Java.

Signatures
def toJava ( t : t ) : O[t] \ IO with ToJava[t]
Source
Instances
instance Chain[a]
Source
instance List[a]
Source
instance Map[k, v] with Order[k]
Source
instance Nec[a]
Source
instance Nel[a]
Source
instance Set[a] with Order[a]
Source
instance Vector[a]
Source

class ToString [a : Type]

Source

A type class for types that can be converted to strings.

Signatures
def toString ( x : a ) : String \ Pure with ToString[a]
Source
Instances
instance Boxed
Source
instance Chain[a] with ToString[a]
Source
instance Comparison
Source
instance DelayList[a] with ToString[a]
Source
instance DelayMap[k, v] with ToString[k] ToString[v]
Source
instance Down[a] with ToString[a]
Source
instance FileType
Source
instance BodyPredicate[v]
Source
instance BodyTerm[v]
Source
instance Constraint[v]
Source
instance Datalog[v]
Source
instance HeadPredicate[v]
Source
instance HeadTerm[v]
Source
instance VarSym
Source
instance BoolExp[v]
Source
instance RamStmt[v]
Source
instance RamSym[v]
Source
instance RamTerm[v]
Source
instance RelOp[v]
Source
instance RowVar
Source
instance PredSym
Source
instance Identity[a] with ToString[a]
Source
instance List[a] with ToString[a]
Source
instance Map[k, v] with ToString[k] ToString[v]
Source
instance MultiMap[k, v] with ToString[k] ToString[v]
Source
instance Nec[a] with ToString[a]
Source
instance Nel[a] with ToString[a]
Source
instance Option[t] with ToString[t]
Source
instance Flag
Source
instance Result[e, t] with ToString[e] ToString[t]
Source
instance Set[a] with ToString[a]
Source
instance Instant
Source
instance Unit
Source
instance Bool
Source
instance Char
Source
instance Float32
Source
instance Float64
Source
instance Int8
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance String
Source
instance BigInt
Source
instance BigDecimal
Source
instance Regex
Source
instance (a1, a2) with ToString[a1] ToString[a2]
Source
instance (a1, a2, a3) with ToString[a1] ToString[a2] ToString[a3]
Source
instance (a1, a2, a3, a4) with ToString[a1] ToString[a2] ToString[a3] ToString[a4]
Source
instance (a1, a2, a3, a4, a5) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9] ToString[a10]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9] ToString[a10] ToString[a11]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9] ToString[a10] ToString[a11] ToString[a12]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9] ToString[a10] ToString[a11] ToString[a12] ToString[a13]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9] ToString[a10] ToString[a11] ToString[a12] ToString[a13] ToString[a14]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) with ToString[a1] ToString[a2] ToString[a3] ToString[a4] ToString[a5] ToString[a6] ToString[a7] ToString[a8] ToString[a9] ToString[a10] ToString[a11] ToString[a12] ToString[a13] ToString[a14] ToString[a15]
Source
instance Validation[e, t] with ToString[e] ToString[t]
Source
instance Vector[a] with ToString[a]
Source

class Traversable [t : Type -> Type] with Functor[t] Foldable[t]

Source

A type class for data structures that can be traversed in left-to-right order with an applicative functor.

Signatures
def traverse [aefmb] ( f : a -> m[b] \ ef t : t[a] ) : m[t[b]] \ ef with Traversable[t] Applicative[m]
Source
Definitions
def sequence [ma] ( t : t[m[a]] ) : m[t[a]] \ Pure with Traversable[t] Applicative[m]
Source

Returns the result of running all the actions in the data structure t.

Instances
instance Chain
Source
instance DelayList
Source
instance Identity
Source
instance List
Source
instance Map[k]
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance RedBlackTree[k]
Source
instance Vector
Source

class UnorderedFoldable [t : Type -> Type]

Source

A type class for unordered data structures that can be folded.

Signatures
def foldMap [aefb] ( f : a -> b \ ef t : t[a] ) : b \ ef with UnorderedFoldable[t] CommutativeMonoid[b]
Source
Definitions
def count [aef] ( f : a -> Bool \ ef t : t[a] ) : Int32 \ ef with UnorderedFoldable[t]
Source

Returns the number of elements in t that satisfy the predicate f.

def exists [aef] ( f : a -> Bool \ ef t : t[a] ) : Bool \ ef with UnorderedFoldable[t]
Source

Returns true if and only if at least one element in t satisfies the predicate f.

Returns false if t is empty.

def fold [a] ( t : t[a] ) : a \ Pure with UnorderedFoldable[t] CommutativeMonoid[a]
Source

Returns the result of applying CommutativeMonoid.combine to all the elements in t.

def forAll [aef] ( f : a -> Bool \ ef t : t[a] ) : Bool \ ef with UnorderedFoldable[t]
Source

Returns true if and only if all elements in t satisfy the predicate f.

Returns true if t is empty.

def isEmpty [a] ( t : t[a] ) : Bool \ Pure with UnorderedFoldable[t]
Source

Returns true if and only if t is empty.

def memberOf [a] ( x : a t : t[a] ) : Bool \ Pure with UnorderedFoldable[t] Eq[a]
Source

Returns true if and only if the element x is in t.

def size [a] ( t : t[a] ) : Int32 \ Pure with UnorderedFoldable[t]
Source

Returns the number of elements in t.

Instances
instance Chain
Source
instance DelayList
Source
instance Identity
Source
instance List
Source
instance Map[k]
Source
instance MultiMap[k]
Source
instance Nec
Source
instance Nel
Source
instance Option
Source
instance RedBlackTree[k]
Source
instance Set
Source
instance Vector
Source

class UpperBound [a : Type]

Source

A type class for partially ordered types that have an upper bound.

Signatures
def maxValue : a \ Pure with UpperBound[a]
Source
Instances
instance Bool
Source
instance Char
Source
instance Down[a] with LowerBound[a]
Source
instance Float32
Source
instance Float64
Source
instance Int16
Source
instance Int32
Source
instance Int64
Source
instance Int8
Source
instance (a1, a2) with UpperBound[a1] UpperBound[a2]
Source
instance (a1, a2, a3) with UpperBound[a1] UpperBound[a2] UpperBound[a3]
Source
instance (a1, a2, a3, a4) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4]
Source
instance (a1, a2, a3, a4, a5) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4] UpperBound[a5]
Source
instance (a1, a2, a3, a4, a5, a6) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4] UpperBound[a5] UpperBound[a6]
Source
instance (a1, a2, a3, a4, a5, a6, a7) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4] UpperBound[a5] UpperBound[a6] UpperBound[a7]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4] UpperBound[a5] UpperBound[a6] UpperBound[a7] UpperBound[a8]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4] UpperBound[a5] UpperBound[a6] UpperBound[a7] UpperBound[a8] UpperBound[a9]
Source
instance (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) with UpperBound[a1] UpperBound[a2] UpperBound[a3] UpperBound[a4] UpperBound[a5] UpperBound[a6] UpperBound[a7] UpperBound[a8] UpperBound[a9] UpperBound[a10]
Source
instance Unit
Source

class Witherable [t : Type -> Type] with Traversable[t] Filterable[t]

Source

A type class for data structures that can be traversed in left-to-right order with an applicative partial functor.

Definitions
def sequenceWither [ma] ( t : t[m[Option[a]]] ) : m[t[a]] \ Pure with Witherable[t] Applicative[m]
Source

Returns the result of running all the actions in the data structure t.

def wither [aefmb] ( f : a -> m[Option[b]] \ ef t : t[a] ) : m[t[b]] \ ef with Witherable[t] Applicative[m]
Source
Instances
instance Chain
Source
instance DelayList
Source
instance List
Source
instance Map[k] with Order[k]
Source
instance Option
Source
instance RedBlackTree[k] with Order[k]
Source
instance Vector
Source

Enums

enum Benchmark

Source
case Benchmark({ f = Unit -> Unit \ IO, name = String })

A benchmark has a name and a function to execute. The function is always impure since timing is considered a side-effect in this context.

enum Boxed with Sendable

Source
case BoxedBool(Bool)
case BoxedChar(Char)
case BoxedInt8(Int8)
case BoxedInt16(Int16)
case BoxedInt32(Int32)
case BoxedInt64(Int64)
case BoxedFloat32(Float32)
case BoxedFloat64(Float64)
case BoxedObject(Object, Object -> (Object -> Comparison))

Represents a boxed value.

enum Chain [t : Type] with Sendable

Source
case Empty()
case One(t)
case Chain(Chain[t], Chain[t])

The Chain type.

A chain is a list represented as an unbalanced binary tree. It supports efficient append and "snoc" - appending elements at the tail of the list.

Note - the constructors Empty, One and Chain should not be used directly.

enum Comparison with EqToStringSendable

Source
case LessThan()
case EqualTo()
case GreaterThan()

enum DelayList [a : Type] with Sendable

Source
case ENil()
case ECons(a, DelayList[a])
case LCons(a, Lazy[DelayList[a]])
case LList(Lazy[DelayList[a]])

enum DelayMap [k : Typev : Type] with Sendable

Source
case DMap(RedBlackTree[k, Lazy[v]])

enum Down [a : Type] with Sendable

Source
case Down(a)

The Down type allows you to reverse the sort order of a conveniently.

enum Identity [a : Type] with EqOrderToStringHashSendable

Source
case Identity(a)

The Identity Functor / Monad.

enum Iterator [a : Typeef : Effr : Eff]

Source
case Iterator(Region[r], Unit -> Step[a] \ r + ef)

enum List [t : Type] with Sendable

Source
case Nil()
case Cons(t, List[t])

The List type.

A list is either the empty list represented by Nil, or an element v followed by a list vs represented by v :: vs.

enum Map [k : Typev : Type] with Sendable

Source
case Map(RedBlackTree[k, v])

The Map type.

A map is currently represented internally as a red-black tree.

enum MultiMap [k : Typev : Type] with Sendable

Source
case MultiMap(Map[k, Set[v]])

The MultiMap type.

A MultiMap is a Map that allows multiple values for a key. Multiple values are stored in a Set so duplicates are not allowed.

The key and value types must implement the Eq and Order type classes.

enum MutDeque [a : Typer : Eff]

Source
case MutDeque(Region[r], Ref[Array[a, r], r], Ref[Int32, r], Ref[Int32, r])

Represents a mutable deque.

Explanation of component types (from left to right): The 1st component is a reference the backing array. The 2nd component is a reference to the front index. The 3rd component is a reference to the back index.

If front == back then the deque is empty. Otherwise, the front index always points to an element (going counter-clockwise) and the back index always points to the first empty index (going clockwise).

enum MutList [a : Typer : Eff]

Source
case MutList(Region[r], Ref[Array[a, r], r], Ref[Int32, r])

Represents a mutable list.

Invariant

  • The length is always higher than the total capacity of the array.
  • The capacity of the array is always 8 or more.

enum MutMap [k : Typev : Typer : Eff]

Source
case MutMap(Region[r], Ref[Map[k, v], r])

The Mutable Map type.

enum MutPriorityQueue [a : Typer : Eff]

Source
case MutPriorityQueue(Region[r], Ref[Array[a, r], r], Ref[Int32, r])

Represents a mutable priority queue. Explanation of component types (left to right): Component 1: The region capability the queue is associated with. Component 2: A reference to the backing array. Component 3: A reference to the number of elements in the mutable priority queue.

The maximum element (if it exists) can always be accessed in constant time.

enum MutSet [t : Typer : Eff]

Source
case MutSet(Region[r], Ref[Set[t], r])

The Mutable Set type.

enum Nec [t : Type] with Sendable

Source
case NecOne(t)
case Nec(Nec[t], Nec[t])

The NonEmpty Chain type.

A chain is a list represented as an unbalanced binary tree. It supports efficient append and "snoc" - appending elements at the tail of the list.

Note - the constructors NecOne and Nec should not be used directly.

enum Nel [a : Type] with Sendable

Source
case Nel(a, List[a])

The NonEmptyList type.

enum Option [t : Type] with EqOrderToStringSendable

Source
case None()
case Some(t)

The Option type.

An option represents an optional value. The constructor None represents an absent value, whereas the constructor Some(v) represents the value v.

enum Proxy [_ : Type]

Source
case Proxy()

enum Random

Source
case Random(Random)

Represents a random number generator.

enum RedBlackTree [k : Typev : Type] with Sendable

Source
case Leaf()
case DoubleBlackLeaf()
case Node(Color, RedBlackTree[k, v], k, v, RedBlackTree[k, v])

An immutable red-black tree implementation with keys of type k and values of type v.

A red-black tree is a self-balancing binary search tree. Each node is either red or black, although a transitory color double-black is allowed during deletion. The red-black tree satisfy the following invariants.

  1. For all nodes with key x, the left subtree contains only nodes with keys y < x and the right subtree contains only nodes with keys z > x.
  2. No red node has a red parent.
  3. Every path from the root to a leaf contains the same number of black nodes.

enum Result [e : Typet : Type] with EqOrderToStringSendable

Source
case Ok(t)
case Err(e)

The Result type.

A result represents a successful value or an error value. The constructor Ok(v) represents the successful value v, whereas the constructor Err(v) represents the error value v.

enum Set [t : Type] with Sendable

Source
case Set(RedBlackTree[t, Unit])

The Set type.

A set is currently represented internally as a red-black tree.

enum StringBuilder [_ : Eff]

Source
case StringBuilder(StringBuilder)

Represents a StringBuilder.

enum Validation [e : Typet : Type] with EqOrderToStringSendable

Source
case Success(t)
case Failure(Nec[e])

The Validation type.

enum Void

Source

The empty type.

Type Aliases

type alias Static = IO

Source

Static is a type alias for false and denotes the global lifetime.

Definitions

def !> [aef] ( x : a f : a -> Unit \ ef ) : a \ ef

Source

Pipes the given value x into the function f.

Given a value x and a function f returns x.

def ++ [a] ( x : a y : a ) : a \ Pure with SemiGroup[a]

Source

Alias for SemiGroup.combine.

def >> [aef1bef2c] ( f : a -> b \ ef1 g : b -> c \ ef2 ) : a -> c \ ef1 + ef2 \ Pure

Source

Forwards function composition. Applies the function on the left first.

Given the functions f: a -> b and g: b -> c returns a function a -> c

def bug! [a] ( m : String ) : a \ Pure

Source

Crashes the current process with the given message m.

def constant [abef] ( x : a ) : b -> a \ ef \ Pure

Source

The constant function.

def debug [a] ( x : a ) : a \ Pure

Source

Prints the stringified representation of x.

WARNING: The debug function is pure hence if the result is unused it may be removed by the compiler!

def debug! [a] ( x : a ) : a \ Pure

Source

Prints the stringified representation of x.

WARNING: The debug function is pure hence if the result is unused it may be removed by the compiler!

def debug!! [a] ( x : a ) : a \ Pure

Source

Prints the stringified representation of x.

WARNING: The debug function is pure hence if the result is unused it may be removed by the compiler!

def flip [abefc] ( f : a -> (b -> c \ ef) ) : b -> (a -> c \ ef) \ Pure

Source

Returns the function f with input arguments swapped. That is, given the function f: (a, b) -> c, returns a function (b, a) -> c

def fst [ab] ( p : (a, b) ) : a \ Pure

Source

Returns the first component of t.

def identity [aef] ( x : a ) : a \ ef

Source

def on [bef1caef2] ( f : b -> (b -> c \ ef1) g : a -> b \ ef2 x : a y : a ) : c \ ef1 + ef2

Source

Partially applying this function in the form f `on` g lifts the binary function f to work on inputs transformed by g.

def println [a] ( x : a ) : Unit \ IO with ToString[a]

Source

Converts x to a string and prints it to standard out followed by a new line.

def snd [ab] ( p : (a, b) ) : b \ Pure

Source

Returns the second component of t.

def swap [ab] ( p : (a, b) ) : (b, a) \ Pure

Source

Returns the pair p with the components swapped. That is, returns (y, x) if p = (x, y).

def touch [r] ( _ : Region[r] ) : Unit \ r

Source

Touches the given region capability rc.

def unreachable! [a] : a \ Pure

Source

Asserts that this expression is unreachable. Crashes if not.

def |+| [a] ( x : a y : a ) : a \ Pure with CommutativeSemiGroup[a]

Source

Alias for CommutativeSemiGroup.combine.

def |> [aefb] ( x : a f : a -> b \ ef ) : b \ ef

Source

Pipes the given value x into the function f.

Given a value x and a function f returns f(x).

def ||> [abefc] ( x : (a, b) f : a -> (b -> c \ ef) ) : c \ ef

Source

Pipes the given pair x into the function f.

Given a pair x and a function f returns f(x).