ModifyF

dev.constructive.eo.data.ModifyF
See theModifyF companion class
object ModifyF

Typeclass instances for ModifyF.

Attributes

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

Members list

Grouped members

Instances

Optional → ModifyF. Mirror of either2modify split across Affine.Hit / Affine.Miss; miss uses widenB instead of allocating a fresh Miss.

Optional → ModifyF. Mirror of either2modify split across Affine.Hit / Affine.Miss; miss uses widenB instead of allocating a fresh Miss.

Attributes

Source
ModifyF.scala

Optional → ModifyF. Mirror of either2modify split across Affine.Hit / Affine.Miss; miss uses widenB instead of allocating a fresh Miss.

Optional → ModifyF. Mirror of either2modify split across Affine.Hit / Affine.Miss; miss uses widenB instead of allocating a fresh Miss.

Attributes

Source
ModifyF.scala
Supertypes
class Object
trait Matchable
class Any
Self type
given assocModifyF: [Xo, Xi] => assocModifyF[Xo, Xi]

Same-carrier composition for Optic[…, ModifyF]modify.andThen(modify).

Same-carrier composition for Optic[…, ModifyF]modify.andThen(modify).

Encoding: Z = (Fst[Xo], Snd[Xi]). composeTo seeds the ModifyF with (outer-source, identity[C]) — no inner.to call needed because ModifyF's continuation is structurally identity[C] at every canonical construction site (every bundled ModifyF optic uses coerceToModify or optics.Modify.apply, both of which seed identity). composeFrom extracts the user's c2d: C => D from the post-map continuation and applies it through inner.from then outer.from, matching the deferred-modify semantic composedModify(c2d)(s) = outer.modify(inner.modify(c2d))(s).

The asInstanceOf casts coerce abstract Fst[Xo] / Snd[Xo] / Fst[Xi] / Snd[Xi] to the canonical (S, A) / (A, C) decomposition. Sound under the universal ModifyF convention, unsafe only for hand-built ModifyF optics that violate it — and there's no public API path to build such an optic.

Attributes

Source
ModifyF.scala

Prism → ModifyF. Hit writes f(a) through the Prism's build path; miss passes the leftover back via o.from(Left(xo)) — observably the same as the Prism's own .modify(f).

Prism → ModifyF. Hit writes f(a) through the Prism's build path; miss passes the leftover back via o.from(Left(xo)) — observably the same as the Prism's own .modify(f).

Attributes

Source
ModifyF.scala
object either2modify extends Composer[Either, ModifyF]

Prism → ModifyF. Hit writes f(a) through the Prism's build path; miss passes the leftover back via o.from(Left(xo)) — observably the same as the Prism's own .modify(f).

Prism → ModifyF. Hit writes f(a) through the Prism's build path; miss passes the leftover back via o.from(Left(xo)) — observably the same as the Prism's own .modify(f).

Attributes

Source
ModifyF.scala
Supertypes
trait Composer[Either, ModifyF]
class Object
trait Matchable
class Any
Self type
given map: map

ForgetfulFunctor[ModifyF] — maps the continuation through f, leaving the source unchanged. Unlocks .modify / .replace on Modify-carrier optics.

ForgetfulFunctor[ModifyF] — maps the continuation through f, leaving the source unchanged. Unlocks .modify / .replace on Modify-carrier optics.

Attributes

Source
ModifyF.scala
object map extends ForgetfulFunctor[ModifyF]

ForgetfulFunctor[ModifyF] — maps the continuation through f, leaving the source unchanged. Unlocks .modify / .replace on Modify-carrier optics.

ForgetfulFunctor[ModifyF] — maps the continuation through f, leaving the source unchanged. Unlocks .modify / .replace on Modify-carrier optics.

Attributes

Source
ModifyF.scala
Supertypes
class Object
trait Matchable
class Any
Self type
map.type

ForgetfulTraverse[ModifyF, Distributive] — lifts an effectful B => G[C] through the continuation under Distributive[G] (the right shape for read-once / write-once Modify).

ForgetfulTraverse[ModifyF, Distributive] — lifts an effectful B => G[C] through the continuation under Distributive[G] (the right shape for read-once / write-once Modify).

Attributes

Source
ModifyF.scala

ForgetfulTraverse[ModifyF, Distributive] — lifts an effectful B => G[C] through the continuation under Distributive[G] (the right shape for read-once / write-once Modify).

ForgetfulTraverse[ModifyF, Distributive] — lifts an effectful B => G[C] through the continuation under Distributive[G] (the right shape for read-once / write-once Modify).

Attributes

Source
ModifyF.scala
Supertypes
class Object
trait Matchable
class Any
Self type
traverse.type

Lens → ModifyF. Every Lens is-a Modify; powers cross-carrier lens.andThen(modify) via Morph[Tuple2, ModifyF].

Lens → ModifyF. Every Lens is-a Modify; powers cross-carrier lens.andThen(modify) via Morph[Tuple2, ModifyF].

Attributes

Source
ModifyF.scala
object tuple2modify extends Composer[Tuple2, ModifyF]

Lens → ModifyF. Every Lens is-a Modify; powers cross-carrier lens.andThen(modify) via Morph[Tuple2, ModifyF].

Lens → ModifyF. Every Lens is-a Modify; powers cross-carrier lens.andThen(modify) via Morph[Tuple2, ModifyF].

Attributes

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