dev.constructive.eo.laws.discipline
Discipline RuleSet bundles for the optic-family laws in dev.constructive.eo.laws — one *Tests object per optic shape, ready to checkAll from any specs2/ScalaCheck suite.
Attributes
Members list
Type members
Classlikes
Discipline RuleSet for AffineFoldLaws.
Discipline RuleSet for FoldLaws.
Discipline RuleSet for GetterLaws.
Discipline RuleSet for IsoLaws.
Discipline RuleSet for LensLaws.
Discipline RuleSet for LensLaws.
'''Hierarchy:''' inherits the four modify-tier props from internal.ReplaceLawsTests and adds the two get/replace round-trip props (getReplace, replaceGet) that distinguish a Lens from a Modify / Traversal.
Attributes
- Source
- LensTests.scala
- Supertypes
Discipline RuleSet for ModifyLaws.
Discipline RuleSet for ModifyLaws.
'''Hierarchy:''' Modify is the pure modify-tier law family — its props are exactly the four shared with Lens / Traversal. The body adds nothing on top of internal.ReplaceLawsTests; it just declares the parent and renames the resulting ruleSet to "Modify".
Attributes
- Source
- ModifyTests.scala
- Supertypes
Discipline RuleSet for MultiFocusLaws. The classifier F[_] flows in from the laws field — each concrete checkAll wiring pins it to List, Option, ZipList, Const[M, *], etc.
Discipline RuleSet for MultiFocusLaws. The classifier F[_] flows in from the laws field — each concrete checkAll wiring pins it to List, Option, ZipList, Const[M, *], etc.
MF3 (collect via map) needs S =:= F[A] evidence to reach the focus — the generic MultiFocus.apply[F, A] factory witnesses exactly this equality. A Cogen[F[A]] is required to generate F[A] => A aggregator functions; callers pass it explicitly per instance because generic Cogen[F[A]] derivation isn't available for ZipList / Const out of the box.
Attributes
- Source
- MultiFocusTests.scala
- Supertypes
Discipline RuleSet for OptionalLaws.
Discipline RuleSet for OptionalLaws.
'''Hierarchy:''' inherits the three partial-read props from internal.PartialReadLawsTests (modify identity, compose modify, consistent getOption / modify-id). Optional adds nothing unique on top — the partial-read tier captures its full law surface.
Attributes
- Source
- OptionalTests.scala
- Supertypes
Discipline RuleSet for PlatedLaws. Reusable by downstream projects to re-check the Plated laws on their own recursive types (hand-written or macro-derived plate).
Discipline RuleSet for PlatedLaws. Reusable by downstream projects to re-check the Plated laws on their own recursive types (hand-written or macro-derived plate).
Attributes
- Source
- PlatedTests.scala
- Supertypes
Discipline RuleSet for PrismLaws.
Discipline RuleSet for PrismLaws.
'''Hierarchy:''' inherits the three partial-read props from internal.PartialReadLawsTests and adds the two reverseGet round-trip props (partial round trip one way and round trip other way) that are specific to Prism.
Attributes
- Source
- PrismTests.scala
- Supertypes
Discipline RuleSet for SeamLaws — the write-seam round-trips (modify(identity), compose modify, replace overwrite) that must hold when an optic's generic .modify / .replace is exercised on a DRILLED / partial-cover optic. Instantiate one per carrier with a drilled optic and a structural eqv; the buggy sibling-dropping carriers fail seam modify identity / seam replace overwrite.
Discipline RuleSet for SeamLaws — the write-seam round-trips (modify(identity), compose modify, replace overwrite) that must hold when an optic's generic .modify / .replace is exercised on a DRILLED / partial-cover optic. Instantiate one per carrier with a drilled optic and a structural eqv; the buggy sibling-dropping carriers fail seam modify identity / seam replace overwrite.
Attributes
- Source
- SeamTests.scala
- Supertypes
Discipline RuleSet for TraversalLaws.
Discipline RuleSet for TraversalLaws.
'''Hierarchy:''' Traversal is also pure modify-tier — the four props are inherited verbatim from internal.ReplaceLawsTests, with no Traversal-specific extras at this layer (the fold-side foldMap laws live in dev.constructive.eo.laws.eo.discipline.FoldMapHomomorphismTests and dev.constructive.eo.laws.eo.discipline.ModifyAConstTests instead).
Attributes
- Source
- TraversalTests.scala
- Supertypes
Discipline RuleSets for UnfoldLaws. unfold is the core set every unfold satisfies (Functor[F] suffices — pattern-functor algebras included); unfoldApplicative extends it with the vestigial-read degradation law that only Unfold.apply-built (Applicative-carrier) unfolds can state.
Discipline RuleSets for UnfoldLaws. unfold is the core set every unfold satisfies (Functor[F] suffices — pattern-functor algebras included); unfoldApplicative extends it with the vestigial-read degradation law that only Unfold.apply-built (Applicative-carrier) unfolds can state.
Attributes
- Source
- UnfoldTests.scala
- Supertypes