access

decrel.reify.monofunctor.access
trait access

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait module[F]
Self type

Members list

Concise view

Type members

Types

type Access[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

Value members

Abstract methods

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

aka pure, point, ...

aka pure, point, ...

Attributes

Concrete methods

protected def foreach[Coll <: (Iterable), A, B](collection: Coll[A])(f: A => Access[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