scalaz

package scalaz

Scalaz: Type classes and pure functional data structures for Scala.

This package, scalaz, contains:

Type class instances and other functions related to the Scala and Java standard library are in scalaz.scalaz.std

Implicit conversions and wrapper classes that provide a more convenient syntax for accessing the functionality of the library are in scalaz.scalaz.syntax.

Type Classes Index

Data Structures Index

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. scalaz
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class -\/[+A](a: A) extends \/[A, Nothing] with Product with Serializable

    A left disjunction

    A left disjunction

    Often used to represent the failure case of a result

  2. sealed class :+:[+M, +N] extends AnyRef

    The coproduct (or free product) of monoids M and N.

    The coproduct (or free product) of monoids M and N. Conceptually this is an alternating list of M and N values, with the identity as the empty list, and composition as list concatenation that combines adjacent elements when possible.

  3. type <~[+F[_], -G[_]] = NaturalTransformation[G, F]

    A scalaz.NaturalTransformation[G, F].

  4. sealed abstract class ==>>[A, B] extends AnyRef

    An immutable map of key/value pairs implemented as a balanced binary tree

    An immutable map of key/value pairs implemented as a balanced binary tree

    Based on Haskell's Data.Map

    Since

    7.0.3

  5. type =?>[-E, +A] = Kleisli[Option, E, A]

  6. type @>[A, B] = LensFamily[A, A, B, B]

  7. type @?>[A, B] = PLensFamily[A, A, B, B]

  8. type @@[+T, Tag] = T with Tagged[Tag]

    Tag a type T with Tag.

    Tag a type T with Tag. The resulting type is a subtype of T.

    The resulting type is used to discriminate between type class instances.

    See also

    scalaz.Tag and scalaz.Tags

    Credit to Miles Sabin for the idea.

  9. abstract class Adjunction[F[_], G[_]] extends AnyRef

    An adjunction formed by two functors F and G such that F is left-adjoint to G.

    An adjunction formed by two functors F and G such that F is left-adjoint to G. The composite functor GF is a monad and the composite functor FG is a comonad.

    The minimal defition is either (unit, counit) or (leftAdjunct, rightAdjunct)

  10. trait AdjunctionFunctions extends AnyRef

  11. trait AdjunctionInstances extends AnyRef

  12. sealed trait Alpha extends AnyRef

    An algebraic data type representing the characters 'a' to 'z'

  13. trait AlphaFunctions extends AnyRef

  14. trait AlphaInstances extends AnyRef

  15. type Alternative[F[_]] = ApplicativePlus[F]

  16. trait Applicative[F[_]] extends Apply[F]

    Applicative Functor, described in Applicative Programming with Effects

    Applicative Functor, described in Applicative Programming with Effects

    Whereas a scalaz.Functor allows application of a pure function to a value in a context, an Applicative also allows application of a function in a context to a value in a context (ap).

    It follows that a pure function can be applied to arguments in a context. (See map2, map3, ... )

    Applicative instances come in a few flavours:

    • All scalaz.Monads are also Applicative
    • Any scalaz.Monoid can be treated as an Applicative (see scalaz.Monoid#applicative)
    • Zipping together corresponding elements of Naperian data structures (those of of a fixed, possibly infinite shape)
    See also

    scalaz.Applicative.ApplicativeLaw

  17. trait ApplicativePlus[F[_]] extends Applicative[F] with PlusEmpty[F]

    scalaz.Applicative combined with scalaz.PlusEmpty.

  18. trait Apply[F[_]] extends Functor[F]

    scalaz.Applicative without point.

  19. trait Arrow[=>:[_, _]] extends Split[=>:] with Profunctor[=>:]

    A scalaz.Category supporting all ordinary functions, as well as combining arrows product-wise.

    A scalaz.Category supporting all ordinary functions, as well as combining arrows product-wise. Every Arrow forms a scalaz.Contravariant in one type parameter, and a scalaz.Applicative in the other, just as with ordinary functions.

  20. trait BKTreeFunctions extends AnyRef

  21. trait BKTreeInstances extends AnyRef

  22. trait BiConstrainedNaturalTransformation[F[_, _], G[_, _], C[_], E[_]] extends AnyRef

    A constrained transformation natural in both sides of a bifunctor

  23. trait BiNaturalTransformation[-F[_, _], +G[_, _]] extends AnyRef

    A function universally quantified over two parameters.

  24. trait Bifoldable[F[_, _]] extends AnyRef

    A type giving rise to two unrelated scalaz.Foldables.

  25. trait Bifunctor[F[_, _]] extends AnyRef

    A type giving rise to two unrelated scalaz.Functors.

  26. sealed trait BijectionT[F[+_], G[+_], A, B] extends AnyRef

  27. trait BijectionTFunctions extends AnyRef

  28. trait BijectionTInstances extends AnyRef

  29. trait Bind[F[_]] extends Apply[F]

    An scalaz.Apply functor, where a lifted function can introduce new values _and_ new functor context to be incorporated into the lift context.

    An scalaz.Apply functor, where a lifted function can introduce new values _and_ new functor context to be incorporated into the lift context. The essential new operation of scalaz.Monads.

  30. trait Bitraverse[F[_, _]] extends Bifunctor[F] with Bifoldable[F]

    A type giving rise to two unrelated scalaz.Traverses.

  31. sealed trait CaseInsensitive[A] extends AnyRef

  32. trait CaseInsensitiveInstances extends AnyRef

  33. trait Catchable[F[_]] extends AnyRef

    A context in which exceptions can be caught and thrown.

    A context in which exceptions can be caught and thrown.

    This class places no other class constraints on F, but it should be the case that exceptions raised via fail are caught by the nearest surrounding attempt and returned as a Left. In addition to catching explicitly raised exceptions via fail, we expect that attempt catch ambient exceptions that might occur when 'evaluating' an F.

    We can state the requirement that attempt catch all ambient exceptions by stipulating that for all total functions of the form g: forall A . F[Throwable \/ A] => B, g compose attempt is also total.

  34. trait Category[=>:[_, _]] extends Compose[=>:]

    scalaz.Compose with identity.

  35. sealed trait CharSet extends AnyRef

    Newtype for strings representing character sets.

  36. trait CharSetFunctions extends AnyRef

  37. trait Choice[=>:[_, _]] extends Category[=>:]

  38. trait Cobind[F[_]] extends Functor[F]

  39. trait Codensity[F[+_], +A] extends AnyRef

  40. case class Cofree[S[+_], +A](head: A, tail: S[Cofree[S, A]])(implicit S: Functor[S]) extends Product with Serializable

    A cofree comonad for some functor S, i.e.

    A cofree comonad for some functor S, i.e. an S-branching stream.

  41. trait CofreeFunctions extends AnyRef

  42. trait CofreeInstances extends AnyRef

  43. trait Cohoist[F[_[_], _]] extends ComonadTrans[F]

  44. trait Cojoin[F[_]] extends Functor[F]

  45. trait Cokleisli[F[_], A, B] extends AnyRef

  46. trait CokleisliFunctions extends AnyRef

  47. trait CokleisliInstances extends CokleisliInstances0

  48. trait CokleisliInstances0 extends AnyRef

  49. trait Comonad[F[_]] extends Cojoin[F] with Cobind[F]

  50. trait ComonadStore[F[_, _], S] extends Comonad[[x]F[S, x]]

  51. trait ComonadTrans[F[_[_], _]] extends AnyRef

  52. trait Compose[=>:[_, _]] extends AnyRef

  53. final case class Const[A, B](getConst: A) extends Product with Serializable

  54. sealed trait ConstFunctions extends AnyRef

  55. sealed abstract class ConstInstances extends ConstInstances0

  56. sealed abstract class ConstInstances0 extends ConstInstances1

  57. sealed abstract class ConstInstances1 extends AnyRef

  58. trait ConstrainedNaturalTransformation[F[_], G[_], E[_]] extends AnyRef

    A constrained natural transformation

  59. type Cont[R, +A] = IndexedContsT[scalaz.Id.Id, scalaz.Id.Id, R, R, A]

  60. type ContT[M[+_], R, +A] = IndexedContsT[scalaz.Id.Id, M, R, R, A]

  61. trait Contravariant[F[_]] extends AnyRef

    Contravariant functors.

    Contravariant functors. For example, functions provide a scalaz.Functor in their result type, but a scalaz.Contravariant for each argument type.

    Note that the dual of a scalaz.Functor is just a scalaz.Functor itself.

    Providing an instance of this is a useful alternative to marking a type parameter with - in Scala.

    See also

    scalaz.Contravariant.ContravariantLaw

  62. sealed abstract class ContravariantCoyoneda[F[_], A] extends AnyRef

    Decomposition of fi.contramap(k) into its components, as it is frequently convenient to apply k separately from sorting or whatever process with fi, even when B is unknown, which is very common.

    Decomposition of fi.contramap(k) into its components, as it is frequently convenient to apply k separately from sorting or whatever process with fi, even when B is unknown, which is very common.

    This is isomorphic to F as long as F itself is a contravariant functor. The homomorphism from F[A] to ContravariantCoyoneda[F,A] exists even when F is not a contravariant functor.

    See ContravariantCoyonedaUsage.scala in the scalaz source tree for an interesting usage demonstration.

    As ContravariantCoyoneda(o)(identity).unlift = o, further factoring can occur as follows, for free:

    ContravariantCoyoneda(o contramap g)(f).unlift =
      ContravariantCoyoneda(o)(g compose f).unlift
    See also

    http://hackage.haskell.org/package/kan-extensions-4.0.1/docs/Data-Functor-Contravariant-Coyoneda.html

  63. sealed abstract class ContravariantCoyonedaInstances extends AnyRef

  64. type Conts[W[+_], R, +A] = IndexedContsT[W, scalaz.Id.Id, R, R, A]

  65. type ContsT[W[+_], M[+_], R, +A] = IndexedContsT[W, M, R, R, A]

  66. sealed trait Coproduct[F[+_], G[+_], A] extends AnyRef

    F on the left, and G on the right, of scalaz.\/.

  67. trait CoproductFunctions extends AnyRef

  68. trait CoproductInstances extends AnyRef

  69. trait CoproductInstances0 extends CoproductInstances

  70. trait CoproductInstances1 extends CoproductInstances0

  71. sealed trait Cord extends Ops[FingerTree[Int, String]]

    A Cord is a purely functional data structure for efficiently storing and manipulating Strings that are potentially very long.

    A Cord is a purely functional data structure for efficiently storing and manipulating Strings that are potentially very long. Very similar to Rope[Char], but with better constant factors and a simpler interface since it's specialized for Strings.

  72. abstract class Corepresentable[F[_], X] extends AnyRef

    Corepresentable functors

  73. abstract class Coyoneda[F[_], A] extends AnyRef

    The dual view of the Yoneda lemma.

    The dual view of the Yoneda lemma. Also a free functor on F. This is isomorphic to F as long as F itself is a functor. The homomorphism from F[A] to Coyoneda[F,A] exists even when F is not a functor.

  74. trait Cozip[F[_]] extends AnyRef

  75. type DLeft[+A] = -\/[A]

  76. trait DList[A] extends AnyRef

    Difference lists: a data structure for O(1) append on lists.

    Difference lists: a data structure for O(1) append on lists. Based on Data.DList, a Haskell library by Don Stewart.

    A difference list is a function that given a list, returns the original contents of the difference list prepended at the given list.

    This structure supports O(1) append and snoc operations on lists, making it very useful for append-heavy uses, such as logging and pretty printing.

  77. trait DListFunctions extends AnyRef

  78. trait DListInstances extends AnyRef

  79. type DRight[+B] = \/-[B]

  80. sealed abstract class Dequeue[A] extends AnyRef

    A Double-ended queue, based on the Bankers Double Ended Queue as described by C.

    A Double-ended queue, based on the Bankers Double Ended Queue as described by C. Okasaki in "Purely Functional Data Structures"

    A queue that allows items to be put onto either the front (cons) or the back (snoc) of the queue in constant time, and constant time access to the element at the very front or the very back of the queue. Dequeueing an element from either end is constant time when amortized over a number of dequeues.

    This queue maintains an invariant that whenever there are at least two elements in the queue, neither the front list nor back list are empty. In order to maintain this invariant, a dequeue from either side which would leave that side empty constructs the resulting queue by taking elements from the opposite side

  81. sealed abstract class DequeueInstances extends AnyRef

  82. trait DiNaturalTransformation[F[_, _], G[_, _]] extends AnyRef

  83. sealed trait Diev[A] extends AnyRef

    Implementation of a Discrete Interval Encoding Tree http://web.engr.oregonstate.edu/~erwig/diet/ that is actually implemented using a Vector and is balanced at all times as a result.

  84. trait DievFunctions extends DievImplementation

  85. trait DievImplementation extends AnyRef

  86. trait DievInstances extends DievImplementation

  87. sealed trait Digit extends AnyRef

    An algebraic data type representing the digits 0 - 9

  88. trait DigitFunctions extends AnyRef

  89. trait DigitInstances extends AnyRef

  90. type Disjunction[+A, +B] = \/[A, B]

  91. trait DisjunctionFunctions extends AnyRef

  92. trait DisjunctionInstances extends DisjunctionInstances0

  93. trait DisjunctionInstances0 extends DisjunctionInstances1

  94. trait DisjunctionInstances1 extends DisjunctionInstances2

  95. trait DisjunctionInstances2 extends DisjunctionInstances3

  96. trait DisjunctionInstances3 extends AnyRef

  97. type DisjunctionT[F[+_], A, B] = EitherT[F, A, B]

  98. trait Distributive[F[_]] extends Functor[F]

    Dual of scalaz.Traverse.

    Dual of scalaz.Traverse. To transform F[G[B]] to G[F[B]], you may use Traverse[F] and Applicative[G], but alternatively Functor[F] and Distributive[G], which permits greater sharing and nonstrictness.

  99. trait DistributiveFunctions extends AnyRef

  100. trait DualInstances extends AnyRef

  101. trait DualInstances0 extends AnyRef

  102. trait Each[F[_]] extends AnyRef

    Run a side effect once for each A in the F.

  103. sealed trait Either3[+A, +B, +C] extends AnyRef

  104. sealed trait EitherT[F[+_], +A, +B] extends AnyRef

    Represents a computation of type F[A \/ B].

    Represents a computation of type F[A \/ B].

    Example:

    val x: Option[String \/ Int] = Some(\/-(1))
    EitherT(x).map(1+).run // Some(\/-(2))
  105. trait EitherTFunctions extends AnyRef

  106. trait EitherTInstances extends EitherTInstances0

  107. trait EitherTInstances0 extends EitherTInstances1

  108. trait EitherTInstances1 extends AnyRef

  109. sealed trait Endo[A] extends AnyRef

    Endomorphisms.

    Endomorphisms. They have special properties among functions, so are captured in this newtype.

  110. trait EndoFunctions extends AnyRef

  111. trait EndoInstances extends AnyRef

  112. trait Enum[F] extends Order[F]

    An scalaz.Orderable with discrete values.

  113. sealed trait EphemeralStream[A] extends AnyRef

    Like scala.collection.immutable.Stream, but doesn't save computed values.

    Like scala.collection.immutable.Stream, but doesn't save computed values. As such, it can be used to represent similar things, but without the space leak problem frequently encountered using that type.

  114. trait EphemeralStreamFunctions extends AnyRef

  115. trait EphemeralStreamInstances extends AnyRef

  116. trait Equal[F] extends AnyRef

    A type safe alternative to universal equality (scala.Any#==).

    A type safe alternative to universal equality (scala.Any#==).

    See also

    scalaz.Equal.EqualLaw

  117. final case class Failure[E, A](e: E) extends Validation[E, A] with Product with Serializable

  118. sealed abstract class Finger[V, A] extends AnyRef

  119. sealed abstract class FingerTree[V, A] extends AnyRef

    Finger trees with leaves of type A and Nodes that are annotated with type V.

    Finger trees with leaves of type A and Nodes that are annotated with type V.

    Finger Trees provide a base for implementations of various collection types, as described in "Finger trees: a simple general-purpose data structure", by Ralf Hinze and Ross Paterson. A gentle introduction is presented in the blog post "Monoids and Finger Trees" by Heinrich Apfelmus.

    This is done by choosing a a suitable type to annotate the nodes. For example, a binary tree can be implemented by annotating each node with the size of its subtree, while a priority queue can be implemented by labelling the nodes by the minimum priority of its children.

    The operations on FingerTree enforce the constraint measured (in the form of a Reducer instance).

    Finger Trees have excellent (amortized) asymptotic performance:

    • Access to the first and last elements is O(1)
    • Appending/prepending a single value is O(1)
    • Concatenating two trees is (O lg min(l1, l2)) where l1 and l2 are their sizes
    • Random access to an element at n is O(lg min(n, l - n)), where l is the size of the tree.
    • Constructing a tree with n copies of a value is O(lg n).
    V

    The type of the annotations of the nodes (the measure)

    A

    The type of the elements stored at the leaves

    See also

    http://apfelmus.nfshost.com/articles/monoid-fingertree.html

    Finger trees: a simple general-purpose data structure

  120. trait FingerTreeFunctions extends AnyRef

  121. trait FingerTreeInstances extends AnyRef

  122. type FirstMaybe[A] = Maybe[A] with Tagged[First]

  123. type FirstOf[A] = A with Tagged[FirstVal]

  124. type FirstOption[A] = Option[A] with Tagged[First]

  125. trait FoldCase[A] extends AnyRef

  126. trait FoldCaseInstances extends AnyRef

  127. trait Foldable[F[_]] extends AnyRef

    A type parameter implying the ability to extract zero or more values of that type.

  128. trait Foldable1[F[_]] extends Foldable[F]

    A scalaz.Foldable where foldMap is total over semigroups.

    A scalaz.Foldable where foldMap is total over semigroups. That is, toList cannot return an empty list.

  129. trait Forall[P[_]] extends AnyRef

    A universally quantified value

  130. trait Foralls extends AnyRef

  131. case class Four[V, A](v: V, a1: A, a2: A, a3: A, a4: A)(implicit r: Reducer[A, V]) extends Finger[V, A] with Product with Serializable

  132. sealed abstract class Free[S[+_], +A] extends AnyRef

    A free operational monad for some functor S.

    A free operational monad for some functor S. Binding is done using the heap instead of the stack, allowing tail-call elimination.

  133. sealed abstract class FreeAp[F[_], A] extends AnyRef

    Free applicative functors.

    Free applicative functors. Less expressive than free monads, but more flexible to inspect and interpret.

  134. trait FreeFunctions extends AnyRef

  135. trait FreeInstances extends TrampolineInstances with SinkInstances with SourceInstances

  136. trait Functor[F[_]] extends AnyRef

    Functors, covariant by nature if not by Scala type.

    Functors, covariant by nature if not by Scala type. Their key operation is map, whose behavior is constrained only by type and the functor laws.

    Many useful functors also have natural scalaz.Apply or scalaz.Bind operations. Many also support scalaz.Traverse.

    See also

    scalaz.Functor.FunctorLaw

  137. trait Generator[C[_]] extends AnyRef

    A Generator[C] is a container of elements, and which knows how to efficiently apply a scalaz.Reducer to extract an answer by combining elements.

    A Generator[C] is a container of elements, and which knows how to efficiently apply a scalaz.Reducer to extract an answer by combining elements. A Reducer may supply efficient left-to-right and right-to-left reduction strategies that a Generator may avail itself of.

  138. trait Generators extends AnyRef

  139. sealed trait Heap[A] extends AnyRef

    An efficient, asymptotically optimal, implementation of priority queues extended with support for efficient size.

    An efficient, asymptotically optimal, implementation of priority queues extended with support for efficient size.

    The implementation of 'Heap' is based on bootstrapped skew binomial heaps as described by: G. Brodal and C. Okasaki , "Optimal Purely Functional Priority Queues", Journal of Functional Programming 6:839-857 (1996),

    Based on the heaps Haskell library by Edward Kmett

  140. trait HeapFunctions extends AnyRef

  141. trait HeapInstances extends AnyRef

  142. trait Hoist[F[_[_], _]] extends MonadTrans[F]

  143. final case class ICons[A](head: A, tail: IList[A]) extends IList[A] with Product with Serializable

  144. sealed abstract class IList[A] extends Product with Serializable

    Safe, invariant alternative to stdlib List.

    Safe, invariant alternative to stdlib List. Most methods on List have a sensible equivalent here, either on the IList interface itself or via typeclass instances (which are the same as those defined for stdlib List). All methods are total and stack-safe.

  145. sealed trait IListFunctions extends AnyRef

  146. sealed abstract class IListInstance0 extends AnyRef

  147. sealed abstract class IListInstances extends IListInstance0

  148. type IMap[A, B] = ==>>[A, B]

  149. final case class INil[A]() extends IList[A] with Product with Serializable

  150. type IRWS[-R, +W, -S1, +S2, +A] = IndexedReaderWriterStateT[scalaz.Id.Id, R, W, S1, S2, A]

  151. type IRWST[F[+_], -R, +W, -S1, +S2, +A] = IndexedReaderWriterStateT[F, R, W, S1, S2, A]

  152. sealed abstract class ISet[A] extends AnyRef

  153. sealed trait ISetFunctions extends AnyRef

  154. sealed abstract class ISetInstances extends AnyRef

  155. trait IdInstances extends AnyRef

    Mixed into object Id in the package object scalaz.

  156. final case class IdT[F[_], A](run: F[A]) extends Product with Serializable

  157. trait IdTFunctions extends AnyRef

  158. trait IdTInstances extends IdTInstances0

  159. trait IdTInstances0 extends IdTInstances1

  160. trait IdTInstances1 extends IdTInstances2

  161. trait IdTInstances2 extends IdTInstances3

  162. trait IdTInstances3 extends AnyRef

  163. trait ImmutableArray[+A] extends AnyRef

    An immutable wrapper for arrays

    An immutable wrapper for arrays

    A

    type of the elements of the array

  164. trait ImmutableArrayFunctions extends AnyRef

  165. sealed trait IndSeq[A] extends Ops[FingerTree[Int, A]]

    Indexed sequences, based on scalaz.FingerTree

    Indexed sequences, based on scalaz.FingerTree

    The measure is the count of the preceding elements, provided by UnitReducer((e: Int) => 1).

  166. trait Index[F[_]] extends AnyRef

    Random access through an integer index.

  167. type IndexedCont[+R, -O, +A] = IndexedContsT[scalaz.Id.Id, scalaz.Id.Id, R, O, A]

  168. type IndexedContT[M[+_], +R, -O, +A] = IndexedContsT[scalaz.Id.Id, M, R, O, A]

  169. type IndexedConts[W[+_], +R, -O, +A] = IndexedContsT[W, scalaz.Id.Id, R, O, A]

  170. sealed trait IndexedContsT[W[+_], M[+_], +R, -O, +A] extends AnyRef

  171. trait IndexedContsTFunctions extends AnyRef

  172. trait IndexedContsTInstances extends IndexedContsTInstances0

  173. trait IndexedContsTInstances0 extends AnyRef

  174. type IndexedReaderWriterState[-R, +W, -S1, +S2, +A] = IndexedReaderWriterStateT[scalaz.Id.Id, R, W, S1, S2, A]

  175. sealed trait IndexedReaderWriterStateT[F[+_], -R, +W, -S1, +S2, +A] extends AnyRef

    A monad transformer stack yielding (R, S1) => F[(W, A, S2)].

  176. trait IndexedReaderWriterStateTInstances extends AnyRef

  177. type IndexedState[-S1, +S2, +A] = IndexedStateT[scalaz.Id.Id, S1, S2, A]

  178. trait IndexedStateFunctions extends AnyRef

  179. trait IndexedStateT[F[+_], -S1, +S2, +A] extends AnyRef

  180. trait IndexedStateTFunctions extends AnyRef

  181. trait IndexedStateTInstances extends IndexedStateTInstances0

  182. trait IndexedStateTInstances0 extends IndexedStateTInstances1

  183. trait IndexedStateTInstances1 extends IndexedStateTInstances2

  184. trait IndexedStateTInstances2 extends AnyRef

  185. type IndexedStore[+I, -A, +B] = IndexedStoreT[scalaz.Id.Id, I, A, B]

  186. sealed trait IndexedStoreT[F[+_], +I, -A, +B] extends AnyRef

    See also

    scalaz.Lens

  187. trait IndexedStoreTFunctions extends AnyRef

  188. trait IndexedStoreTInstances extends IndexedStoreTInstances0

  189. trait IndexedStoreTInstances0 extends IndexedStoreTInstances1

  190. trait IndexedStoreTInstances1 extends IndexedStoreTInstances2

  191. trait IndexedStoreTInstances2 extends AnyRef

  192. case class Injective[T[_]]() extends Product with Serializable

    Given Injective[Foo]: If type Foo[A] = Foo[B] then A ~ B

    Given Injective[Foo]: If type Foo[A] = Foo[B] then A ~ B

    This represents an assertion that is used by other code that requires this condition.

  193. case class Injective2[T[_, _]]() extends Product with Serializable

  194. case class Injective3[T[_, _, _]]() extends Product with Serializable

  195. case class Injective4[T[_, _, _, _]]() extends Product with Serializable

  196. case class Injective5[T[_, _, _, _, _]]() extends Product with Serializable

  197. sealed trait InsertionMap[K, V] extends AnyRef

    Returns a list in order of key insertion.

  198. trait InsertionMapFunctions extends AnyRef

  199. trait InsertionMapInstances extends AnyRef

  200. trait IsEmpty[F[_]] extends PlusEmpty[F]

    Typeclass that permits testing whether some type with an empty representation is in fact empty.

  201. trait IsomorphismApplicative[F[_], G[_]] extends Applicative[F] with IsomorphismApply[F, G]

  202. trait IsomorphismApplicativePlus[F[_], G[_]] extends ApplicativePlus[F] with IsomorphismEmpty[F, G] with IsomorphismApplicative[F, G]

  203. trait IsomorphismApply[F[_], G[_]] extends Apply[F] with IsomorphismFunctor[F, G]

  204. trait IsomorphismBifunctor[F[_, _], G[_, _]] extends Bifunctor[F]

  205. trait IsomorphismBind[F[_], G[_]] extends Bind[F] with IsomorphismApply[F, G]

  206. trait IsomorphismBitraverse[F[_, _], G[_, _]] extends Bitraverse[F] with IsomorphismBifunctor[F, G]

  207. trait IsomorphismCojoin[F[_], G[_]] extends Cojoin[F] with IsomorphismFunctor[F, G]

  208. trait IsomorphismComonad[F[_], G[_]] extends Comonad[F] with IsomorphismCojoin[F, G]

  209. trait IsomorphismContravariant[F[_], G[_]] extends Contravariant[F]

  210. trait IsomorphismEach[F[_], G[_]] extends Each[F]

  211. trait IsomorphismEmpty[F[_], G[_]] extends PlusEmpty[F] with IsomorphismPlus[F, G]

  212. trait IsomorphismEqual[F, G] extends Equal[F]

  213. trait IsomorphismFoldable[F[_], G[_]] extends Foldable[F]

  214. trait IsomorphismFunctor[F[_], G[_]] extends Functor[F]

  215. trait IsomorphismIndex[F[_], G[_]] extends Index[F]

  216. trait IsomorphismMonad[F[_], G[_]] extends Monad[F] with IsomorphismApplicative[F, G] with IsomorphismBind[F, G]

  217. trait IsomorphismMonadPlus[F[_], G[_]] extends MonadPlus[F] with IsomorphismEmpty[F, G] with IsomorphismMonad[F, G]

  218. trait IsomorphismMonoid[F, G] extends Monoid[F] with IsomorphismSemigroup[F, G]

  219. trait IsomorphismOrder[F, G] extends Order[F]

  220. trait IsomorphismPlus[F[_], G[_]] extends Plus[F]

  221. trait IsomorphismSemigroup[F, G] extends Semigroup[F]

  222. trait IsomorphismShow[F, G] extends Show[F]

  223. trait IsomorphismTraverse[F[_], G[_]] extends Traverse[F] with IsomorphismFoldable[F, G] with IsomorphismFunctor[F, G]

  224. trait Isomorphisms extends IsomorphismsLow0

  225. trait IsomorphismsLow0 extends IsomorphismsLow1

  226. trait IsomorphismsLow1 extends AnyRef

  227. sealed trait Kleisli[M[+_], -A, +B] extends AnyRef

    Represents a function A => M[B].

  228. trait KleisliFunctions extends AnyRef

  229. trait KleisliInstances extends KleisliInstances0

  230. trait KleisliInstances0 extends KleisliInstances1

  231. trait KleisliInstances1 extends KleisliInstances2

  232. trait KleisliInstances2 extends KleisliInstances3

  233. trait KleisliInstances3 extends KleisliInstances4

  234. trait KleisliInstances4 extends KleisliInstances5

  235. trait KleisliInstances5 extends KleisliInstances6

  236. trait KleisliInstances6 extends KleisliInstances7

  237. trait KleisliInstances7 extends KleisliInstances8

  238. trait KleisliInstances8 extends AnyRef

  239. trait Konst[A] extends AnyRef

  240. trait Lan[G[_], H[_], A] extends AnyRef

    The left Kan extension of H along G

  241. type LastMaybe[A] = Maybe[A] with Tagged[Last]

  242. type LastOf[A] = A with Tagged[LastVal]

  243. type LastOption[A] = Option[A] with Tagged[Last]

  244. sealed trait LazyEither[+A, +B] extends AnyRef

    scala.Either, but with a value by name.

  245. trait LazyEitherFunctions extends AnyRef

  246. trait LazyEitherInstances extends AnyRef

  247. sealed trait LazyEitherT[F[+_], +A, +B] extends AnyRef

  248. trait LazyEitherTFunctions extends AnyRef

  249. trait LazyEitherTInstances extends LazyEitherTInstances0

  250. trait LazyEitherTInstances0 extends LazyEitherTInstances1

  251. trait LazyEitherTInstances1 extends AnyRef

  252. sealed trait LazyOption[+A] extends AnyRef

    scala.Option, but with a value by name.

  253. trait LazyOptionFunctions extends AnyRef

  254. trait LazyOptionInstances extends AnyRef

  255. sealed trait LazyOptionT[F[+_], +A] extends AnyRef

  256. trait LazyOptionTFunctions extends AnyRef

  257. trait LazyOptionTInstances extends LazyOptionTInstances0

  258. trait LazyOptionTInstances0 extends LazyOptionTInstances1

  259. trait LazyOptionTInstances1 extends LazyOptionTInstances2

  260. trait LazyOptionTInstances2 extends AnyRef

  261. sealed trait LazyTuple2[A, B] extends AnyRef

    scala.Tuple2, but with values by name.

  262. trait LazyTuple2Instances extends LazyTuple2Instances0

  263. trait LazyTuple2Instances0 extends AnyRef

  264. sealed trait LazyTuple3[A, B, C] extends AnyRef

    scala.Tuple3, but with values by name.

  265. trait LazyTuple3Instances extends LazyTuple3Instances0

  266. trait LazyTuple3Instances0 extends AnyRef

  267. sealed trait LazyTuple4[A, B, C, D] extends AnyRef

    scala.Tuple4, but with values by name.

  268. trait LazyTuple4Instances extends LazyTuple4Instances0

  269. trait LazyTuple4Instances0 extends AnyRef

  270. trait LazyTupleFunctions extends AnyRef

  271. case class Left3[+A, +B, +C](a: A) extends Either3[A, B, C] with Product with Serializable

  272. trait Leibniz[-L, +H >: L, A >: L <: H, B >: L <: H] extends AnyRef

    Leibnizian equality: a better =:=

    Leibnizian equality: a better =:=

    This technique was first used in Typing Dynamic Typing (Baars and Swierstra, ICFP 2002).

    It is generalized here to handle subtyping so that it can be used with constrained type constructors.

    Leibniz[L,H,A,B] says that A = B, and that both of its types are between L and H. Subtyping lets you loosen the bounds on L and H.

    If you just need a witness that A = B, then you can use A===B which is a supertype of any Leibniz[L,H,A,B]

    The more refined types are useful if you need to be able to substitute into restricted contexts.

  273. trait LeibnizFunctions extends AnyRef

  274. trait LeibnizInstances extends AnyRef

  275. trait Length[F[_]] extends AnyRef

  276. type Lens[A, B] = LensFamily[A, A, B, B]

    A lens that doesn't transform the type of the record.

  277. sealed trait LensFamily[-A1, +A2, +B1, -B2] extends AnyRef

    A Lens Family, offering a purely functional means to access and retrieve a field transitioning from type B1 to type B2 in a record simultaneously transitioning from type A1 to type A2.

    A Lens Family, offering a purely functional means to access and retrieve a field transitioning from type B1 to type B2 in a record simultaneously transitioning from type A1 to type A2. scalaz.Lens is a convenient alias for when F =:= Id, A1 =:= A2, and B1 =:= B2.

    The term field should not be interpreted restrictively to mean a member of a class. For example, a lens family can address membership of a Set.

    A1

    The initial type of the record

    A2

    The final type of the record

    B1

    The initial type of the field

    B2

    The final type of the field

    See also

    scalaz.PLens

  278. trait LensFamilyFunctions extends AnyRef

  279. trait LensFunctions extends LensFamilyFunctions

  280. trait LensInstances extends LensInstances0

  281. trait LensInstances0 extends AnyRef

  282. trait Liskov[-A, +B] extends AnyRef

    Liskov substitutability: A better <:<

    Liskov substitutability: A better <:<

    A <: B holds whenever A could be used in any negative context that expects a B. (e.g. if you could pass an A into any function that expects a B.)

  283. trait LiskovFunctions extends AnyRef

  284. trait LiskovInstances extends AnyRef

  285. sealed case class ListT[M[+_], +A](underlying: M[List[A]]) extends Product with Serializable

    ListT monad transformer.

  286. trait ListTInstances extends ListTInstances1

  287. trait ListTInstances1 extends ListTInstances2

  288. trait ListTInstances2 extends AnyRef

  289. trait MapFunctions extends AnyRef

  290. sealed abstract class MapInstances extends MapInstances0

  291. sealed abstract class MapInstances0 extends AnyRef

  292. type MaxMaybe[A] = Maybe[A] with Tagged[Max]

  293. type MaxOf[A] = A with Tagged[MaxVal]

  294. type MaxOption[A] = Option[A] with Tagged[Max]

  295. sealed abstract class Maybe[A] extends AnyRef

    An optional value

    An optional value

    A Maybe[A] will either be a wrapped A instance (Just[A]), or a lack of underlying A instance (Empty[A]).

    Maybe[A] is isomorphic to Option[A], however there are some differences between the two. Maybe is invariant in A while Option is covariant. Maybe[A] does not expose an unsafe get operation to access the underlying A value (that may not exist) like Option[A] does. Maybe[A] does not come with an implicit conversion to Iterable[A] (a trait with over a dozen super types).

  296. sealed trait MaybeFunctions extends AnyRef

  297. sealed abstract class MaybeInstances extends AnyRef

  298. final case class MaybeT[F[_], A](run: F[Maybe[A]]) extends Product with Serializable

    monad transformer for Maybe

  299. trait MaybeTFunctions extends AnyRef

  300. sealed abstract class MaybeTInstances extends MaybeTInstances0

  301. sealed abstract class MaybeTInstances0 extends MaybeTInstances1

  302. sealed abstract class MaybeTInstances1 extends MaybeTInstances2

  303. sealed abstract class MaybeTInstances2 extends AnyRef

  304. sealed trait Memo[K, V] extends AnyRef

    A function memoization strategy.

    A function memoization strategy. See companion for various instances employing various strategies.

  305. trait MemoFunctions extends AnyRef

  306. trait MemoInstances extends AnyRef

  307. case class Middle3[+A, +B, +C](b: B) extends Either3[A, B, C] with Product with Serializable

  308. type MinMaybe[A] = Maybe[A] with Tagged[Min]

  309. type MinOf[A] = A with Tagged[MinVal]

  310. type MinOption[A] = Option[A] with Tagged[Min]

  311. trait Monad[F[_]] extends Applicative[F] with Bind[F]

    Monad, an scalaz.Applicative that also supports scalaz.Bind, circumscribed by the monad laws.

    Monad, an scalaz.Applicative that also supports scalaz.Bind, circumscribed by the monad laws.

    See also

    scalaz.Monad.MonadLaw

  312. trait MonadListen[F[_, _], W] extends MonadTell[F, W]

  313. trait MonadPartialOrder[G[_], F[_]] extends NaturalTransformation[F, G]

    This trait establishes a partial order among monads.

    This trait establishes a partial order among monads. A "bigger" monad is one that does all of the effects of the "smaller" as part of its execution.

  314. trait MonadPartialOrderFunctions extends MonadPartialOrderFunctions1

  315. trait MonadPartialOrderFunctions1 extends AnyRef

  316. trait MonadPlus[F[_]] extends Monad[F] with ApplicativePlus[F]

  317. trait MonadReader[F[_, _], S] extends Monad[[x]F[S, x]]

  318. trait MonadState[F[_, _], S] extends Monad[[x]F[S, x]]

    The class of monads supporting the operations of scalaz.State.

  319. trait MonadTell[F[_, _], W] extends Monad[[α]F[W, α]]

    The class of monads supporting write operations

  320. trait MonadTrans[F[_[_], _]] extends AnyRef

    Class of monad transformers.

  321. trait Monoid[F] extends Semigroup[F]

    Provides an identity element (zero) to the binary append operation in scalaz.Semigroup, subject to the monoid laws.

    Provides an identity element (zero) to the binary append operation in scalaz.Semigroup, subject to the monoid laws.

    Example instances:

    • Monoid[Int]: zero and append are 0 and Int#+ respectively
    • Monoid[List[A]]: zero and append are Nil and List#++ respectively

    References:

    See also

    scalaz.Monoid.MonoidLaw

    scalaz.syntax.MonoidOps

  322. sealed abstract class Name[+A] extends AnyRef

    Call by name

  323. trait NaturalTransformation[-F[_], +G[_]] extends AnyRef

    A universally quantified function, usually written as F ~> G, for symmetry with A => B.

    A universally quantified function, usually written as F ~> G, for symmetry with A => B.

    Can be used to encode first-class functor transformations in the same way functions encode first-class concrete value morphisms; for example, sequence from scalaz.Traverse and cosequence from scalaz.Distributive give rise to ([a]T[A[a]]) ~> ([a]A[T[a]]), for varying A and T constraints.

  324. trait NaturalTransformations extends AnyRef

  325. sealed abstract class Need[+A] extends Name[A]

    Call by need

  326. sealed abstract class Node[V, A] extends AnyRef

  327. type NonEmptyIList[A] = OneAnd[IList, A]

  328. sealed trait NonEmptyList[+A] extends AnyRef

    A singly-linked list that is guaranteed to be non-empty.

  329. trait NonEmptyListFunctions extends AnyRef

  330. trait NonEmptyListInstances extends NonEmptyListInstances0

  331. trait NonEmptyListInstances0 extends AnyRef

  332. trait Nondeterminism[F[_]] extends Monad[F]

    A context supporting nondeterministic choice.

    A context supporting nondeterministic choice. Unlike Monad.bind, which imposes a total order on the sequencing of effects throughout a computation, the choose and chooseAny operations let us partially order the sequencing of effects. Canonical instances are concurrent.Future and concurrent.Task, which run their arguments in parallel, returning whichever comes back 'first'.

    TODO - laws

  333. sealed trait NotNothing[A] extends AnyRef

  334. case class One[V, A](v: V, a1: A)(implicit r: Reducer[A, V]) extends Finger[V, A] with Product with Serializable

  335. final case class OneAnd[F[_], A](head: A, tail: F[A]) extends Product with Serializable

    Since

    7.0.3

  336. trait OneAndFunctions extends AnyRef

  337. sealed abstract class OneAndInstances extends OneAndInstances0

  338. sealed abstract class OneAndInstances0 extends OneAndInstances1

  339. sealed abstract class OneAndInstances1 extends OneAndInstances2

  340. sealed abstract class OneAndInstances2 extends OneAndInstances3

  341. sealed abstract class OneAndInstances3 extends OneAndInstances4

  342. sealed abstract class OneAndInstances4 extends OneAndInstances5

  343. sealed abstract class OneAndInstances5 extends AnyRef

  344. final case class OneOr[F[_], A](run: \/[F[A], A]) extends Product with Serializable

    Since

    7.0.3

  345. trait OneOrFunctions extends AnyRef

  346. sealed abstract class OneOrInstances extends OneOrInstances0

  347. sealed abstract class OneOrInstances0 extends OneOrInstances1

  348. sealed abstract class OneOrInstances1 extends OneOrInstances2

  349. sealed abstract class OneOrInstances2 extends OneOrInstances3

  350. sealed abstract class OneOrInstances3 extends OneOrInstances4

  351. sealed abstract class OneOrInstances4 extends OneOrInstances5

  352. sealed abstract class OneOrInstances5 extends OneOrInstances6

  353. sealed abstract class OneOrInstances6 extends AnyRef

  354. final case class OptionT[F[+_], +A](run: F[Option[A]]) extends Product with Serializable

    OptionT monad transformer.

  355. trait OptionTFunctions extends AnyRef

  356. trait OptionTInstances extends OptionTInstances0

  357. trait OptionTInstances0 extends OptionTInstances1

  358. trait OptionTInstances1 extends OptionTInstances2

  359. trait OptionTInstances2 extends OptionTInstances3

  360. trait OptionTInstances3 extends AnyRef

  361. sealed trait OrdSeq[A] extends Ops[FingerTree[LastOption[A], A]]

    Ordered sequences, based on scalaz.FingerTree

    Ordered sequences, based on scalaz.FingerTree

    a has a higher priority than b if Order[A].greaterThan(a, b).

    insert and ++ maintains the ordering.

    The measure is calculated with a Monoid[Option[A] @@ Last], whose append operation favours the first argument. Accordingly, the measuer of a node is the item with the highest priority contained recursively below that node.

  362. trait Order[F] extends Equal[F]

    Safer version of scala.math.Ordering.

  363. sealed abstract class Ordering extends AnyRef

    A ternary marker of how two values relate in an ordering.

    A ternary marker of how two values relate in an ordering.

    Note

    scalaz calls its version of scala.math.Ordering, scalaz.Order. This Ordering is analogous to the Ints returned by scala.math.Ordering.

  364. trait OrderingFunctions extends AnyRef

  365. trait OrderingInstances extends AnyRef

  366. type PIndexedState[-S1, +S2, +A] = IndexedStateT[scalaz.Id.Id, S1, S2, Option[A]]

  367. type PIndexedStateT[F[+_], -S1, +S2, +A] = IndexedStateT[F, S1, S2, Option[A]]

  368. type PLens[A, B] = PLensFamily[A, A, B, B]

    A partial lens that doesn't transform the type of the record.

  369. sealed trait PLensFamily[-A1, +A2, +B1, -B2] extends AnyRef

    Partial Lens Families, offering a purely functional means to access and retrieve an optional field transitioning from type B1 to type B2 in a record that is simultaneously transitioning from type A1 to type A2.

    Partial Lens Families, offering a purely functional means to access and retrieve an optional field transitioning from type B1 to type B2 in a record that is simultaneously transitioning from type A1 to type A2. scalaz.PLens is a convenient alias for when F =:= Id, A1 =:= A2, and B1 =:= B2.

    The term field should not be interpreted restrictively to mean a member of a class. For example, a partial lens family can address the nth element of a List.

    A1

    The initial type of the record

    A2

    The final type of the record

    B1

    The initial type of the optional field

    B2

    The final type of the optional field

    See also

    scalaz.Lens

  370. trait PLensFamilyFunctions extends PLensInstances

  371. trait PLensFunctions extends PLensFamilyFunctions with PLensInstances

  372. trait PLensInstances extends AnyRef

  373. type PState[S, +A] = IndexedStateT[scalaz.Id.Id, S, S, Option[A]]

  374. type PStateT[F[+_], S, +A] = IndexedStateT[F, S, S, Option[A]]

  375. trait Plus[F[_]] extends AnyRef

    Universally quantified scalaz.Semigroup.

  376. trait PlusEmpty[F[_]] extends Plus[F]

    Universally quantified scalaz.Monoid.

  377. trait Profunctor[=>:[_, _]] extends AnyRef

    Profunctors are covariant on the right and contravariant on the left.

  378. type RWS[-R, +W, S, +A] = IndexedReaderWriterStateT[scalaz.Id.Id, R, W, S, S, A]

  379. type RWST[F[+_], -R, +W, S, +A] = IndexedReaderWriterStateT[F, R, W, S, S, A]

  380. trait Ran[G[_], H[_], A] extends AnyRef

    The right Kan extension of H along G

  381. case class Ranked[A](rank: Int, value: A) extends Product with Serializable

  382. type Reader[-E, +A] = Kleisli[scalaz.Id.Id, E, A]

  383. type ReaderT[F[+_], -E, +A] = Kleisli[F, E, A]

  384. type ReaderWriterState[-R, +W, S, +A] = IndexedReaderWriterStateT[scalaz.Id.Id, R, W, S, S, A]

  385. type ReaderWriterStateT[F[+_], -R, +W, S, +A] = IndexedReaderWriterStateT[F, R, W, S, S, A]

  386. trait ReaderWriterStateTFunctions extends AnyRef

  387. trait ReaderWriterStateTInstances extends IndexedReaderWriterStateTInstances

  388. sealed trait Reducer[C, M] extends AnyRef

    A Reducer[C,M] is a scalaz.Monoid[M] that maps values of type C through unit to values of type M.

    A Reducer[C,M] is a scalaz.Monoid[M] that maps values of type C through unit to values of type M. A C-Reducer may also supply operations which tack on another C to an existing Monoid M on the left or right. These specialized reductions may be more efficient in some scenarios and are used when appropriate by a scalaz.Generator. The names cons and snoc work by analogy to the synonymous operations in the list monoid.

    Minimal definition: unit or snoc

    Based on a Haskell library by Edward Kmett

  389. trait ReducerFunctions extends AnyRef

  390. trait ReducerInstances extends AnyRef

  391. abstract class Representable[F[_], X] extends AnyRef

    Representable functors, that is to say, those with isomorphisms to and from [a](X => a).

    Representable functors, that is to say, those with isomorphisms to and from [a](X => a). As such, all typeclasses and operations on [a](X => a), that is, fixed in X, can be trivially derived for F.

  392. trait RepresentableInstances extends AnyRef

  393. case class Right3[+A, +B, +C](c: C) extends Either3[A, B, C] with Product with Serializable

  394. sealed class Rope[A] extends Ops[FingerTreeIntPlus[ImmutableArray[A]]]

    Ropes or 'heavyweight Strings' are an alternative to Strings.

    Ropes or 'heavyweight Strings' are an alternative to Strings. In essence they are binary trees whose leaves are arrays of characters. Their advantage over ordinary strings is support for efficient concatenation and substring operations, which scale to long strings.

    They were first described in the paper: Ropes: an Alternative to Strings. by Hans-J. Boehm , Russ Atkinson , Michael Plass

    See also

    http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.14.9450&rep=rep1&type=pdf

  395. final class RopeBuilder[A] extends Builder[A, Rope[A]]

  396. sealed class RopeCharW extends Ops[Rope[Char]]

  397. trait Semigroup[F] extends AnyRef

    An associative binary operation, circumscribed by type and the semigroup laws.

    An associative binary operation, circumscribed by type and the semigroup laws. Unlike scalaz.Monoid, there is not necessarily a zero.

    See also

    http://mathworld.wolfram.com/Semigroup.html

    scalaz.syntax.SemigroupOps

    scalaz.Semigroup.SemigroupLaw

  398. trait Show[F] extends AnyRef

    A typeclass for conversion to textual representation, done via scalaz.Cord for efficiency.

  399. trait SinkInstances extends AnyRef

  400. trait SourceInstances extends AnyRef

  401. trait Split[=>:[_, _]] extends Category[=>:]

    A scalaz.Category permitting products.

  402. type State[S, +A] = IndexedStateT[scalaz.Id.Id, S, S, A]

    A state transition, representing a function S => (A, S).

  403. trait StateFunctions extends IndexedStateFunctions

  404. type StateT[F[+_], S, +A] = IndexedStateT[F, S, S, A]

    StateT Monad Transformer

    StateT Monad Transformer

    An introduction to the State Monad

  405. trait StateTFunctions extends IndexedStateTFunctions

  406. trait StateTInstances extends StateTInstances0

  407. trait StateTInstances0 extends StateTInstances1

  408. trait StateTInstances1 extends IndexedStateTInstances

  409. type Store[A, +B] = IndexedStoreT[scalaz.Id.Id, A, A, B]

  410. type StoreT[F[+_], A, +B] = IndexedStoreT[F, A, A, B]

  411. trait StoreTFunctions extends IndexedStoreTFunctions

  412. trait StoreTInstances extends StoreTInstances0

  413. trait StoreTInstances0 extends StoreTInstances1

  414. trait StoreTInstances1 extends StoreTInstances2

  415. trait StoreTInstances2 extends IndexedStoreTInstances

  416. sealed class StreamT[M[+_], +A] extends AnyRef

    StreamT monad transformer.

  417. trait StreamTInstances extends StreamTInstances0

  418. trait StreamTInstances0 extends StreamTInstances1

  419. trait StreamTInstances1 extends StreamTInstances2

  420. trait StreamTInstances2 extends AnyRef

  421. final case class Success[E, A](a: A) extends Validation[E, A] with Product with Serializable

  422. type Tagged[T] = AnyRef { type Tag = T }

  423. trait TheseFunctions extends AnyRef

  424. sealed abstract class TheseInstances extends TheseInstances0

  425. sealed abstract class TheseInstances0 extends TheseInstances1

  426. sealed abstract class TheseInstances1 extends AnyRef

  427. case class Three[V, A](v: V, a1: A, a2: A, a3: A)(implicit r: Reducer[A, V]) extends Finger[V, A] with Product with Serializable

  428. trait TrampolineInstances extends AnyRef

  429. trait Traverse[F[_]] extends Functor[F] with Foldable[F]

    Idiomatic traversal of a structure, as described in The Essence of the Iterator Pattern.

    Idiomatic traversal of a structure, as described in The Essence of the Iterator Pattern.

    See also

    scalaz.Traverse.TraverseLaw

  430. trait Traverse1[F[_]] extends Traverse[F] with Foldable1[F]

    A scalaz.Traverse where traverse is total over scalaz.Applys.

    A scalaz.Traverse where traverse is total over scalaz.Applys. That is, toList cannot return an empty list.

  431. sealed trait Tree[A] extends AnyRef

    A multi-way tree, also known as a rose tree.

    A multi-way tree, also known as a rose tree. Also known as Cofree[Stream, A].

  432. trait TreeFunctions extends AnyRef

  433. trait TreeInstances extends AnyRef

  434. sealed trait TreeLoc[A] extends AnyRef

    A rose-tree zipper.

    A rose-tree zipper. Represents a scalaz.Tree together with a position in that tree. Provides navigation, persistent update, insertion, and deletes.

  435. trait TreeLocFunctions extends AnyRef

  436. trait TreeLocInstances extends AnyRef

  437. case class Two[V, A](v: V, a1: A, a2: A)(implicit r: Reducer[A, V]) extends Finger[V, A] with Product with Serializable

  438. trait Unapply[TC[_[_]], MA] extends AnyRef

    Represents a type MA that has been destructured into as a type constructor M[_] applied to type A, along with a corresponding type class instance TC[M].

    Represents a type MA that has been destructured into as a type constructor M[_] applied to type A, along with a corresponding type class instance TC[M].

    The implicit conversions in the companion object provide a means to obtain type class instances for partially applied type constructors, in lieu of direct compiler support as described in SI-2712.

    // Directly depending on Applicative[G]
    def traverse[G[_], B](f: A => G[B])(implicit G: Applicative[G]): G[F[B]] =
      G.traverse(self)(f)
    
    // Indirect lookup of the Applicative instance
    // Requires -Ydep-method-types or Scala trunk circa Oct 2011
    def traverseI[GB](f: A => GB)(implicit G: Unapply[Applicative, GB]): G.M[F[G.A]] /*G[F[B]*/ = {
      G.TC.traverse(self)(a => G(f(a)))
    }
    
    // Deforested version of traverseI
    def traverseI2[GB](f: A => GB)(implicit G: Unapply[Applicative, GB]): G.M[F[G.A]] /*G[F[B]*/ = {
      G.TC.traverse(self)(G.leibniz.subst[({type ï¿Žï¾»[ï¿Žï¾±] = A => ï¿Žï¾±})#ï¿Žï¾»](f))
    }
    
    // Old usage
    def stateTraverse1 {
      import scalaz._, Scalaz._
      import State.{State, stateMonad}
      val ls = List(1, 2, 3)
      val traverseOpt: Option[List[Int]] = ls.traverse(a => Some(a))
      val traverseState: State[Int, List[Int]] = ls.traverse[({type ï¿Žï¾»[ï¿Žï¾±]=State[Int, ï¿Žï¾±]})#ï¿Žï¾», Int](a => State((x: Int) => (x + 1, a)))
    }
    
    // New usage
    def stateTraverse2 {
      import scalaz._, Scalaz._
      val ls = List(1, 2, 3)
      val traverseOpt: Option[List[Int]] = ls.traverseI(a => some(a))
      val traverseState = ls.traverseI(a => State((x: Int) => (x + 1, a)))
    }

    Credits to Miles Sabin.

    Annotations
    @implicitNotFound( ... )
  439. trait Unapply2[TC[_[_, _]], MAB] extends AnyRef

  440. trait Unapply21[TC[_[_, _], _], MAB] extends AnyRef

  441. trait Unapply2_0 extends AnyRef

  442. trait UnapplyCo[TC[_[_]], MA] extends AnyRef

    Unapply a covariant type constructor, maintaining the covariance

  443. trait UnapplyCo_0 extends UnapplyCo_1

  444. trait UnapplyCo_1 extends UnapplyCo_2

  445. trait UnapplyCo_2 extends UnapplyCo_3

  446. trait UnapplyCo_3 extends AnyRef

  447. trait UnapplyProduct[TC[_[_]], MA, MB] extends AnyRef

  448. trait Unapply_0 extends Unapply_1

  449. trait Unapply_1 extends Unapply_2

  450. trait Unapply_2 extends Unapply_3

  451. trait Unapply_3 extends Unapply_4

  452. trait Unapply_4 extends AnyRef

  453. trait UnionTypes extends AnyRef

    Union types using Curry-Howard isomorphism

  454. sealed trait UnitReducer[C, M] extends Reducer[C, M]

  455. type Unwriter[+W, +A] = UnwriterT[scalaz.Id.Id, W, A]

  456. sealed trait UnwriterT[F[+_], +U, +A] extends AnyRef

    This data type is isomorphic to WriterT, however, it is NOT a monad.

    This data type is isomorphic to WriterT, however, it is NOT a monad.

    It implements flatMap+map and drops the write value. There is no Monoid or Semigroup required. There is no point operation. You can switch between WriterT and UnwriterT with unary_+ and unary_-.

  457. trait UnwriterTFunctions extends AnyRef

  458. trait UnwriterTInstances extends UnwriterTInstances0

  459. trait UnwriterTInstances0 extends UnwriterTInstances1

  460. trait UnwriterTInstances1 extends UnwriterTInstances2

  461. trait UnwriterTInstances2 extends AnyRef

  462. trait Unzip[F[_]] extends AnyRef

  463. sealed trait Validation[+E, +A] extends AnyRef

    Represents either:

    Represents either:

    • Success(a), or
    • Failure(e).

    Isomorphic to scala.Either and scalaz.\/. The motivation for a Validation is to provide the instance Applicativea that accumulate failures through a scalaz.Semigroup[E].

    scalaz.NonEmptyList is commonly chosen as a type constructor for the type E. As a convenience, an alias scalaz.ValidationNel[E] is provided as a shorthand for scalaz.Validation[NonEmptyList[E]], and a method Validation#toValidationNel converts Validation[E] to ValidationNel[E].

    Example:

    import scalaz._, std.AllInstances._
    
    def parseInt(s: String): Validation[String, Int] =
      try { Success(s.toInt) } catch { case ex: NumberFormatException => Failure(ex.getMessage) }
    val V = Validation.validationNelApplicative[String]
    
    val x: ValidationNel[String, Int] =
      V.map2(parseInt("1.x").toValidationNel, parseInt("1..0").toValidationNel)(_ * _)
      // Failure(NonEmptyList(For input string: "1..0", For input string: "1.x"))
    E

    The type of the Failure

    A

    The type of the Success

  464. trait ValidationFunctions extends AnyRef

  465. trait ValidationInstances extends ValidationInstances0

  466. trait ValidationInstances0 extends ValidationInstances1

  467. trait ValidationInstances1 extends ValidationInstances2

  468. trait ValidationInstances2 extends ValidationInstances3

  469. trait ValidationInstances3 extends AnyRef

  470. type ValidationNel[+E, +X] = Validation[NonEmptyList[E], X]

    An scalaz.Validation with a scalaz.NonEmptyList as the failure type.

    An scalaz.Validation with a scalaz.NonEmptyList as the failure type.

    Useful for accumulating errors through the corresponding scalaz.Applicative instance.

  471. final case class Value[+A](value: A) extends Need[A] with Product with Serializable

    Call by value

  472. sealed abstract class ViewL[S[_], A] extends AnyRef

    View of the left end of a sequence.

  473. sealed abstract class ViewR[S[_], A] extends AnyRef

    View of the right end of a sequence.

  474. sealed class WrappedRope[A] extends Ops[Rope[A]] with IndexedSeq[A] with IndexedSeqLike[A, WrappedRope[A]]

  475. type Writer[+W, +A] = WriterT[scalaz.Id.Id, W, A]

  476. sealed trait WriterT[F[+_], +W, +A] extends AnyRef

  477. trait WriterTFunctions extends AnyRef

  478. trait WriterTInstance5 extends WriterTInstances6

  479. trait WriterTInstances extends WriterTInstances0

  480. trait WriterTInstances0 extends WriterTInstances1

  481. trait WriterTInstances1 extends WriterTInstances2

  482. trait WriterTInstances10 extends WriterTInstances11

  483. trait WriterTInstances11 extends WriterTInstances12

  484. trait WriterTInstances12 extends AnyRef

  485. trait WriterTInstances2 extends WriterTInstances3

  486. trait WriterTInstances3 extends WriterTInstances4

  487. trait WriterTInstances4 extends WriterTInstance5

  488. trait WriterTInstances6 extends WriterTInstances7

  489. trait WriterTInstances7 extends WriterTInstances8

  490. trait WriterTInstances8 extends WriterTInstances9

  491. trait WriterTInstances9 extends WriterTInstances10

  492. abstract class Yoneda[F[_], A] extends AnyRef

    The free functor generated by F.

    The free functor generated by F. The Yoneda lemma says that Yoneda[F,A] is isomorphic to F[A] for any functor F. The homomorphism from Yoneda[F,A] to F[A] exists even when we have forgotten that F is a functor. Can be seen as a partially applied map for the functor F.

  493. trait Zap[F[_], G[_]] extends AnyRef

    Functors that annihilate each other.

  494. trait ZapInstances extends AnyRef

  495. trait Zip[F[_]] extends AnyRef

  496. sealed trait Zipper[+A] extends AnyRef

    Provides a pointed stream, which is a non-empty zipper-like stream structure that tracks an index (focus) position in a stream.

    Provides a pointed stream, which is a non-empty zipper-like stream structure that tracks an index (focus) position in a stream. Focus can be moved forward and backwards through the stream, elements can be inserted before or after the focused position, and the focused item can be deleted.

    Based on the pointedlist library by Jeff Wheeler.

  497. trait ZipperFunctions extends AnyRef

  498. trait ZipperInstances extends AnyRef

  499. sealed abstract class \&/[A, B] extends Product with Serializable

    Since

    7.0.3

  500. sealed trait \/[+A, +B] extends AnyRef

    Represents a disjunction: a result that is either an A or a B.

    Represents a disjunction: a result that is either an A or a B.

    An instance of A \/ B is either a -\/[A] (aka a "left") or a \/-[B] (aka a "right").

    A common use of a disjunction is to explicitly represent the possibility of failure in a result as opposed to throwing an exception. By convention, the left is used for errors and the right is reserved for successes. For example, a function that attempts to parse an integer from a string may have a return type of NumberFormatException \/ Int. However, since there is no need to actually throw an exception, the type (A) chosen for the "left" could be any type representing an error and has no need to actually extend Exception.

    A \/ B is isomorphic to scala.Either[A, B], but \/ is right-biased, so methods such as map and flatMap apply only in the context of the "right" case. This right bias makes \/ more convenient to use than scala.Either in a monadic context. Methods such as swap, swapped, and leftMap provide functionality that scala.Either exposes through left projections.

    A \/ B is also isomorphic to Validation[A, B]. The subtle but important difference is that Applicative instances for Validation accumulates errors ("lefts") while Applicative instances for \/ fail fast on the first "left" they evaluate. This fail-fast behavior allows \/ to have lawful Monad instances that are consistent with their Applicative instances, while Validation cannot.

  501. case class \/-[+B](b: B) extends \/[Nothing, B] with Product with Serializable

    A right disjunction

    A right disjunction

    Often used to represent the success case of a result

  502. type |-->[+A, B] = IndexedStoreT[scalaz.Id.Id, B, B, A]

  503. type |>=|[G[_], F[_]] = MonadPartialOrder[G, F]

  504. type ~>[-F[_], +G[_]] = NaturalTransformation[F, G]

    A scalaz.NaturalTransformation[F, G].

  505. type ~~>[-F[_, _], +G[_, _]] = BiNaturalTransformation[F, G]

  506. type ⊤ = Any

  507. type ⊥ = Nothing

  508. sealed trait BKTree[A] extends AnyRef

    Burkhard-Keller trees provide an implementation of sets which apart from the ordinary operations also has an approximate member search, allowing you to search for elements that are of a distance n from the element you are searching for.

    Burkhard-Keller trees provide an implementation of sets which apart from the ordinary operations also has an approximate member search, allowing you to search for elements that are of a distance n from the element you are searching for. The distance is determined using a metric on the type of elements. Therefore all elements must implement the scalaz.MetricSpace type class, rather than the more usual scalaz.Ordering.

    The worst case complexity of many of these operations is quite bad, but the expected behavior varies greatly with the metric. For example, the discrete metric (distance x y | y == x = 0 | otherwise = 1) makes BK-trees behave abysmally. The metrics mentioned above should give good performance characteristics.

    This implementation is a port of Haskell's Data.Set.BKTree

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.1) This class depends on MetricSpace which is deprecated, too.

  509. trait MetricSpace[F] extends AnyRef

    Useful metric spaces include the manhattan distance between two points, the Levenshtein edit distance between two strings, the number of edges in the shortest path between two nodes in an undirected graph and the Hamming distance between two binary strings.

    Useful metric spaces include the manhattan distance between two points, the Levenshtein edit distance between two strings, the number of edges in the shortest path between two nodes in an undirected graph and the Hamming distance between two binary strings. Any euclidean space also has a metric. However, in this module we use int-valued metrics and that's not compatible with the metrics of euclidean spaces which are real-values.

    Annotations
    @deprecated
    Deprecated

    (Since version 7.0.1) Redundant to spire's MetricSpace

    See also

    scalaz.BKTree

Value Members

  1. object :+:

  2. object ==>> extends MapInstances with MapFunctions

  3. object Adjunction extends AdjunctionInstances with AdjunctionFunctions

  4. object Alpha extends AlphaFunctions with AlphaInstances

  5. object Applicative

  6. object ApplicativePlus

  7. object Apply

  8. object Arrow

  9. object BKTree extends BKTreeFunctions with BKTreeInstances

  10. object Bifoldable

  11. object Bifunctor

  12. object BijectionT extends BijectionTFunctions with BijectionTInstances

  13. object Bind

  14. object Bitraverse

  15. object BuildInfo extends Product with Serializable

  16. object CaseInsensitive extends CaseInsensitiveInstances

  17. object Catchable

  18. object Category

  19. object CharSet extends CharSetFunctions

  20. object Choice

  21. object Cobind

  22. object Codensity

  23. object Cofree extends CofreeFunctions with CofreeInstances with Serializable

  24. object Cohoist

  25. object Cojoin

  26. object Cokleisli extends CokleisliFunctions with CokleisliInstances

  27. object Comonad

  28. object ComonadStore

  29. object ComonadTrans

  30. object Compose

  31. object Const extends ConstInstances with ConstFunctions with Serializable

  32. object Cont extends IndexedContsTFunctions with IndexedContsTInstances

  33. object ContT extends IndexedContsTFunctions with IndexedContsTInstances

  34. object Contravariant

  35. object ContravariantCoyoneda extends ContravariantCoyonedaInstances

  36. object Conts extends IndexedContsTFunctions with IndexedContsTInstances

  37. object ContsT extends IndexedContsTFunctions with IndexedContsTInstances

  38. object Coproduct extends CoproductFunctions with CoproductInstances0

  39. object Cord

  40. object Coyoneda

  41. object Cozip

  42. val DLeft: -\/.type

  43. object DList extends DListFunctions with DListInstances

  44. val DRight: \/-.type

  45. object Dequeue extends DequeueInstances

  46. object Diev extends DievInstances with DievFunctions

  47. object DievInterval

  48. object Digit extends DigitFunctions with DigitInstances

  49. val Disjunction: \/.type

  50. val DisjunctionT: EitherT.type

  51. object Distributive extends DistributiveFunctions

  52. object Dual extends DualInstances

  53. object Each

  54. object Either3

  55. object EitherT extends EitherTFunctions with EitherTInstances

  56. object Endo extends EndoFunctions with EndoInstances

  57. object Enum

  58. object EphemeralStream extends EphemeralStreamFunctions with EphemeralStreamInstances

  59. object Equal

  60. object FingerTree extends FingerTreeInstances with FingerTreeFunctions

  61. object FoldCase extends FoldCaseInstances

  62. object Foldable

  63. object Foldable1

  64. object Forall extends Foralls

  65. object Free extends FreeFunctions with FreeInstances

  66. object FreeAp

  67. object Functor

  68. object Generator extends Generators

  69. object Heap extends HeapFunctions with HeapInstances

  70. object Hoist

  71. object IList extends IListInstances with IListFunctions with Serializable

  72. val IMap: ==>>.type

  73. val IRWS: IndexedReaderWriterState.type

  74. val IRWST: IndexedReaderWriterStateT.type

  75. object ISet extends ISetInstances with ISetFunctions

  76. object Id extends IdInstances

  77. object IdT extends IdTFunctions with IdTInstances with Serializable

  78. object ImmutableArray extends ImmutableArrayFunctions

  79. object IndSeq

  80. object Index

  81. object IndexedCont extends IndexedContsTFunctions with IndexedContsTInstances

  82. object IndexedContT extends IndexedContsTFunctions with IndexedContsTInstances

  83. object IndexedConts extends IndexedContsTFunctions with IndexedContsTInstances

  84. object IndexedContsT extends IndexedContsTFunctions with IndexedContsTInstances

  85. object IndexedReaderWriterState extends ReaderWriterStateTFunctions with ReaderWriterStateTInstances

  86. object IndexedReaderWriterStateT extends ReaderWriterStateTFunctions with ReaderWriterStateTInstances

  87. object IndexedState extends StateFunctions

  88. object IndexedStateT extends StateTFunctions with StateTInstances

  89. object IndexedStore

  90. object IndexedStoreT extends StoreTFunctions with StoreTInstances

  91. object Injectivity

  92. object InsertionMap extends InsertionMapFunctions with InsertionMapInstances

  93. object IsEmpty

  94. object Isomorphism extends Isomorphisms

  95. object Kleisli extends KleisliFunctions with KleisliInstances

  96. object Lan

  97. object LazyEither extends LazyEitherFunctions with LazyEitherInstances

  98. object LazyEitherT extends LazyEitherTFunctions with LazyEitherTInstances

  99. object LazyOption extends LazyOptionFunctions with LazyOptionInstances

  100. object LazyOptionT extends LazyOptionTFunctions with LazyOptionTInstances

  101. object LazyTuple extends LazyTupleFunctions

  102. object LazyTuple2 extends LazyTuple2Instances

  103. object LazyTuple3 extends LazyTuple3Instances

  104. object LazyTuple4 extends LazyTuple4Instances

  105. object Leibniz extends LeibnizInstances with LeibnizFunctions

  106. object Length

  107. object Lens extends LensFunctions with LensInstances

  108. object LensFamily extends LensFunctions with LensInstances

  109. object Liskov extends LiskovInstances with LiskovFunctions

  110. object ListT extends ListTInstances with Serializable

  111. object Maybe extends MaybeInstances with MaybeFunctions

  112. object MaybeT extends MaybeTInstances with MaybeTFunctions with Serializable

  113. object Memo extends MemoFunctions with MemoInstances

  114. object MetricSpace

  115. object Monad

  116. object MonadListen

  117. object MonadPartialOrder extends MonadPartialOrderFunctions

  118. object MonadPlus

  119. object MonadReader

  120. object MonadState

  121. object MonadTell

  122. object MonadTrans

  123. object Monoid

  124. object Name

  125. object NaturalTransformation extends NaturalTransformations

  126. object Need

  127. object NonEmptyList extends NonEmptyListFunctions with NonEmptyListInstances

  128. object Nondeterminism

  129. object NotNothing

  130. object OneAnd extends OneAndInstances with OneAndFunctions with Serializable

  131. object OneOr extends OneOrInstances with OneOrFunctions with Serializable

  132. object OptionT extends OptionTFunctions with OptionTInstances with Serializable

  133. object OrdSeq

  134. object Order

  135. object Ordering extends OrderingFunctions with OrderingInstances

  136. object PLens extends PLensFunctions with PLensInstances

  137. object PLensFamily extends PLensFunctions with PLensInstances

  138. object Plus

  139. object PlusEmpty

  140. object Profunctor

  141. val RWS: ReaderWriterState.type

  142. val RWST: ReaderWriterStateT.type

  143. object Ran

  144. object Reader

  145. object ReaderWriterState extends ReaderWriterStateTFunctions with ReaderWriterStateTInstances

  146. object ReaderWriterStateT extends ReaderWriterStateTFunctions with ReaderWriterStateTInstances

  147. object Reducer extends ReducerFunctions with ReducerInstances

  148. object Representable extends RepresentableInstances

  149. object Rope

  150. object Scalaz extends StateFunctions with ToTypeClassOps with ToDataOps with AllInstances with AllFunctions with ToAllStdOps with IdInstances

  151. object Semigroup

  152. object Show

  153. object Sink extends SinkInstances

  154. object Source extends SourceInstances

  155. object Split

  156. object State extends StateFunctions

  157. object StateT extends StateTFunctions with StateTInstances

  158. object Store

  159. object StoreT extends StoreTFunctions with StoreTInstances

  160. object StreamT extends StreamTInstances

  161. object Tag

  162. object Tags

    Type tags that are used to discriminate between alternative type class instances.

    Type tags that are used to discriminate between alternative type class instances.

    See also

    scalaz.Tag and, @@ in the package object scalaz .

  163. object Trampoline extends TrampolineInstances

  164. object Traverse

  165. object Traverse1

  166. object Tree extends TreeFunctions with TreeInstances

  167. object TreeLoc extends TreeLocFunctions with TreeLocInstances

  168. object Unapply extends Unapply_0

  169. object Unapply2 extends Unapply2_0

  170. object Unapply21

  171. object UnapplyCo extends UnapplyCo_0

  172. object UnapplyProduct

  173. object UnionTypes extends UnionTypes

  174. object UnitReducer

  175. object Unwriter

  176. object UnwriterT extends UnwriterTFunctions with UnwriterTInstances

  177. object Unzip

  178. object Validation extends ValidationFunctions with ValidationInstances

  179. object Value extends Serializable

  180. object Writer

  181. object WriterT extends WriterTFunctions with WriterTInstances

  182. object Yoneda

  183. object Zap extends ZapInstances

  184. object Zip

  185. object Zipper extends ZipperFunctions with ZipperInstances

  186. object \&/ extends TheseInstances with TheseFunctions with Serializable

  187. object \/ extends DisjunctionInstances with DisjunctionFunctions

  188. implicit val idInstance: Traverse1[scalaz.Id.Id] with Each[scalaz.Id.Id] with Monad[scalaz.Id.Id] with Comonad[scalaz.Id.Id] with Cojoin[scalaz.Id.Id] with Distributive[scalaz.Id.Id] with Zip[scalaz.Id.Id] with Unzip[scalaz.Id.Id] with Cozip[scalaz.Id.Id]

  189. package std

    Type Class instances for data structures in the Scala and Java standard libraries.

  190. package syntax

    Implicits to provide a convenient syntax to work with type classes and functions.

    Implicits to provide a convenient syntax to work with type classes and functions.

    Non-trivial code should *not* be defined in this package; instead delegate.

Inherited from AnyRef

Inherited from Any

Ungrouped