Affine

dev.constructive.eo.data.Affine
See theAffine companion trait
object Affine

Constructors and typeclass instances for Affine.

Attributes

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

Members list

Grouped members

Instances

given assoc: [Xo, Xi] => assoc[Xo, Xi]

Composition functor for Affine carriers. Xo / Xi are deliberately unbounded — Affine's Fst[X] / Snd[X] match types stay inert when X is not a Tuple, which is sound for every shipped concrete optic (every concrete X is a Tuple2). A ValidCarrier[F, X] threading is a possible future cleanup.

Composition functor for Affine carriers. Xo / Xi are deliberately unbounded — Affine's Fst[X] / Snd[X] match types stay inert when X is not a Tuple, which is sound for every shipped concrete optic (every concrete X is a Tuple2). A ValidCarrier[F, X] threading is a possible future cleanup.

Attributes

Source
Affine.scala

Prism → Affine — reuses the Either decomposition for Affine's miss / hit branches.

Prism → Affine — reuses the Either decomposition for Affine's miss / hit branches.

Attributes

Source
Affine.scala
object either2affine extends Composer[Either, Affine]

Prism → Affine — reuses the Either decomposition for Affine's miss / hit branches.

Prism → Affine — reuses the Either decomposition for Affine's miss / hit branches.

Attributes

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

ForgetfulFold[Affine] — miss empty, hit runs f on the focus. Carrier-owned (like map / traverse), so it resolves through Affine's companion with no import.

ForgetfulFold[Affine] — miss empty, hit runs f on the focus. Carrier-owned (like map / traverse), so it resolves through Affine's companion with no import.

Attributes

Source
Affine.scala
object fold extends ForgetfulFold[Affine]

ForgetfulFold[Affine] — miss empty, hit runs f on the focus. Carrier-owned (like map / traverse), so it resolves through Affine's companion with no import.

ForgetfulFold[Affine] — miss empty, hit runs f on the focus. Carrier-owned (like map / traverse), so it resolves through Affine's companion with no import.

Attributes

Source
Affine.scala
Supertypes
class Object
trait Matchable
class Any
Self type
fold.type
given map: map

ForgetfulFunctor[Affine] — maps the focus B, passing the miss branch through. One allocation per hit-branch map; pure pass-through on miss.

ForgetfulFunctor[Affine] — maps the focus B, passing the miss branch through. One allocation per hit-branch map; pure pass-through on miss.

Attributes

Source
Affine.scala
object map extends ForgetfulFunctor[Affine]

ForgetfulFunctor[Affine] — maps the focus B, passing the miss branch through. One allocation per hit-branch map; pure pass-through on miss.

ForgetfulFunctor[Affine] — maps the focus B, passing the miss branch through. One allocation per hit-branch map; pure pass-through on miss.

Attributes

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

ForgetfulTraverse[Affine, Applicative] — lifts a focus-level A => G[B] into an Affine[X, A] => G[Affine[X, B]]. Unlocks .modifyA / .all / .modifyF on Affine- carrier optics.

ForgetfulTraverse[Affine, Applicative] — lifts a focus-level A => G[B] into an Affine[X, A] => G[Affine[X, B]]. Unlocks .modifyA / .all / .modifyF on Affine- carrier optics.

Attributes

Source
Affine.scala

ForgetfulTraverse[Affine, Applicative] — lifts a focus-level A => G[B] into an Affine[X, A] => G[Affine[X, B]]. Unlocks .modifyA / .all / .modifyF on Affine- carrier optics.

ForgetfulTraverse[Affine, Applicative] — lifts a focus-level A => G[B] into an Affine[X, A] => G[Affine[X, B]]. Unlocks .modifyA / .all / .modifyF on Affine- carrier optics.

Attributes

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

Lens → Affine. Always-Hit at read; lets lens.andThen(optional) type-check via the cross-carrier Morph[Tuple2, Affine] that picks up this composer.

Lens → Affine. Always-Hit at read; lets lens.andThen(optional) type-check via the cross-carrier Morph[Tuple2, Affine] that picks up this composer.

Attributes

Source
Affine.scala
object tuple2affine extends Composer[Tuple2, Affine]

Lens → Affine. Always-Hit at read; lets lens.andThen(optional) type-check via the cross-carrier Morph[Tuple2, Affine] that picks up this composer.

Lens → Affine. Always-Hit at read; lets lens.andThen(optional) type-check via the cross-carrier Morph[Tuple2, Affine] that picks up this composer.

Attributes

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

Type members

Classlikes

final class Hit[A, +B](val snd: Snd[A], val b: B) extends Affine[A, B]

Hit-branch variant: focus present. Stores snd and b as direct fields.

Hit-branch variant: focus present. Stores snd and b as direct fields.

Attributes

Source
Affine.scala
Supertypes
trait Affine[A, B]
class Object
trait Matchable
class Any
final class Miss[A](val fst: Fst[A]) extends Affine[A, Nothing]

Miss-branch variant — no focus, stores fst: Fst[A] directly. There is no B parameter at all: a miss carries no focus, so it extends Affine[A, Nothing] and covariance retypes it across any focus change as a plain upcast — the old widenB cast helper is subsumed by the type system.

Miss-branch variant — no focus, stores fst: Fst[A] directly. There is no B parameter at all: a miss carries no focus, so it extends Affine[A, Nothing] and covariance retypes it across any focus change as a plain upcast — the old widenB cast helper is subsumed by the type system.

Attributes

Source
Affine.scala
Supertypes
trait Affine[A, Nothing]
class Object
trait Matchable
class Any