Direct

dev.constructive.eo.data.Direct$package.Direct
object Direct

Typeclass instances for Direct, plus the wrap / unwrap boundary. Every operation collapses to plain function application at runtime — zero per-call overhead beyond the user's function.

Attributes

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

Members list

Grouped members

Instances

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

Lets Direct-carrier optics compose; Z = Nothing since Direct has no leftover.

Lets Direct-carrier optics compose; Z = Nothing since Direct has no leftover.

Attributes

Source
Direct.scala
given fold: fold

Single-focus fold — applies f to the one focus. Unlocks .foldMap on Direct-carrier optics and lets ReadCompose's many-fold tier pair a Direct side with a multi-focus side (getter ∘ traversal, traversal ∘ getter, …).

Single-focus fold — applies f to the one focus. Unlocks .foldMap on Direct-carrier optics and lets ReadCompose's many-fold tier pair a Direct side with a multi-focus side (getter ∘ traversal, traversal ∘ getter, …).

Attributes

Source
Direct.scala
object fold extends ForgetfulFold[Direct]

Single-focus fold — applies f to the one focus. Unlocks .foldMap on Direct-carrier optics and lets ReadCompose's many-fold tier pair a Direct side with a multi-focus side (getter ∘ traversal, traversal ∘ getter, …).

Single-focus fold — applies f to the one focus. Unlocks .foldMap on Direct-carrier optics and lets ReadCompose's many-fold tier pair a Direct side with a multi-focus side (getter ∘ traversal, traversal ∘ getter, …).

Attributes

Source
Direct.scala
Supertypes
class Object
trait Matchable
class Any
Self type
fold.type

Weakest constraint for Direct's traverse (Invariant[G]). Unlocks .modifyF / .modifyA on Iso / Getter.

Weakest constraint for Direct's traverse (Invariant[G]). Unlocks .modifyF / .modifyA on Iso / Getter.

Attributes

Source
Direct.scala

Weakest constraint for Direct's traverse (Invariant[G]). Unlocks .modifyF / .modifyA on Iso / Getter.

Weakest constraint for Direct's traverse (Invariant[G]). Unlocks .modifyF / .modifyA on Iso / Getter.

Attributes

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

Type members

Classlikes

object accessor extends Accessor[Direct]

Identity read; unlocks .get on Iso / Getter. @group Instances

Identity read; unlocks .get on Iso / Getter. @group Instances

Attributes

Source
Direct.scala
Supertypes
trait Accessor[Direct]
class Object
trait Matchable
class Any
Self type
accessor.type

pure[X, A] = a; unlocks .put on Iso / Getter. @group Instances

pure[X, A] = a; unlocks .put on Iso / Getter. @group Instances

Attributes

Source
Direct.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Identity write; unlocks .reverseGet on Iso. @group Instances

Identity write; unlocks .reverseGet on Iso. @group Instances

Attributes

Source
Direct.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

transparent inline def apply[X, A](a: A): Direct[X, A]

Wrap a plain A into the Direct carrier. Identity at runtime (the opaque type erases to A); needed only so construction sites outside this object satisfy the Direct[X, A] type.

Wrap a plain A into the Direct carrier. Identity at runtime (the opaque type erases to A); needed only so construction sites outside this object satisfy the Direct[X, A] type.

Attributes

Source
Direct.scala

Givens

Givens

Identity read; unlocks .get on Iso / Getter. @group Instances

Identity read; unlocks .get on Iso / Getter. @group Instances

Attributes

Source
Direct.scala

pure[X, A] = a; unlocks .put on Iso / Getter. @group Instances

pure[X, A] = a; unlocks .put on Iso / Getter. @group Instances

Attributes

Source
Direct.scala

Identity write; unlocks .reverseGet on Iso. @group Instances

Identity write; unlocks .reverseGet on Iso. @group Instances

Attributes

Source
Direct.scala

Extensions

Extensions

extension [X, A](d: Direct[X, A])
transparent inline def value: A

Unwrap the carried A. Identity at runtime.

Unwrap the carried A. Identity at runtime.

Attributes

Source
Direct.scala