AffineLaws
dev.constructive.eo.laws.data.AffineLaws
Carrier-level laws for Affine[X, A].
Affine is the carrier behind Optional: a sum of a "no write path" case (Fst[X]) and a tuple-like "got the focus" case ((Snd[X], A)). The laws pin down its two main type-class instances:
ForgetfulFunctor[Affine]— identity and composition.ForgetfulTraverse[Affine, Applicative]atId— identity.
The AssociativeFunctor[Affine, X, Y] instance is already exercised by Optional ∘ Optional at the optic level (see dev.constructive.eo.laws.eo.OptionalComposeLaws); re-stating its associativity equations as a standalone law class would duplicate that coverage without adding signal.
Attributes
- Source
- AffineLaws.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article