package kernel
 Alphabetic
 Public
 All
Type Members

trait
Band
[A] extends Semigroup[A]
Bands are semigroups whose operation (i.e.
Bands are semigroups whose operation (i.e. combine) is also idempotent.
 trait BoundedSemilattice [A] extends Semilattice[A] with CommutativeMonoid[A]

trait
CommutativeGroup
[A] extends Group[A] with CommutativeMonoid[A]
An commutative group (also known as an abelian group) is a group whose combine operation is commutative.

trait
CommutativeMonoid
[A] extends Monoid[A] with CommutativeSemigroup[A]
CommutativeMonoid represents a commutative monoid.
CommutativeMonoid represents a commutative monoid.
A monoid is commutative if for all x and y, x + y === y + x.

trait
CommutativeSemigroup
[A] extends Semigroup[A]
CommutativeSemigroup represents a commutative semigroup.
CommutativeSemigroup represents a commutative semigroup.
A semigroup is commutative if for all x and y, x + y === y + x.

sealed abstract
class
Comparison
extends Product with Serializable
ADT encoding the possible results of a comparison

trait
Eq
[A] extends Serializable
A type class used to determine equality between 2 instances of the same type.
A type class used to determine equality between 2 instances of the same type. Any 2 instances
x
andy
are equal ifeqv(x, y)
istrue
. Moreover,eqv
should form an equivalence relation.  abstract class EqFunctions [E[T] <: Eq[T]] extends AnyRef

trait
Group
[A] extends Monoid[A]
A group is a monoid where each element has an inverse.
 abstract class GroupFunctions [G[T] <: Group[T]] extends MonoidFunctions[Group]

trait
Monoid
[A] extends Semigroup[A]
A monoid is a semigroup with an identity.
A monoid is a semigroup with an identity. A monoid is a specialization of a semigroup, so its operation must be associative. Additionally,
combine(x, empty) == combine(empty, x) == x
. For example, if we haveMonoid[String]
, withcombine
as string concatenation, thenempty = ""
.  abstract class MonoidFunctions [M[T] <: Monoid[T]] extends SemigroupFunctions[M]

trait
Order
[A] extends PartialOrder[A]
The
Order
type class is used to define a total ordering on some typeA
.The
Order
type class is used to define a total ordering on some typeA
. An order is defined by a relation <=, which obeys the following laws: either x <= y or y <= x (totality)  if x <= y and y <= x, then x == y (antisymmetry)  if x <= y and y <= z, then x <= z (transitivity)
The truth table for compare is defined as follows:
x <= y x >= y Int true true = 0 (corresponds to x == y) true false < 0 (corresponds to x < y) false true > 0 (corresponds to x > y)
By the totality law, x <= y and y <= x cannot be both false.
 abstract class OrderFunctions [O[T] <: Order[T]] extends PartialOrderFunctions[O]

trait
PartialOrder
[A] extends Eq[A]
The
PartialOrder
type class is used to define a partial ordering on some typeA
.The
PartialOrder
type class is used to define a partial ordering on some typeA
.A partial order is defined by a relation <=, which obeys the following laws:
 x <= x (reflexivity)  if x <= y and y <= x, then x = y (antisymmetry)  if x <= y and y <= z, then x <= z (transitivity)
To compute both <= and >= at the same time, we use a Double number to encode the result of the comparisons x <= y and x >= y. The truth table is defined as follows:
x <= y x >= y Double true true = 0.0 (corresponds to x = y) false false = NaN (x and y cannot be compared) true false = 1.0 (corresponds to x < y) false true = 1.0 (corresponds to x > y)
 abstract class PartialOrderFunctions [P[T] <: PartialOrder[T]] extends EqFunctions[P]

trait
Semigroup
[A] extends Serializable
A semigroup is any set
A
with an associative operation (combine
).  abstract class SemigroupFunctions [S[T] <: Semigroup[T]] extends AnyRef

trait
Semilattice
[A] extends Band[A] with CommutativeSemigroup[A]
Semilattices are commutative semigroups whose operation (i.e.
Semilattices are commutative semigroups whose operation (i.e. combine) is also idempotent.
 abstract class SemilatticeFunctions [S[T] <: Semilattice[T]] extends SemigroupFunctions[S]
Value Members
 object Band extends SemigroupFunctions[Band] with Serializable
 object BoundedSemilattice extends SemilatticeFunctions[BoundedSemilattice] with Serializable
 object CommutativeGroup extends GroupFunctions[CommutativeGroup] with Serializable
 object CommutativeMonoid extends MonoidFunctions[CommutativeMonoid] with Serializable
 object CommutativeSemigroup extends SemigroupFunctions[CommutativeSemigroup] with Serializable
 object Comparison extends Serializable
 object Eq extends EqFunctions[Eq] with Serializable
 object Group extends GroupFunctions[Group] with Serializable
 object Monoid extends MonoidFunctions[Monoid] with Serializable
 object Order extends OrderFunctions[Order] with Serializable
 object PartialOrder extends PartialOrderFunctions[PartialOrder] with Serializable
 object Semigroup extends SemigroupFunctions[Semigroup] with Serializable
 object Semilattice extends SemilatticeFunctions[Semilattice] with Serializable