Type synonym for a type-modifying indexed lens.
Moduleoptics-core-0.4.1.1Haskell2010
Optics.IxLens
An IxLens is an indexed version of a Lens. See the "Indexed
optics" section of the overview documentation in the Optics module of the
main optics package for more details on indexed optics.
- 5 types
- 8 values
- Packageoptics-core-0.4.1.1
- Exports13
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceIxLens.hs
Formation
2 declarationsType synonym for a type-preserving indexed lens.
Introduction
1 declarationElimination
0 declarationsAdditional introduction forms
4 declarationsFocus on both sides of an Either.
There is an indexed field for every type in the Void.
set (mapped % devoid) 1 [][]
over (_Just % devoid) abs NothingNothing
Indexed _1 with other half of a pair as an index.
See isnd for examples.
Indexed _2 with other half of a pair as an index.
Specialized version of itraversed to pairs, which can be IxLens.
iview isnd ('a', True)('a',True)
That is not possible with itraversed, because it is an IxTraversal.
:t itraversed :: IxTraversal i (i, a) (i, b) a bitraversed :: IxTraversal i (i, a) (i, b) a b :: IxTraversal i (i, a) (i, b) a b
Subtyping
1 declarationTag for a lens.
Instances35ReversibleOptic, Is, ArrowOptic, JoinKinds, IxOptic, ToReadOnly, …
ReversibleOptic A_LensDefined in optics-core-0.4.1.1 · Optics.ReIs A_Lens A_FoldDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIs A_Lens A_GetterDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIs A_Lens A_SetterDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIs A_Lens A_TraversalDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIs A_Lens An_AffineFoldDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIs A_Lens An_AffineTraversalDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIs An_Iso A_LensDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingArrow arr => ArrowOptic A_Lens arrDefined in optics-core-0.4.1.1 · Optics.Arrowk ~ A_Fold => JoinKinds A_Fold A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Fold => JoinKinds A_Lens A_Fold kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Getter => JoinKinds A_Getter A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Getter => JoinKinds A_Lens A_Getter kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Getter => JoinKinds A_Lens A_ReversedPrism kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Getter => JoinKinds A_ReversedPrism A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Lens => JoinKinds A_Lens A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Lens => JoinKinds A_Lens An_Iso kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Lens => JoinKinds An_Iso A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Setter => JoinKinds A_Lens A_Setter kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Setter => JoinKinds A_Setter A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Traversal => JoinKinds A_Lens A_Traversal kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ A_Traversal => JoinKinds A_Traversal A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ An_AffineFold => JoinKinds A_Lens An_AffineFold kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ An_AffineFold => JoinKinds An_AffineFold A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ An_AffineTraversal => JoinKinds A_Lens A_Prism kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ An_AffineTraversal => JoinKinds A_Lens An_AffineTraversal kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ An_AffineTraversal => JoinKinds A_Prism A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.Subtypingk ~ An_AffineTraversal => JoinKinds An_AffineTraversal A_Lens kDefined in optics-core-0.4.1.1 · Optics.Internal.Optic.SubtypingIxOptic A_Lens s t a bDefined in optics-core-0.4.1.1 · Optics.Indexed.CoreToReadOnly A_Lens s t a bDefined in optics-core-0.4.1.1 · Optics.ReadOnly(Functor f, f ~ g, s ~ t, a ~ b) => MappingOptic A_Lens f g s t a bDefined in optics-core-0.4.1.1 · Optics.MappingGFieldImpl name s t a b => GenericOptic repDefined name A_Lens s t a bDefined in optics-core-0.4.1.1 · Optics.Labeltype MappedOptic A_Lens = A_GetterDefined in optics-core-0.4.1.1 · Optics.Mappingtype ReversedOptic A_Lens = A_ReversedLensDefined in optics-core-0.4.1.1 · Optics.Retype ReadOnlyOptic A_Lens = A_GetterDefined in optics-core-0.4.1.1 · Optics.ReadOnly
van Laarhoven encoding
5 declarationsType synonym for a type-modifying van Laarhoven indexed lens.
Type synonym for a type-preserving van Laarhoven indexed lens.
Build an indexed lens from the van Laarhoven representation.
Convert an indexed lens to its van Laarhoven representation.
Work with an indexed lens in the van Laarhoven representation.