Safe Haskell | None |
---|---|
Language | Haskell2010 |
Instances to implement the subtyping hierarchy between optics.
This module is intended for internal use only, and may change without warning in subsequent releases.
Synopsis
- class Is k l where
- implies :: (Constraints k p => r) -> Constraints l p => r
- type family EliminationForms (k :: OpticKind) where ...
- type AffineFoldEliminations = '('['("preview", "Optics.AffineFold")], '["(^?)"])
- type AffineTraversalEliminations = AffineFoldEliminations `AppendEliminations` SetterEliminations
- type FoldEliminations = '('['("traverseOf_", "Optics.Fold"), '("foldMapOf", "Optics.Fold"), '("toListOf", "Optics.Fold")], '["(^..)"])
- type GetterEliminations = '('['("view", "Optics.Getter")], '["(^.)"])
- type IsoEliminations = (GetterEliminations `AppendEliminations` ReviewEliminations) `AppendEliminations` SetterEliminations
- type LensEliminations = GetterEliminations `AppendEliminations` SetterEliminations
- type PrismEliminations = (AffineFoldEliminations `AppendEliminations` ReviewEliminations) `AppendEliminations` SetterEliminations
- type ReviewEliminations = '('['("review", "Optics.Review")], '["(#)"])
- type SetterEliminations = '('['("over", "Optics.Setter"), '("set", "Optics.Setter")], '["(%~)", "(.~)"])
- type TraversalEliminations = ('('['("traverseOf", "Optics.Traversal")], '[]) `AppendEliminations` FoldEliminations) `AppendEliminations` SetterEliminations
- type family Join (k :: OpticKind) (l :: OpticKind) where ...
Documentation
Subtyping relationship between kinds of optics.
An instance of
means that any Is
k l
can be used
as an Optic
k
. For example, we have an Optic
l
instance, but not Is
A_Lens
A_Traversal
.Is
A_Traversal
A_Lens
This class needs instances for all possible combinations of tags.
implies :: (Constraints k p => r) -> Constraints l p => r Source #
Witness of the subtyping relationship.
Instances
type family EliminationForms (k :: OpticKind) where ... Source #
type AffineFoldEliminations = '('['("preview", "Optics.AffineFold")], '["(^?)"]) Source #
type AffineTraversalEliminations = AffineFoldEliminations `AppendEliminations` SetterEliminations Source #
type FoldEliminations = '('['("traverseOf_", "Optics.Fold"), '("foldMapOf", "Optics.Fold"), '("toListOf", "Optics.Fold")], '["(^..)"]) Source #
type GetterEliminations = '('['("view", "Optics.Getter")], '["(^.)"]) Source #
type IsoEliminations = (GetterEliminations `AppendEliminations` ReviewEliminations) `AppendEliminations` SetterEliminations Source #
type PrismEliminations = (AffineFoldEliminations `AppendEliminations` ReviewEliminations) `AppendEliminations` SetterEliminations Source #
type ReviewEliminations = '('['("review", "Optics.Review")], '["(#)"]) Source #
type SetterEliminations = '('['("over", "Optics.Setter"), '("set", "Optics.Setter")], '["(%~)", "(.~)"]) Source #
type TraversalEliminations = ('('['("traverseOf", "Optics.Traversal")], '[]) `AppendEliminations` FoldEliminations) `AppendEliminations` SetterEliminations Source #
type family Join (k :: OpticKind) (l :: OpticKind) where ... Source #
Computes the least upper bound of two optics kinds.
Join k l
represents the least upper bound of an Optic k
and an Optic
l
. This means in particular that composition of an Optic k
and an Optic
k
will yield an Optic (Join k l)
.