package prelude
- Alphabetic
- By Inheritance
- prelude
- ZivariantSyntax
- ForEachSyntax
- PartialOrdSyntax
- OrdSyntax
- NonEmptyForEachSyntax
- NonEmptySetSyntax
- NewtypeFExports
- NewtypeExports
- InverseSyntax
- IdentityEitherSyntax
- IdentityBothSyntax
- IdentitySyntax
- IdExports
- HashSyntax
- EqualSyntax
- DivariantSyntax
- DebugSyntax
- ContravariantSyntax
- CovariantSyntax
- ConstExports
- CommutativeEitherSyntax
- CommutativeBothSyntax
- BicovariantSyntax
- AssociativeFlattenSyntax
- AssociativeEitherSyntax
- AssociativeComposeSyntax
- AssociativeBothSyntax
- AssociativeSyntax
- Assertions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type <=>[A, B] = Equivalence[A, B]
- type AnyF[_] = Any
- implicit final class AnySyntax[A] extends AnyVal
- sealed trait AnyType[A] extends AnyRef
- trait AssertionF[-A[_]] extends AnyRef
- implicit final class AssertionSyntax[A] extends AnyVal
Provides implicit syntax for assertions.
- trait Assertions extends AnyRef
Provides versions of assertions from _ZIO Test_ that use
Equal
,Ord
, andValidation
. - trait Associative[A] extends AnyRef
The
Associative[A]
type class describes an associative binary operator for a typeA
.The
Associative[A]
type class describes an associative binary operator for a typeA
. For example, addition for integers, and string concatenation for strings.Associative
is at the top of the hierarchy for abstracting over operations to combine types because while there are some operations that are not associative but do obey other laws, it is generally difficult to combine more than two values in interesting ways with these operators, and thus to build solutions to more complicated problems out of solutions to simpler ones.For example, the mean of two numbers is an operation that is commutative but not associative. However, the lack of associativity is an indication that we can't combine the means of multiple values in an interesting way with this definition. If we attempt to take the mean of three values we always place twice as much weight on one number as the others, which is rarely what we want.
If we instead define this operation using a
StatsCounter
object then means can be combined in ways that are associative, commutative, and have an identity element, supporting much more interesting modes of composition. - trait AssociativeBoth[F[_]] extends AnyRef
An associative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[(A, B)]
.An associative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[(A, B)]
.- Annotations
- @implicitNotFound("No implicit AssociativeBoth defined for ${F}.")
- trait AssociativeBothSyntax extends AnyRef
- implicit class AssociativeBothContravariantOps[F[-_], A] extends AnyRef
Provides infix syntax for associative operations for contravariant types.
Provides infix syntax for associative operations for contravariant types.
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothCovariantOps[F[+_], A] extends AnyRef
Provides infix syntax for associative operations for covariant types.
Provides infix syntax for associative operations for covariant types.
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothOps[F[_], A] extends AnyRef
Provides infix syntax for associative operations for invariant types.
Provides infix syntax for associative operations for invariant types.
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple10Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple11Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple12Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple13Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple14Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple15Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple16Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple17Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple18Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple19Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple20Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple21Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple22Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple2Ops[F[+_], T1, T2] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple3Ops[F[+_], T1, T2, T3] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple4Ops[F[+_], T1, T2, T3, T4] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple5Ops[F[+_], T1, T2, T3, T4, T5] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple6Ops[F[+_], T1, T2, T3, T4, T5, T6] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple7Ops[F[+_], T1, T2, T3, T4, T5, T6, T7] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple8Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- implicit class AssociativeBothTuple9Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9] extends AnyRef
- Definition Classes
- AssociativeBothSyntax
- trait AssociativeCompose[=>:[-_, +_]] extends AnyRef
- trait AssociativeComposeSyntax extends AnyRef
- implicit class AssociativeComposeOps[A, B, =>:[-_, +_]] extends AnyRef
- Definition Classes
- AssociativeComposeSyntax
- trait AssociativeEither[F[_]] extends AnyRef
An associative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[Either[A, B]]
.An associative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[Either[A, B]]
.- Annotations
- @implicitNotFound("No implicit AssociativeEither defined for ${F}.")
- trait AssociativeEitherSyntax extends AnyRef
- implicit class AssociativeEitherContravariantOps[F[-_], A] extends AnyRef
Provides infix syntax for associative operations for contravariant types.
Provides infix syntax for associative operations for contravariant types.
- Definition Classes
- AssociativeEitherSyntax
- implicit class AssociativeEitherCovariantOps[F[+_], A] extends AnyRef
Provides infix syntax for associative operations for covariant types.
Provides infix syntax for associative operations for covariant types.
- Definition Classes
- AssociativeEitherSyntax
- implicit class AssociativeEitherOps[F[_], A] extends AnyRef
Provides infix syntax for associative operations for invariant types.
Provides infix syntax for associative operations for invariant types.
- Definition Classes
- AssociativeEitherSyntax
- trait AssociativeFlatten[F[+_]] extends AnyRef
AssociativeFlatten
describes a type that can be "flattened" in an associative way.AssociativeFlatten
describes a type that can be "flattened" in an associative way. For example, if we have a list of lists of lists, we can flatten it by either flattening the two inner lists and then flattening the resulting lists, or flattening the two outer lists and then flattening that resulting list. Because the operation is associative, the resulting list is the same either way.- Annotations
- @implicitNotFound("No implicit AssociativeFlatten defined for ${F}.")
- trait AssociativeFlattenSyntax extends AnyRef
- implicit class AssociativeFlattenCovariantOps[F[+_], A] extends AnyRef
Provides infix syntax for flattening covariant types.
Provides infix syntax for flattening covariant types.
- Definition Classes
- AssociativeFlattenSyntax
- implicit class AssociativeFlattenOps[F[+_], A] extends AnyRef
Provides infix syntax for flattening types.
Provides infix syntax for flattening types.
- Definition Classes
- AssociativeFlattenSyntax
- trait AssociativeSyntax extends AnyRef
- implicit class AssociativeOps[A] extends AnyRef
Provides infix syntax for combining two values with an associative operation.
Provides infix syntax for combining two values with an associative operation.
- Definition Classes
- AssociativeSyntax
- trait Bicovariant[<=>[+_, +_]] extends RightCovariant[<=>]
- trait BicovariantSyntax extends AnyRef
- implicit class BicovariantOps[<=>[+_, +_], A, B] extends AnyRef
- Definition Classes
- BicovariantSyntax
- trait Commutative[A] extends Associative[A]
The
Commutative
type class describes a binary operator for a typeA
that is both associative and commutative.The
Commutative
type class describes a binary operator for a typeA
that is both associative and commutative. This means thata1 <> a2
is equal toa2 <> a1
for all valuesa1
anda2
. Examples of commutative operations include addition for integers, but not concatenation for strings.Commutative operators are useful because combining values with a commutative operation results in the same value regardless of the order in which values are combined, allowing us to combine values in the order that is most efficient and allowing us to return determinate values even when the order of original values is indeterminate.
- trait CommutativeBoth[F[_]] extends AssociativeBoth[F]
A commutative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[(A, B)]
.A commutative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[(A, B)]
.- Annotations
- @implicitNotFound("No implicit CommutativeBoth defined for ${F}.")
- trait CommutativeBothSyntax extends AnyRef
- implicit class CommutativeBothContraVariantOps[F[-_], A] extends AnyRef
Provides infix syntax for commutative operations for contravariant types.
Provides infix syntax for commutative operations for contravariant types.
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothCovariantOps[F[+_], A] extends AnyRef
Provides infix syntax for commutative operations for covariant types.
Provides infix syntax for commutative operations for covariant types.
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothOps[F[_], A] extends AnyRef
Provides infix syntax for commutative operations for invariant types.
Provides infix syntax for commutative operations for invariant types.
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple10Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple11Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple12Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple13Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple14Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple15Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple16Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple17Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple18Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple19Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple20Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple21Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple22Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple2Ops[F[+_], T1, T2] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple3Ops[F[+_], T1, T2, T3] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple4Ops[F[+_], T1, T2, T3, T4] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple5Ops[F[+_], T1, T2, T3, T4, T5] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple6Ops[F[+_], T1, T2, T3, T4, T5, T6] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple7Ops[F[+_], T1, T2, T3, T4, T5, T6, T7] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple8Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- implicit class CommutativeBothTuple9Ops[F[+_], T1, T2, T3, T4, T5, T6, T7, T8, T9] extends AnyRef
- Definition Classes
- CommutativeBothSyntax
- trait CommutativeEither[F[_]] extends AssociativeEither[F]
A commutative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[Either[A, B]]
.A commutative binary operator that combines two values of types
F[A]
andF[B]
to produce anF[Either[A, B]]
.- Annotations
- @implicitNotFound("No implicit CommutativeEither defined for ${F}.")
- trait CommutativeEitherSyntax extends AnyRef
- implicit class CommutativeEitherContravariantOps[F[-_], A] extends AnyRef
Provides infix syntax for commutative operations for contravariant types.
Provides infix syntax for commutative operations for contravariant types.
- Definition Classes
- CommutativeEitherSyntax
- implicit class CommutativeEitherCovariantOps[F[+_], A] extends AnyRef
Provides infix syntax for commutative operations for covariant types.
Provides infix syntax for commutative operations for covariant types.
- Definition Classes
- CommutativeEitherSyntax
- implicit class CommutativeEitherOps[F[_], A] extends AnyRef
Provides infix syntax for commutative operations for invariant types.
Provides infix syntax for commutative operations for invariant types.
- Definition Classes
- CommutativeEitherSyntax
- sealed trait Comparison extends Product with Serializable
- type Const[+A, +B] = Type[A]
- Definition Classes
- ConstExports
- trait ConstExports extends AnyRef
- trait Contravariant[F[-_]] extends ContravariantSubset[F, AnyType] with Invariant[F]
Contravariant[F]
provides implicit evidence thatF[-_]
is a contravariant endofunctor in the category of Scala objects.Contravariant[F]
provides implicit evidence thatF[-_]
is a contravariant endofunctor in the category of Scala objects.Contravariant
instances of typeF[A]
"consume" values of typeA
in some sense. For example,Equal[A]
takes two values of typeA
as input and returns aBoolean
indicating whether they are equal. Similarly, aOrd[A]
takes two values of typeA
as input and returns anOrdering
with the result of comparing them andHash
takes anA
value and returns anInt
.Common examples of contravariant instances in ZIO include effects with regard to their environment types, sinks with regard to their input type, and polymorphic queues and references regarding their input types.
Contravariant
instances support acontramap
operation, which allows transforming the input type given a function from the new input type to the old input type. For example, if we have anOrd[Int]
that allows us to compare two integers and we have a functionString => Int
that returns the length of a string, then we can construct anOrd[String]
that compares strings by computing their lengths with the provided function and comparing those. - trait ContravariantSubset[F[-_], Subset[_]] extends AnyRef
- trait ContravariantSyntax extends AnyRef
- implicit class ContravariantOps[F[-_], A] extends AnyRef
Provides infix syntax for mapping over covariant values.
Provides infix syntax for mapping over covariant values.
- Definition Classes
- ContravariantSyntax
- trait Covariant[F[+_]] extends CovariantSubset[F, AnyType] with Invariant[F]
Covariant[F]
provides implicit evidence thatF[+_]
is a covariant endofunctor in the category of Scala objects.Covariant[F]
provides implicit evidence thatF[+_]
is a covariant endofunctor in the category of Scala objects.Covariant instances of type
F[A]
"produce" values of typeA
in some sense. In some cases, such as with aList[A]
, this means that they contain values of typeA
, in which case we can simply access the elements of the collection. In other cases it means that output values of typeA
which may not already exists, such as with aFunction0[A]
that producesA
values when invoked.Common examples of covariant instances in ZIO includes effects with respect to their error and value types, sinks with respect to their error and output types, and queues and references with respect to their error and output types.
Covariant
instances support amap
operation which allows transforming the output type given a function from the old output type to the new output type. For example, if we have aList[String]
and a functionString => Int
that returns the length of a string, then we can construct aList[Int]
with the length of each string. - trait CovariantSubset[F[+_], Subset[_]] extends AnyRef
- trait CovariantSyntax extends AnyRef
- implicit class CovariantOps[F[+_], A] extends AnyRef
Provides infix syntax for mapping over covariant values.
Provides infix syntax for mapping over covariant values.
- Definition Classes
- CovariantSyntax
- trait Debug[-A] extends AnyRef
- trait DebugSyntax extends AnyRef
- implicit class DebugOps[A] extends AnyRef
- Definition Classes
- DebugSyntax
- trait Derive[F[_], Typeclass[_]] extends AnyRef
Derive[F, Typeclass]
represents a universally quantified function fromTypeclass[A]
toTypeclass[F[A]]
for someF[_]
.Derive[F, Typeclass]
represents a universally quantified function fromTypeclass[A]
toTypeclass[F[A]]
for someF[_]
. You can think ofDerive
as a "recipe" for building aTypeclass[F[A]]
instance given aTypeclass[A]
.For example, if we know how to compare values of type
A
for equality then we can compare lists with elements of typeA
for equality by checking that the length of the lists is the same and each pair of corresponding elements are equal. And we can do this for any typeA
as long as it has anEqual
instance.This is used by the library to derive typeclass instances for higher kinded types given typeclass instances for the type they are parameterized on.
- type DeriveAssociative[F[_]] = Derive[F, Associative]
- type DeriveCommutative[F[_]] = Derive[F, Commutative]
- type DeriveDebug[F[_]] = Derive[F, Debug]
- type DeriveEqual[F[_]] = Derive[F, Equal]
- type DeriveHash[F[_]] = Derive[F, Hash]
- type DeriveIdentity[F[_]] = Derive[F, Identity]
- type DeriveInverse[F[_]] = Derive[F, Inverse]
- type DeriveOrd[F[_]] = Derive[F, Ord]
- trait Divariant[=>:[-_, +_]] extends RightCovariant[=>:]
- trait DivariantSyntax extends AnyRef
- implicit class DivariantOps[=>:[-_, +_], A, B] extends AnyRef
- Definition Classes
- DivariantSyntax
- type EReader[-R, +E, +A] = ZPure[Nothing, Unit, Unit, R, E, A]
- type EState[S, +E, +A] = ZPure[Nothing, S, S, Any, E, A]
- type EWriter[+W, +E, +A] = ZPure[W, Unit, Unit, Any, E, A]
- trait Equal[-A] extends AnyRef
Equal[A]
provides implicit evidence that two values of typeA
can be compared for equality.Equal[A]
provides implicit evidence that two values of typeA
can be compared for equality.- Annotations
- @implicitNotFound("No implicit Equal defined for ${A}.")
- trait EqualSyntax extends AnyRef
- implicit class EqualOps[A] extends AnyRef
Provides infix syntax for comparing two values for equality.
Provides infix syntax for comparing two values for equality.
- Definition Classes
- EqualSyntax
- final case class Equivalence[A, B](to: (A) => B, from: (B) => A) extends Product with Serializable
An
Equivalence[A, B]
defines an equivalence between two typesA
andB
.An
Equivalence[A, B]
defines an equivalence between two typesA
andB
. These types represent different ways to store the same information.For example, a
List[Byte]
is equivalent to aVector[Byte]
. Similarly, aList[Char]
is equivalent to aString
.Equivalences are symmetrical. So if
A
is equivalent toB
, thenB
is equivalent toA
.- to
A function that converts an
A
into aB
.- from
A function that converts a
B
into anA
.
- trait ForEach[F[+_]] extends Covariant[F]
ForEach
is an abstraction that describes the ability to iterate over a collection, performing an effect for each element in the collection and returning a collection with the same shape in the context of the effect.ForEach
is an abstraction that describes the ability to iterate over a collection, performing an effect for each element in the collection and returning a collection with the same shape in the context of the effect.By choosing the appropriate effect type to traverse with a wide range of operations on collections can be described. In particular, by traversing with state we can describe folds which allow implementing a wide variety of collection operations that produce summaries from a collection of values.
- trait ForEachSyntax extends AnyRef
- implicit class FlipOps[F[+_], G[+_], A] extends AnyRef
Provides infix syntax for flip.
Provides infix syntax for flip.
- Definition Classes
- ForEachSyntax
- implicit class ForEachOps[F[+_], A] extends AnyRef
Provides infix syntax for traversing collections.
Provides infix syntax for traversing collections.
- Definition Classes
- ForEachSyntax
- trait Hash[-A] extends Equal[A]
Hash[A]
provides implicit evidence that a value of typeA
can be hashed.Hash[A]
provides implicit evidence that a value of typeA
can be hashed.- Annotations
- @implicitNotFound("No implicit Hash defined for ${A}.")
- trait HashSyntax extends AnyRef
- implicit class HashOps[A] extends AnyRef
Provides infix syntax for hashing a value.
Provides infix syntax for hashing a value.
- Definition Classes
- HashSyntax
- type Id[+A] = Type[A]
- Definition Classes
- IdExports
- trait IdExports extends AnyRef
- trait Idempotent[A] extends Associative[A]
The
Idempotent
type class describes a binary operator for a typeA
that is both associative and produces the same value when combining two identical values.The
Idempotent
type class describes a binary operator for a typeA
that is both associative and produces the same value when combining two identical values. This means thata <> a
is equal toa
for all valuesa
. Example of idempotent operations is union of sets, but not addition of integers.Idempotent operators are useful because combining the values with an idempotent operation results in the same value regardless of the number of values are combined, allowing us to optimize out unnecessary combinations of the same values.
- trait Identity[A] extends Associative[A]
The
Identity
type class describes an associative binary operator for a typeA
that also has an identity element.The
Identity
type class describes an associative binary operator for a typeA
that also has an identity element. Combining any value with the identity element on either the left or the right must return the original value unchanged. For example, zero is an identity element for integer addition and the empty string is an identity element for string concatenation.Operators with an identity element are useful because the identity element provides a sensible default value when combining values of a type and no values exist.
- trait IdentityBoth[F[_]] extends AssociativeBoth[F]
A binary operator that combines two values of types
F[A]
andF[B]
to produce anF[(A, B)]
with an identity.A binary operator that combines two values of types
F[A]
andF[B]
to produce anF[(A, B)]
with an identity.- Annotations
- @implicitNotFound("No implicit IdentityBoth defined for ${F}.")
- trait IdentityBothSyntax extends AnyRef
- implicit class IdentityBothAnyOps[A] extends AnyRef
- Definition Classes
- IdentityBothSyntax
- trait IdentityCompose[=>:[-_, +_]] extends AssociativeCompose[=>:]
- trait IdentityEither[F[_]] extends AssociativeEither[F]
A binary operator that combines two values of types
F[A]
andF[B]
to produce anF[Either[A, B]]
with an identity value.A binary operator that combines two values of types
F[A]
andF[B]
to produce anF[Either[A, B]]
with an identity value.- Annotations
- @implicitNotFound("No implicit IdentityEither defined for ${F}.")
- trait IdentityEitherSyntax extends AnyRef
- implicit class IdentityEitherAnyOps extends AnyRef
- Definition Classes
- IdentityEitherSyntax
- trait IdentityFlatten[F[+_]] extends AssociativeFlatten[F]
IdentityFlatten
described a type that can be "flattened" in an associative way and has an identity element with respect to that operation.IdentityFlatten
described a type that can be "flattened" in an associative way and has an identity element with respect to that operation. For example, with a list we can always vacuously add a layer by wrapping a list in another list constructor and flattening the resulting list always returns the original list unchanged.- Annotations
- @implicitNotFound("No implicit IdentityFlatten defined for ${F}.")
- trait IdentitySyntax extends AnyRef
- implicit class IdentityOps[A] extends AnyRef
Provides infix syntax for combining two values with an associative operation.
Provides infix syntax for combining two values with an associative operation.
- Definition Classes
- IdentitySyntax
- trait Invariant[F[_]] extends AnyRef
- trait InvariantVersionSpecific extends AnyRef
- trait Inverse[A] extends Identity[A]
The
Inverse
type class describes an associative binary operator for a typeA
that has an identity element and an inverse binary operator.The
Inverse
type class describes an associative binary operator for a typeA
that has an identity element and an inverse binary operator. Combining any value with itself with the inverse operator must return the identity element. For example, for integer addition zero is an identty element and subtraction is an inverse operation, because subtracting any value from itself always returns zero.Because
Inverse
defines a binary rather than a unary operator it can be used to describe inverse operations for types that do not have inverse values. For example, the natural numbers do not have inverses because the set of natural numbers does not include negative numbers. But we can still define a subtraction operation that is the inverse of addition for the natural numbers, since subtracting a number from itself always returns zero. - trait InverseSyntax extends AnyRef
- implicit class InverseOps[A] extends AnyRef
Provides infix syntax for combining two values with an inverse operation.
Provides infix syntax for combining two values with an inverse operation.
- Definition Classes
- InverseSyntax
- trait LowPriorityInvariantImplicits extends AnyRef
- trait LowPriorityNonEmptyListImplicits extends AnyRef
- trait LowPriorityZNonEmptySetImplicits extends AnyRef
- trait LowPriorityZSetImplicits extends AnyRef
- implicit final class MapSyntax[K, V] extends AnyVal
- type MultiSet[+A] = ZSet[A, Int]
- trait NewtypeExports extends AnyRef
- abstract class Newtype[A] extends NewtypeModule.Newtype[A]
The class of objects corresponding to newtypes.
The class of objects corresponding to newtypes. Users should implement an object that extends this class to create their own newtypes, specifying
A
as the underlying type to wrap.object Meter extends Newtype[Double] type Meter = Meter.Type
- Definition Classes
- NewtypeExports
- abstract class NewtypeSmart[A] extends NewtypeModule.NewtypeSmart[A]
The class of objects corresponding to newtypes with smart constructors where not all instances of the underlying type are valid instances of the newtype.
The class of objects corresponding to newtypes with smart constructors where not all instances of the underlying type are valid instances of the newtype. Users should implement an object that extends this class to create their own newtypes, specifying
A
as the underlying type to wrap and an assertion that valid instances of the underlying type should satisfy.object Natural extends NewtypeSmart[Int](isGreaterThanEqualTo(0)) type Natural = Natural.Type
- Definition Classes
- NewtypeExports
- abstract class Subtype[A] extends NewtypeModule.Subtype[A]
The class of objects corresponding to subtypes.
The class of objects corresponding to subtypes. Users should implement an object that extends this class to create their own subtypes, specifying
A
as the underlying type to wrap.object And extends Subtype[Boolean] type And = And.Type
- Definition Classes
- NewtypeExports
- abstract class SubtypeSmart[A] extends NewtypeModule.SubtypeSmart[A]
The class of objects corresponding to subtypes with smart constructors where not all instances of the underlying type are valid instances of the subtype.
The class of objects corresponding to subtypes with smart constructors where not all instances of the underlying type are valid instances of the subtype. Users should implement an object that extends this class to create their own subtypes, specifying
A
as the underlying type to wrap and an assertion that valid instances of the underlying type should satisfy.object Natural extends SubtypeSmart[Int](isGreaterThanEqualTo(0)) type Natural = Natural.Type
- Definition Classes
- NewtypeExports
- trait NewtypeFExports extends AnyRef
- abstract class NewtypeF extends NewtypeModuleF.NewtypeF
The class of objects corresponding to parameterized newtypes.
The class of objects corresponding to parameterized newtypes. Users should implement an object that extends this class to create their own parameterized newtypes
object Sum extends NewtypeF type Sum[A] = Sum.Type[A]
- Definition Classes
- NewtypeFExports
- abstract class NewtypeSmartF[A[_]] extends NewtypeModuleF.NewtypeSmartF[A]
The class of objects corresponding to newtypes with smart constructors where not all instances of the underlying type are valid instances of the newtype.
The class of objects corresponding to newtypes with smart constructors where not all instances of the underlying type are valid instances of the newtype. Users should implement an object that extends this class to create their own newtypes, specifying
A
as the underlying type to wrap and an assertion that valid instances of the underlying type should satisfy.object ShortList extends NewtypeSmart[List](isShorterThan(5)) type ShortList = ShortList.Type
- Definition Classes
- NewtypeFExports
- abstract class SubtypeF extends NewtypeModuleF.SubtypeF
The class of objects corresponding to parameterized subtypes.
The class of objects corresponding to parameterized subtypes. Users should implement an object that extends this class to create their own parameterized subtypes
object Sum extends SubtypeF type Sum[A] = Sum.Type[A]
- Definition Classes
- NewtypeFExports
- abstract class SubtypeSmartF[A[_]] extends NewtypeModuleF.SubtypeSmartF[A]
The class of objects corresponding to subtypes with smart constructors where not all instances of the underlying type are valid instances of the subtype.
The class of objects corresponding to subtypes with smart constructors where not all instances of the underlying type are valid instances of the subtype. Users should implement an object that extends this class to create their own subtypes, specifying
A
as the underlying type to wrap and an assertion that valid instances of the underlying type should satisfy.object ShortList extends SubtypeSmartF[List](isShorterThan(5)) type ShortList = ShortList.Type
- Definition Classes
- NewtypeFExports
- trait NonEmptyForEach[F[+_]] extends ForEach[F]
A
NonEmptyForEach
describes aForEach
that is guaranteed to contain at least one element, such as aNonEmptyList
, aNonEmptyChunk
, or certain tree like data structures.A
NonEmptyForEach
describes aForEach
that is guaranteed to contain at least one element, such as aNonEmptyList
, aNonEmptyChunk
, or certain tree like data structures.Because of the additional information that there is always at least one element, certain operations are available on a
NonEmptyForEach
that are not available on aForEach
. For example, if an ordering is defined on the elements of aNonEmptyForEach
thenmin
andmax
are defined, whereas for aForEach
onlyminOption
andmaxOption
would be, since the collection might not contain any elements at all. - trait NonEmptyForEachSyntax extends AnyRef
- implicit class Flip1Ops[F[+_], G[+_], A] extends AnyRef
Provides infix syntax for flip1.
Provides infix syntax for flip1.
- Definition Classes
- NonEmptyForEachSyntax
- implicit class NonEmptyForEachOps[F[+_], A] extends AnyRef
Provides infix syntax for traversing collections.
Provides infix syntax for traversing collections.
- Definition Classes
- NonEmptyForEachSyntax
- sealed trait NonEmptyList[+A] extends AnyRef
A
NonEmptyList[A]
is a list of one or more values of type A.A
NonEmptyList[A]
is a list of one or more values of type A. Unlike aList
, aNonEmptyList
is guaranteed to contain at least one element. This additional structure allows some operations to be defined onNonEmptyList
that are not safe onList
, such ashead
andreduceAll
.For interoperability with Scala's collection library an implicit conversion is provided from
NonEmptyList
to the::
case ofList
. Operations that cannot preserve the guarantee that the resulting collection must have at least one element will return aList
instead. - type NonEmptyMultiSet[+A] = ZNonEmptySet[A, Int]
- final class NonEmptySet[A] extends AnyRef
- trait NonEmptySetSyntax extends AnyRef
- implicit class IterableOps[A] extends AnyRef
- Definition Classes
- NonEmptySetSyntax
- trait Ord[-A] extends PartialOrd[A]
Ord[A]
provides implicit evidence that values of typeA
have a total ordering.Ord[A]
provides implicit evidence that values of typeA
have a total ordering.- Annotations
- @implicitNotFound("No implicit Ord defined for ${A}.")
- trait OrdSyntax extends AnyRef
- implicit class OrdOps[A] extends AnyRef
Provides infix syntax for comparing two values with a total ordering.
Provides infix syntax for comparing two values with a total ordering.
- Definition Classes
- OrdSyntax
- sealed trait Ordering extends PartialOrdering
An
Ordering
is the result of comparing two values.An
Ordering
is the result of comparing two values. The result may beLessThan
,Equals
, orGreaterThan
. - sealed trait ParSeq[+Z <: Unit, +A] extends AnyRef
ParSeq
is a data type that represents some notion of "events" that can take place in parallel or in sequence.ParSeq
is a data type that represents some notion of "events" that can take place in parallel or in sequence. For example, aParSeq
parameterized on some error type could be used to model the potentially multiple ways that an application can fail. On the other hand, a ParSeqparameterized on some request type could be used to model a collection of requests to external data sources, some of which could be executed in parallel and some of which must be executed sequentially.
- final case class PartialEquivalence[A, B, +E1, +E2](to: (A) => Either[E1, B], from: (B) => Either[E2, A]) extends Product with Serializable
- Annotations
- @silent("Unused import")
- trait PartialOrd[-A] extends Equal[A]
PartialOrd[A]
provides implicit evidence that values of typeA
have a partial ordering.PartialOrd[A]
provides implicit evidence that values of typeA
have a partial ordering.- Annotations
- @implicitNotFound("No implicit PartialOrd defined for ${A}.")
- trait PartialOrdSyntax extends AnyRef
- implicit class PartialOrdOps[A] extends AnyRef
Provides infix syntax for comparing two values with a total ordering.
Provides infix syntax for comparing two values with a total ordering.
- Definition Classes
- PartialOrdSyntax
- sealed trait PartialOrdering extends Product with Serializable
- type Reader[-R, +A] = ZPure[Nothing, Unit, Unit, R, Nothing, A]
- trait RightCovariant[<=>[_, +_]] extends AnyRef
- final class SafeFunction[-In, +Out] extends (In) => Out
A
SafeFunction
is a function that can be freely composed with the guarantee that functions of arbitrary size can be evaluated in constant stack space.A
SafeFunction
is a function that can be freely composed with the guarantee that functions of arbitrary size can be evaluated in constant stack space. It does this by maintaining each of the composed functions internally in a data structure and evaluating them in a loop when the function is called. - type State[S, +A] = ZPure[Nothing, S, S, Any, Nothing, A]
- sealed trait These[+A, +B] extends AnyRef
- type Validation[+E, +A] = ZPure[Nothing, Unit, Unit, Any, E, A]
- type Writer[+W, +A] = ZPure[W, Unit, Unit, Any, Nothing, A]
- final class ZNonEmptySet[+A, +B] extends AnyRef
Similar to
ZSet
, aZNonEmptySet[A, B]
is a guaranteed non-empty set ofA
values whereB
represents some notion of "how many"A
values are included in the set.Similar to
ZSet
, aZNonEmptySet[A, B]
is a guaranteed non-empty set ofA
values whereB
represents some notion of "how many"A
values are included in the set. This can be the number of times each element appears in the set ifB
is a natural number, the probability associated with an element in the set ifB
is a rational number, or even whether an element appears at all ifB
is a boolean. - final class ZSet[+A, +B] extends AnyRef
A
ZSet[A, B]
is a set ofA
values whereB
represents some notion of "how many"A
values are included in the set.A
ZSet[A, B]
is a set ofA
values whereB
represents some notion of "how many"A
values are included in the set. This can be the number of times each element appears in the set ifB
is a natural number, the probability associated with an element in the set ifB
is a rational number, or even whether an element appears at all ifB
is a boolean. - type ZValidation[+W, +E, +A] = ZPure[W, Unit, Unit, Any, E, A]
- trait Zivariant[Z[-_, +_, +_]] extends AnyRef
Abstract over type constructor with 3 parameters: on first as contravariant and on second and third as covariant.
- trait ZivariantSyntax extends AnyRef
- implicit class ZivariantOps[Z[-_, +_, +_], R, E, A] extends AnyRef
- Definition Classes
- ZivariantSyntax
Value Members
- val EReader: ZPure.type
- val EState: ZPure.type
- val EWriter: ZPure.type
- val MultiSet: ZSet.type
- val NonEmptyMultiSet: ZNonEmptySet.type
- val Reader: ZPure.type
- val State: ZPure.type
- val Validation: ZPure.type
- val Writer: ZPure.type
- val ZValidation: ZPure.type
- val any: Any
- def equalTo[A](expected: A)(implicit arg0: Equal[A]): Assertion[A]
Makes a new assertion that requires a value equal the specified value.
Makes a new assertion that requires a value equal the specified value.
- Definition Classes
- Assertions
- def isFailureV[E](assertion: Assertion[E]): Assertion[Validation[E, Any]]
Makes a new assertion that requires a validation failure satisfying a specified assertion.
Makes a new assertion that requires a validation failure satisfying a specified assertion.
- Definition Classes
- Assertions
- def isGreaterThan[A](reference: A)(implicit ord: PartialOrd[A]): Assertion[A]
Makes a new assertion that requires the value be greater than the specified reference value.
Makes a new assertion that requires the value be greater than the specified reference value.
- Definition Classes
- Assertions
- def isGreaterThanEqualTo[A](reference: A)(implicit ord: PartialOrd[A]): Assertion[A]
Makes a new assertion that requires the value be greater than or equal to the specified reference value.
Makes a new assertion that requires the value be greater than or equal to the specified reference value.
- Definition Classes
- Assertions
- def isLessThan[A](reference: A)(implicit ord: PartialOrd[A]): Assertion[A]
Makes a new assertion that requires the value be less than the specified reference value.
Makes a new assertion that requires the value be less than the specified reference value.
- Definition Classes
- Assertions
- def isLessThanEqualTo[A](reference: A)(implicit ord: PartialOrd[A]): Assertion[A]
Makes a new assertion that requires the value be less than or equal to the specified reference value.
Makes a new assertion that requires the value be less than or equal to the specified reference value.
- Definition Classes
- Assertions
- def isSuccessV[A](assertion: Assertion[A]): Assertion[Validation[Any, A]]
Makes a new assertion that requires a validation failure satisfying a specified assertion.
Makes a new assertion that requires a validation failure satisfying a specified assertion.
- Definition Classes
- Assertions
- object AnyType
- object Associative extends Lawful[AssociativeEqual]
- object AssociativeBoth extends test.laws.LawfulF.Invariant[AssociativeBothDeriveEqualInvariant, Equal]
- object AssociativeCompose
- object AssociativeEither extends test.laws.LawfulF.Invariant[AssociativeEitherDeriveEqualInvariant, Equal]
- object AssociativeFlatten extends test.laws.LawfulF.Covariant[AssociativeFlattenCovariantDeriveEqual, Equal]
- object Bicovariant
- case object BuildInfo extends Product with Serializable
This object was generated by sbt-buildinfo.
- object Commutative extends Lawful[CommutativeEqual]
- object CommutativeBoth extends test.laws.LawfulF.Invariant[CommutativeBothDeriveEqualInvariant, Equal]
- object CommutativeEither extends test.laws.LawfulF.Invariant[CommutativeEitherDeriveEqualInvariant, Equal]
- object Comparison extends Serializable
- object Const extends prelude.NewtypeF
- Definition Classes
- ConstExports
- object Contravariant extends test.laws.LawfulF.Contravariant[ContravariantDeriveEqual, Equal]
- object Covariant extends test.laws.LawfulF.Covariant[CovariantDeriveEqual, Equal]
- object Debug
- object Derive
- object Divariant
- object Equal extends Lawful[Equal]
- object Equivalence extends Lawful2[Equivalence, Equal, Equal] with Serializable
- object ForEach extends test.laws.LawfulF.Covariant[DeriveEqualForEach, Equal]
- object GenFs
Provides higher kinded generators.
- object Gens
Provides generators for data types from _ZIO Prelude_.
- object Hash extends Lawful[Hash]
- object Id extends prelude.NewtypeF
- Definition Classes
- IdExports
- object Idempotent extends Lawful[EqualIdempotent]
- object Identity extends Lawful[EqualIdentity]
- object IdentityBoth extends test.laws.LawfulF.Invariant[DeriveEqualIdentityBothInvariant, Equal]
- Annotations
- @silent("Unused import")
- object IdentityEither extends test.laws.LawfulF.Invariant[DeriveEqualIdentityEitherInvariant, Equal]
- object IdentityFlatten extends test.laws.LawfulF.Covariant[CovariantDeriveEqualIdentityFlatten, Equal]
- object Invariant extends LowPriorityInvariantImplicits with InvariantVersionSpecific
- object Inverse extends Lawful[EqualInverse]
- object NonEmptyForEach extends test.laws.LawfulF.Covariant[DeriveEqualNonEmptyForEach, Equal]
- object NonEmptyList extends LowPriorityNonEmptyListImplicits
- object NonEmptySet
- object Ord extends Lawful[Ord]
- object Ordering extends Serializable
- object ParSeq
- object PartialEquivalence extends Serializable
- object PartialOrd extends Lawful[PartialOrd]
- object PartialOrdering extends Serializable
- object SafeFunction
- object These
- object ZNonEmptySet extends LowPriorityZNonEmptySetImplicits
- object ZSet extends LowPriorityZSetImplicits
- object Zivariant
- object classic