Composer

dev.constructive.eo.compose.Composer
See theComposer companion trait

Typeclass instances for Composer. Additional composers live near the carrier they produce (e.g. Composer[Tuple2, Affine] in data.Affine).

Resolution tiers:

  1. Regular: direct bridges here and in each carrier's companion.
  2. Low (from LowPriorityComposerInstances): chainViaTuple2 with Tuple2 as a fixed intermediate. Covers Direct-origin chains uniformly without introducing the implicit ambiguity the earlier fully-general chain[F, G, H] had.

Attributes

Companion
trait
Source
Composer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Composer.type

Members list

Grouped members

Instances

given chainViaTuple2: [F[_, _], G[_, _]] => (Composer[F, Tuple2], Composer[Tuple2, G]) => chainViaTuple2[F, G]

Transitive derivation via Tuple2 as the intermediate carrier: given F → Tuple2 and Tuple2 → G, derive F → G. Fires cleanly for Direct-origin chains to any target with a Composer[Tuple2, _] direct (Affine / ModifyF / MultiFocus[F] / MultiFocus[PSVec]).

Transitive derivation via Tuple2 as the intermediate carrier: given F → Tuple2 and Tuple2 → G, derive F → G. Fires cleanly for Direct-origin chains to any target with a Composer[Tuple2, _] direct (Affine / ModifyF / MultiFocus[F] / MultiFocus[PSVec]).

Attributes

Inherited from:
LowPriorityComposerInstances
Source
Composer.scala

Express an Iso (or Getter) as a Prism — always takes the Right branch; Nothing in the Left slot so the miss branch is uninhabited.

Express an Iso (or Getter) as a Prism — always takes the Right branch; Nothing in the Left slot so the miss branch is uninhabited.

Attributes

Source
Composer.scala
object direct2either extends Composer[Direct, Either]

Express an Iso (or Getter) as a Prism — always takes the Right branch; Nothing in the Left slot so the miss branch is uninhabited.

Express an Iso (or Getter) as a Prism — always takes the Right branch; Nothing in the Left slot so the miss branch is uninhabited.

Attributes

Source
Composer.scala
Supertypes
trait Composer[Direct, Either]
class Object
trait Matchable
class Any
Self type
given direct2forget: [F[_]] => (Applicative[F], Foldable[F]) => direct2forget[F]

Express a Direct optic (a Getter, Review, or Iso) as a Forget[F]-carrier optic — lift the single focus into F via pure on the read side, and pick the single B back out of the F[B] on the build side. Powers Getter.andThen(Fold), Optic.cross against a Fold, and the build side of review.andThen(unfold) chains (optics.Unfold is Forget[F]'s build-only citizen, so from is reachable via assocForgetMonad.composeFrom on a Monad[F] chain).

Express a Direct optic (a Getter, Review, or Iso) as a Forget[F]-carrier optic — lift the single focus into F via pure on the read side, and pick the single B back out of the F[B] on the build side. Powers Getter.andThen(Fold), Optic.cross against a Fold, and the build side of review.andThen(unfold) chains (optics.Unfold is Forget[F]'s build-only citizen, so from is reachable via assocForgetMonad.composeFrom on a Monad[F] chain).

The singleton pick is sound on every reachable path: the only F[B] ever fed to a lifted Direct optic's from is ForgetPull.monadicPull's pure(b). A hand-routed call with cardinality ≠ 1 throws, mirroring the other pickSingletonOrThrow bridges. Requires Applicative[F] for pure and Foldable[F] for the pick.

Attributes

Source
Composer.scala

Express an Iso (or Getter) as a Lens — the Lens's leftover is Unit because the bijection doesn't need any.

Express an Iso (or Getter) as a Lens — the Lens's leftover is Unit because the bijection doesn't need any.

Attributes

Source
Composer.scala
object direct2tuple extends Composer[Direct, Tuple2]

Express an Iso (or Getter) as a Lens — the Lens's leftover is Unit because the bijection doesn't need any.

Express an Iso (or Getter) as a Lens — the Lens's leftover is Unit because the bijection doesn't need any.

Attributes

Source
Composer.scala
Supertypes
trait Composer[Direct, Tuple2]
class Object
trait Matchable
class Any
Self type