module

decrel.reify.bifunctor.module
trait module[F[_, _]] extends access with proof

Attributes

Graph
Supertypes
trait proof
trait access
class Object
trait Matchable
class Any
Known subtypes
trait either
object either.type

Members list

Concise view

Type members

Inherited classlikes

abstract class Proof[Rel, -In, +E, +Out]

Attributes

Inherited from:
proof
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Many[Rel, In, E, Out, Coll]
trait Optional[Rel, In, E, Out]
trait Single[Rel, In, E, Out]
object Proof

Attributes

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

Attributes

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

Attributes

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

Types

override type Access[+A, +B] = F[A, B]

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

Value members

Inherited methods

protected def flatMap[E, A, B](access: F[E, A])(f: A => F[E, B]): Access[E, 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

Inherited from:
access
protected def foreach[Coll <: (Iterable), E, A, B](collection: Coll[A])(f: A => F[E, B])(implicit bf: BuildFrom[Coll[A], B, Coll[B]]): Access[E, 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
protected def map[E, A, B](access: F[E, A])(f: A => B): Access[E, 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

Inherited from:
access
protected def succeed[A](a: A): Access[Nothing, A]

aka pure, point, ...

aka pure, point, ...

Attributes

Inherited from:
access

Implicits

Inherited implicits

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

Attributes

Inherited from:
proof