Morph

dev.constructive.eo.compose.Morph
See theMorph companion object
trait Morph[F[_, _], G[_, _]]

Picks the direction to morph a pair of optics into a shared carrier so .andThen works across carriers. Four givens, decreasing priority:

cats-eo ships essentially one bidirectional Composer pair — forget2multifocus / multifocus2forget (the latter restricted to T = Unit). For every other carrier pair at most one of the first three fires; for that one pair a Forget[F]MultiFocus[F] chain can be ambiguous, resolved by routing through the explicit Composer[..].to(o) form (see multifocus2forget's docstring).

Type parameters

F

outer carrier

G

inner carrier

Attributes

Companion
object
Source
Morph.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type Out[_, _]

Common target carrier both F and G morph into.

Common target carrier both F and G morph into.

Attributes

Source
Morph.scala

Value members

Abstract methods

def morphO[A, B, C, D](o: Optic[A, B, C, D, G]): Optic[A, B, C, D, Out]

Lift the inner (G-carrier) optic into the shared Out carrier.

Lift the inner (G-carrier) optic into the shared Out carrier.

Attributes

Source
Morph.scala
def morphSelf[S, T, A, B](o: Optic[S, T, A, B, F]): Optic[S, T, A, B, Out]

Lift the outer (F-carrier) optic into the shared Out carrier.

Lift the outer (F-carrier) optic into the shared Out carrier.

Attributes

Source
Morph.scala