← ZIO Prelude docs

Hash

zio.prelude.Hash
See theHash companion trait
object Hash

Attributes

Companion
trait
Source
Hash.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Hash.type

Members list

Value members

Concrete methods

def apply[A](implicit hash: Hash[A]): Hash[A]

Summons an implicit Hash[A].

Summons an implicit Hash[A].

Attributes

Source
Hash.scala
def default[A]: Hash[A]

Constructs a Hash[A] that uses the default notion of hashing embodied in the implementation of hashCode for values of type A.

Constructs a Hash[A] that uses the default notion of hashing embodied in the implementation of hashCode for values of type A.

Attributes

Source
Hash.scala
def make[A](hash0: A => Int, equal0: (A, A) => Boolean): Hash[A]

Constructs an instance from a function.

Constructs an instance from a function.

Attributes

Source
Hash.scala
def makeFrom[A](hash0: A => Int, equal0: Equal[A]): Hash[A]

Constructs an instance from a hash function and an Equal instance.

Constructs an instance from a hash function and an Equal instance.

Attributes

Source
Hash.scala

Implicits

Implicits

implicit def ChunkHash[A : Hash]: Hash[Chunk[A]]

Derives a Hash[Chunk[A]] given a Hash[A].

Derives a Hash[Chunk[A]] given a Hash[A].

Attributes

Source
Hash.scala
implicit def DeriveHash[F[_], A](implicit derive: Derive[F, Hash], hash: Hash[A]): Hash[F[A]]

Derives a Hash[F[A]] given a Derive[F, Hash] and a Hash[A].

Derives a Hash[F[A]] given a Derive[F, Hash] and a Hash[A].

Attributes

Source
Hash.scala
implicit def EitherHash[A : Hash, B : Hash]: Hash[Either[A, B]]

Derives a Hash[Either[A, B]] given a Hash[A] and a Hash[B].

Derives a Hash[Either[A, B]] given a Hash[A] and a Hash[B].

Attributes

Source
Hash.scala

The contravariant instance for Hash.

The contravariant instance for Hash.

Attributes

Source
Hash.scala
implicit def ListHash[A : Hash]: Hash[List[A]]

Derives a Hash[List[A]] given a Hash[A].

Derives a Hash[List[A]] given a Hash[A].

Attributes

Source
Hash.scala
implicit def MapHash[A, B : Hash]: Hash[Map[A, B]]

Derives a Hash[Map[A, B]] given a Hash[B]. Due to the limitations of Scala's Map, this uses object equality and hash code on the keys.

Derives a Hash[Map[A, B]] given a Hash[B]. Due to the limitations of Scala's Map, this uses object equality and hash code on the keys.

Attributes

Source
Hash.scala
implicit def NonEmptyChunkHash[A : Hash]: Hash[NonEmptyChunk[A]]

Derives a Hash[NonEmptyChunk[A]] given a Hash[A].

Derives a Hash[NonEmptyChunk[A]] given a Hash[A].

Attributes

Source
Hash.scala
implicit def OptionHash[A : Hash]: Hash[Option[A]]

Derives a Hash[Option[A]] given a Hash[A].

Derives a Hash[Option[A]] given a Hash[A].

Attributes

Source
Hash.scala
implicit def Tuple10Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple11Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple12Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple13Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple14Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple15Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple16Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple17Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash, Q : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple18Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash, Q : Hash, R : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple19Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash, Q : Hash, R : Hash, S : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple20Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash, Q : Hash, R : Hash, S : Hash, T : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple21Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash, Q : Hash, R : Hash, S : Hash, T : Hash, U : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple22Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash, J : Hash, K : Hash, L : Hash, M : Hash, N : Hash, O : Hash, P : Hash, Q : Hash, R : Hash, S : Hash, T : Hash, U : Hash, V : Hash]: Hash[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple2Hash[A : Hash, B : Hash]: Hash[(A, B)]

Derives a Hash for a product type given a Hash for each element of the product type.

Derives a Hash for a product type given a Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple3Hash[A : Hash, B : Hash, C : Hash]: Hash[(A, B, C)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple4Hash[A : Hash, B : Hash, C : Hash, D : Hash]: Hash[(A, B, C, D)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple5Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash]: Hash[(A, B, C, D, E)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple6Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash]: Hash[(A, B, C, D, E, F)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple7Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash]: Hash[(A, B, C, D, E, F, G)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple8Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash]: Hash[(A, B, C, D, E, F, G, H)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def Tuple9Hash[A : Hash, B : Hash, C : Hash, D : Hash, E : Hash, F : Hash, G : Hash, H : Hash, I : Hash]: Hash[(A, B, C, D, E, F, G, H, I)]

Derives an Hash for a product type given an Hash for each element of the product type.

Derives an Hash for a product type given an Hash for each element of the product type.

Attributes

Source
Hash.scala
implicit def VectorHash[A : Hash]: Hash[Vector[A]]

Derives a Hash[Vector[A]] given a Hash[A].

Derives a Hash[Vector[A]] given a Hash[A].

Attributes

Source
Hash.scala