catsMonad

decrel.reify.catsMonad
trait catsMonad[F[_]] extends module[F]

Attributes

Graph
Supertypes
trait module[F]
trait proof
trait access
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Inherited classlikes

abstract class Proof[Rel, -In, Out]

Attributes

Inherited from:
proof
Graph
Supertypes
class Object
trait Matchable
class Any
object Proof

Attributes

Inherited from:
proof
Graph
Supertypes
class Object
trait Matchable
class Any
abstract class ReifiedRelation[-In, Out]

Attributes

Inherited from:
proof
Graph
Supertypes
class Object
trait Matchable
class Any
implicit class relationOps[Rel, In, Out](val rel: Rel & Relation[In, Out])

Attributes

Inherited from:
proof
Graph
Supertypes
class Object
trait Matchable
class Any

Inherited types

override type Access[A] = F[A]

An Access datatype represents an action, when evaluated, brings a value of type A into memory. The datatype needs to be monadic for the derivation mechanism to work.

An Access datatype represents an action, when evaluated, brings a value of type A into memory. The datatype needs to be monadic for the derivation mechanism to work.

The bifunctor package supports Access values that are bifunctors (covariant on both type parameters, i.e. not profunctors), but does not place any assumption on the meaning of the first type parameter.

Attributes

Inherited from:
module

Value members

Concrete methods

protected def flatMap[A, B](access: F[A])(f: A => F[B]): F[B]

Good ol' flatMap.

Good ol' flatMap.

To traverse a relation graph edge by edge is sequential computation, so we require flatMap to be implemented on Access.

Attributes

protected def map[A, B](access: F[A])(f: A => B): F[B]

Plain ol' map.

Plain ol' map.

Can be implemented in terms of flatMap and succeed, but probably a bad idea considering what kinds of datatypes will be used to implement Access.

Attributes

protected def succeed[A](a: A): F[A]

aka pure, point, ...

aka pure, point, ...

Attributes

Inherited methods

protected def foreach[Coll <: (Iterable), A, B](collection: Coll[A])(f: A => F[B])(implicit bf: BuildFrom[Coll[A], B, Coll[B]]): Access[Coll[B]]

aka traverse.

aka traverse.

If you are implementing Access with your own datatype, and if you want batching/parallel behavior, please override this default behavior with a more efficient version that comes with your datatype.

See zquery or fetch modules for examples.

Attributes

Inherited from:
access

Abstract fields

protected val F: Monad[F]

Implicits

Inherited implicits

final implicit def relationOps[Rel, In, Out](rel: Rel & Relation[In, Out]): relationOps[Rel, In, Out]

Attributes

Inherited from:
proof