Class for optics that can be reversed.
Associated types
type family ReversedOptic (k :: OpticKind)Injective type family that maps an optic kind to the optic kind produced by reversing it.
ReversedOptic An_Iso = An_Iso ReversedOptic A_Prism = A_ReversedPrism ReversedOptic A_ReversedPrism = A_Prism ReversedOptic A_Lens = A_ReversedLens ReversedOptic A_ReversedLens = A_Lens ReversedOptic A_Getter = A_Review ReversedOptic A_Review = A_Getter
Methods
re :: AcceptsEmptyIndices"re"
is => Optic k is s t a b -> Optic (ReversedOptic k) is b a t sReverses optics, turning around Iso into Iso, Prism into ReversedPrism (and back), Lens into ReversedLens (and back) and Getter into Review (and back).
Instances7ReversibleOptic, …
ReversibleOptic A_GetterDefined in optics-core-0.4.1.1 · Optics.ReReversibleOptic A_LensDefined in optics-core-0.4.1.1 · Optics.ReReversibleOptic A_PrismDefined in optics-core-0.4.1.1 · Optics.ReReversibleOptic A_ReversedLensDefined in optics-core-0.4.1.1 · Optics.ReReversibleOptic A_ReversedPrismDefined in optics-core-0.4.1.1 · Optics.ReReversibleOptic A_ReviewDefined in optics-core-0.4.1.1 · Optics.ReReversibleOptic An_IsoDefined in optics-core-0.4.1.1 · Optics.Re