nutcracker.util

Type members

Classlikes

sealed abstract class APairK[F[_[_]], G[_[_]]]
Companion:
object
object APairK
Companion:
class
trait Aggregator[B, A] extends (B, A) => B

Represents the kind of function that one passes to foldLeft, as a typeclass.

Represents the kind of function that one passes to foldLeft, as a typeclass.

Companion:
object
object Aggregator
Companion:
class
abstract class AggregatorK[B, F[_]]
Companion:
object
Companion:
class
trait Catenable[F[_]] extends PlusEmpty[F]
trait Choose[L <: HList, C <: HList] extends L => C
Companion:
object
object Choose
Companion:
class
trait ChooseByNats[L <: HList, C <: HList, NS <: HList] extends NS => Choose[L, C]
Companion:
object
Companion:
class
trait ChooseByPtrs[L <: HList, C <: HList, Ptrs <: HList] extends Ptrs => Choose[L, C]
Companion:
object
Companion:
class
object ContT
object ContU
object CoproductK
trait DeepEqual[A1, A2, Ptr1[_], Ptr2[_]]

Comparing of (potentially cyclic) object graphs for equality. Features:

Comparing of (potentially cyclic) object graphs for equality. Features:

  • abstracted over pointers;
  • termination and correctness in presence of cycles;
  • stack safety.

XXX: Relies on meaningful hashCode and equals for Ptr1

Companion:
object
object DeepEqual
Companion:
class
trait DeepEqualK[F1[_[_]], F2[_[_]]]
object DeepShow
trait DeepShowK[A[_[_]]]
object Desc
case class ENone[F[_]]() extends ExistsOption[F]
case class ESome[F[_], A](value: F[A]) extends ExistsOption[F]
trait EqualK[F[_]]

Universally quantified equality, isomorphic to ∀A. Equal[F[A]].

Universally quantified equality, isomorphic to ∀A. Equal[F[A]].

Note that equality on A is not required to compare values of F[A].

Companion:
object
object EqualK
Companion:
class
sealed abstract class Exists[F[_]]
Companion:
object
object Exists
Companion:
class
sealed trait ExistsOption[F[_]]
Companion:
object
Companion:
class
final class FreeK[F[_[_], _], A](val unwrap: Free[[_] =>> F[[_] =>> FreeK[F, _$4], _$5], A])

Free monad for type constructors of kind F[_[_], _], where F's first type parameter is recursively set to FreeK[F, ?]. If we pretend that recursive type aliases are legal, then FreeK is equivalent to

Free monad for type constructors of kind F[_[_], _], where F's first type parameter is recursively set to FreeK[F, ?]. If we pretend that recursive type aliases are legal, then FreeK is equivalent to

type FreeK[F[_[_], _], A] = Free[F[FreeK[F, ?], ?], A]

This is useful for instruction sets (a.k.a. algebras, DSLs, ...) that need to refer to the type of the free program that they are embedded in.

Companion:
object
object FreeK
Companion:
class
final case class FreeKT[F[_[_], _], M[_], A](run: FreeT[[_] =>> F[[_] =>> FreeKT[F, M, _$5], _$6], M, A])
Companion:
object
object FreeKT
Companion:
class
final class FreeObjectOutput[R, Ptr[_], A]
Companion:
object
Companion:
class
trait FunctorKA[F[_[_], _]]
trait HEqual[A, B]

Heterogeneous equality, i.e. able to compare values of two disparate types.

Heterogeneous equality, i.e. able to compare values of two disparate types.

Companion:
object
object HEqual
Companion:
class
trait HEqualK[F[_]] extends EqualK[F]

Universally quantified heterogeneous equality, isomorphic to ∀A,B. HEqual[F[A], F[B]].

Universally quantified heterogeneous equality, isomorphic to ∀A,B. HEqual[F[A], F[B]].

Note that (heterogeneous) equality between A and B is not required to compare F[A] to F[B].

Companion:
object
object HEqualK
Companion:
class
final case class HHKMap[K[_[_[_]]], V[_[_[_]]]](map: Map[K[Nothing], V[Nothing]]) extends AnyVal
Companion:
object
object HHKMap
Companion:
class
final case class HKMap[K[_[_]], V[_[_]]](map: Map[K[Nothing], V[Nothing]]) extends AnyVal
Companion:
object
object HKMap
Companion:
class
sealed trait HList
Companion:
object
object HList
Companion:
class
sealed trait HListPtr[L <: HList, N <: Nat]
Companion:
object
object HListPtr
Companion:
class
trait HOrderK[F[_]] extends HEqualK[F] with OrderK[F]
Companion:
object
object HOrderK
Companion:
class
case class Id[A](value: A)
Companion:
object
object Id
Companion:
class
object Index
trait Inject[F[_], G[_]] extends NaturalTransformation[F, G]

Similar to scalaz.Inject, except:

Similar to scalaz.Inject, except:

  • not sealed, thus not restricted to injections into scalaz.Coproduct;
  • doesn't require to implement projection, so more instances are possible.
Companion:
object
object Inject extends InjectInstances0
Companion:
class
final case class IsEqual[Ptr1[_], Ptr2[_]]
Companion:
object
object IsEqual
Companion:
class
final case class K2Map[K[_, _], V[_, _]](map: Map[K[Nothing, Nothing], V[Nothing, Nothing]]) extends AnyVal
Companion:
object
object K2Map
Companion:
class
final case class K3Map[K[_, _, _], V[_, _, _]](map: Map[K[Nothing, Nothing, Nothing], V[Nothing, Nothing, Nothing]]) extends AnyVal
Companion:
object
object K3Map
Companion:
class
sealed abstract class K3Pair[K[_, _, _], V[_, _, _]]
Companion:
object
object K3Pair
Companion:
class
final case class KMap[K[_], V[_]](map: Map[K[Any], V[Any]]) extends AnyVal
Companion:
object
object KMap
Companion:
class
final case class KMap1_2[K[_], V[_, _, _], TC[_, _, _]](map: Map[K[Nothing], V[Nothing, Nothing, Nothing]]) extends AnyVal

KMap where values are parameterized by 2 additional type parameters, uniquely determined by a typeclass instance. Type safety relies on TC[A, B, C] being functional in A, i.e. for each A there are globally unique B, C such that there is an instance of TC[A, B, C].

KMap where values are parameterized by 2 additional type parameters, uniquely determined by a typeclass instance. Type safety relies on TC[A, B, C] being functional in A, i.e. for each A there are globally unique B, C such that there is an instance of TC[A, B, C].

Companion:
object
object KMap1_2
Companion:
class
final case class KMapB[K[_ <: UB], V[_ <: UB], UB](map: Map[K[Nothing], V[Nothing]]) extends AnyVal

KMap with an upper bound on the type parameter accepted by K[_], V[_].

KMap with an upper bound on the type parameter accepted by K[_], V[_].

Companion:
object
object KMapB
Companion:
class
sealed abstract class Lst[+A]

Linked list with O(1) cons, snoc and concatenation and amortized O(1) uncons.

Linked list with O(1) cons, snoc and concatenation and amortized O(1) uncons.

Companion:
object
object Lst
Companion:
class
trait Mapped[L <: HList, F[_]] extends Serializable
Companion:
object
object Mapped
Companion:
class
Companion:
object
Companion:
class
final class Mediated[M[_], A, B, C](value: M[(A, B => M[C])]) extends AnyVal

Computation of C with a missing link between A and B. Encapsulates effectful computations () ~~~> A and B ~~~> C. By plugging in A ~~~> B one can obtain () ~~~> C. The purpose of this class is to prevent using just one of the two encapsulated computations: either both, or none. This is useful when the effects of the two computations are somehow paired and this pairing can't be broken. This is only safe when M is a lazy monad with benign effects.

Computation of C with a missing link between A and B. Encapsulates effectful computations () ~~~> A and B ~~~> C. By plugging in A ~~~> B one can obtain () ~~~> C. The purpose of this class is to prevent using just one of the two encapsulated computations: either both, or none. This is useful when the effects of the two computations are somehow paired and this pairing can't be broken. This is only safe when M is a lazy monad with benign effects.

Companion:
object
object Mediated
Companion:
class
trait MonadObjectOutput[F[_], R, Ptr[_]] extends MonadTell[F, R] with BindRec[F]
trait MonadTellState[F[_], W, S] extends MonadTell[F, W] with MonadState[F, S]
trait MonoidAggregator[B, A] extends Aggregator[B, A] with Monoid[B]
trait MonoidK[F[_]]
sealed trait Nat
Companion:
object
object Nat
Companion:
class
trait ObjectOutput[O, R, Ptr[_]]
Type parameters:
O

represents output. Examples: String, java.io.OutputStream, ...

Ptr

abstraction of pointers.

R

represents type of data to be written to the output. Examples: String, bit string, ...

Companion:
object
Companion:
class
trait ObjectSerializer[A, S, Ptr[_]]

Serialization of (potentially cyclic) object graphs. Features:

Serialization of (potentially cyclic) object graphs. Features:

  • abstracted over pointers;
  • termination and correctness in presence of cycles;
  • stack safety.
Type parameters:
A

type of objects that this serializer can serialize.

Ptr

abstraction of pointers.

S

type of data this serializer writes when serializing A, e.g. String, byte array, etc.

Companion:
object
Companion:
class
trait OrderK[F[_]] extends EqualK[F]
trait Pointers[L <: HList]
Companion:
object
object Pointers
Companion:
class
trait Pointers0[L <: HList, T <: HList, N <: Nat]
Companion:
object
object Pointers0
Companion:
class
trait ShowK[F[_]] extends NaturalTransformation[F, [α] =>> String]
Companion:
object
object ShowK
Companion:
class
abstract class StateInterpreter[K[_], F[_], S]
trait StratifiedAggregator[B, A] extends (B, A, Int) => B
trait StratifiedMonoidAggregator[B, A] extends StratifiedAggregator[B, A] with Monoid[B]
trait SummonHList[L <: HList]

Used to implicitly summon an HList by implicitly summoning its elements.

Used to implicitly summon an HList by implicitly summoning its elements.

Companion:
object
Companion:
class
trait Transformed[L <: HList, F[_], G[_]] extends Serializable
Companion:
object
Companion:
class
case class TransformedIndex[K, VIn, VOut]
Companion:
object
Companion:
class
case class TwoLevel[F[_], A](_1: F[A], _2: F[A])
Companion:
object
Companion:
class
trait ValuedPointers[V <: HList, PA <: HList]
Companion:
object
Companion:
class
final case class WriterStateT[W, S, F[_], A](run: S => F[(W, S, A)]) extends AnyVal
Companion:
object
Companion:
class
sealed abstract class `Exists{(* -> *) -> *}`[F[_[_]]]
Companion:
object

Universally quantified value: ∀ K[_], A. F[K, A]

Universally quantified value: ∀ K[_], A. F[K, A]

Universally quantified value: ∀ K[_]. F[K]

Universally quantified value: ∀ K[_]. F[K]

trait `Forall{* -> *}`[F[_]]

Universally quantified value: ∀ A. F[A]

Universally quantified value: ∀ A. F[A]

trait `FunctionK{(* -> *) -> * -> *}`[F[_[_], _], G[_[_], _]]

Universally quantified function: ∀ K[_], A. F[K, A] => G[K, A]

Universally quantified function: ∀ K[_], A. F[K, A] => G[K, A]

Companion:
object
trait `FunctionK{(* -> *) -> *}`[F[_[_]], G[_[_]]]

Universally quantified function: ∀ K[_]. F[K] => G[K]

Universally quantified function: ∀ K[_]. F[K] => G[K]

Types

type Cont[R, A] = ContT[R, Id, A]
type ContT[R, M[_], A] = IndexedContT[R, R, M, A]
type ContU[M[_], A] = ContT[Unit, M, A]

Continuation monad with result type M[Unit].

Continuation monad with result type M[Unit].

type DeepShow[A, Ptr[_]] = ObjectSerializer[A, String, Ptr]
type Desc[Ptr[_]] = FreeObjectOutput[String, Ptr, Unit]
type Forall[F[_]] = `Forall{* -> *}`[F]
type Index[K, V] = TransformedIndex[K, V, V]
type IndexedContT[R, O, M[_], A] = IndexedContsT[Id, R, O, M, A]
type Uninhabited = Nothing { type T = Unit; }
type WriterState[W, S, A] = WriterStateT[W, S, Id, A]
type ≈>[F[_[_]], G[_[_]]] = F `FunctionK{(* -> *) -> *}` G
type ≈~>[F[_[_], _], G[_[_], _]] = F `FunctionK{(* -> *) -> * -> *}` G