dev.constructive.eo.laws.eo
Laws specific to eo's composition machinery rather than any single optic: compose associativity/identity (ComposeLaws), fold/traverse consistency, modifyA coherence, reverse/transform round-trips, and Morph faithfulness.
Attributes
Members list
Packages
Discipline RuleSet bundles for the composition-machinery laws in dev.constructive.eo.laws.eo.
Discipline RuleSet bundles for the composition-machinery laws in dev.constructive.eo.laws.eo.
Attributes
Type members
Classlikes
E1 — optic.foldMap is a Monoid homomorphism on the target monoid (tested at Int with additive Monoid[Int], which is enough to witness the law).
E1 — optic.foldMap is a Monoid homomorphism on the target monoid (tested at Int with additive Monoid[Int], which is enough to witness the law).
Attributes
- Source
- FoldAndTraverseLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
C3/C4 — Iso ∘ Iso composition laws.
C3/C4 — Iso ∘ Iso composition laws.
Attributes
- Source
- ComposeLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
C1/C2 — Lens ∘ Lens composition laws.
C1/C2 — Lens ∘ Lens composition laws.
Attributes
- Source
- ComposeLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
D3 — optic.modifyA[Const[M, *]] is pointwise equal to optic.foldMap on the same function, with M = Int (additive).
D3 — optic.modifyA[Const[M, *]] is pointwise equal to optic.foldMap on the same function, with M = Int (additive).
Attributes
- Source
- ModifyALaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
D1 — optic.modifyA[Id] is pointwise equal to optic.modify.
D1 — optic.modifyA[Id] is pointwise equal to optic.modify.
Attributes
- Source
- ModifyALaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Laws that pin down Optic.morph — EO's carrier-coercion extension.
Laws that pin down Optic.morph — EO's carrier-coercion extension.
A1/I1. Morph preserves modify: reshaping the carrier does not change what the optic does to the focus.
A2. Morph preserves get: for any carriers F / G that both expose Accessor, reshaping preserves the read path as well.
These two laws are the foundation of EO's "write once, reuse everywhere" claim about optics. If they failed, a user could not safely convert a Lens to an Optional or a Getter to a Fold without changing observable behaviour.
Attributes
- Source
- MorphLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Optional ∘ Optional composition laws.
Optional ∘ Optional composition laws.
Attributes
- Source
- ComposeLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
C5 — Prism ∘ Prism composition laws.
C5 — Prism ∘ Prism composition laws.
Attributes
- Source
- ComposeLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
H3 — Iso put is the curried reverseGet ∘ pure.
H3 — Iso put is the curried reverseGet ∘ pure.
Attributes
- Source
- ReverseAndTransformLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
B1 — Iso reverse is involutive on both get and reverseGet.
B1 — Iso reverse is involutive on both get and reverseGet.
Attributes
- Source
- ReverseAndTransformLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any
H1/H2/H4 — Lens transform / place / transfer mutually agree.
H1/H2/H4 — Lens transform / place / transfer mutually agree.
Attributes
- Source
- ReverseAndTransformLaws.scala
- Supertypes
-
class Objecttrait Matchableclass Any