Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module is intended for internal use only, and may change without warning in subsequent releases.
Synopsis
- type OpticKind = Type
- data An_Iso :: OpticKind
- data A_Lens :: OpticKind
- data A_Prism :: OpticKind
- data An_AffineTraversal :: OpticKind
- data A_Traversal :: OpticKind
- data A_Setter :: OpticKind
- data A_ReversedPrism :: OpticKind
- data A_Getter :: OpticKind
- data An_AffineFold :: OpticKind
- data A_Fold :: OpticKind
- data A_ReversedLens :: OpticKind
- data A_Review :: OpticKind
- type family Constraints (k :: OpticKind) (p :: Type -> Type -> Type -> Type) :: Constraint where ...
Documentation
data An_Iso :: OpticKind Source #
Tag for an iso.
Instances
data A_Lens :: OpticKind Source #
Tag for a lens.
Instances
data A_Prism :: OpticKind Source #
Tag for a prism.
Instances
data An_AffineTraversal :: OpticKind Source #
Tag for an affine traversal.
Instances
data A_Traversal :: OpticKind Source #
Tag for a traversal.
Instances
data A_Setter :: OpticKind Source #
Tag for a setter.
Instances
data A_ReversedPrism :: OpticKind Source #
Tag for a reversed prism.
Instances
data A_Getter :: OpticKind Source #
Tag for a getter.
Instances
data An_AffineFold :: OpticKind Source #
Tag for an affine fold.
Instances
data A_Fold :: OpticKind Source #
Tag for a fold.
Instances
data A_ReversedLens :: OpticKind Source #
Tag for a reversed lens.
Instances
ReversibleOptic A_ReversedLens Source # | |
Defined in Optics.Re type ReversedOptic A_ReversedLens = (r :: Type) Source # re :: AcceptsEmptyIndices "re" is => Optic A_ReversedLens is s t a b -> Optic (ReversedOptic A_ReversedLens) is b a t s Source # | |
Is A_ReversedLens A_Review Source # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy A_ReversedLens A_Review p -> (Constraints A_ReversedLens p -> r) -> Constraints A_Review p -> r Source # | |
Is An_Iso A_ReversedLens Source # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy An_Iso A_ReversedLens p -> (Constraints An_Iso p -> r) -> Constraints A_ReversedLens p -> r Source # | |
type ReversedOptic A_ReversedLens Source # | |
Defined in Optics.Re |
data A_Review :: OpticKind Source #
Tag for a review.
Instances
ReversibleOptic A_Review Source # | |
Defined in Optics.Re type ReversedOptic A_Review = (r :: Type) Source # re :: AcceptsEmptyIndices "re" is => Optic A_Review is s t a b -> Optic (ReversedOptic A_Review) is b a t s Source # | |
Is A_ReversedLens A_Review Source # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy A_ReversedLens A_Review p -> (Constraints A_ReversedLens p -> r) -> Constraints A_Review p -> r Source # | |
Is A_Prism A_Review Source # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy A_Prism A_Review p -> (Constraints A_Prism p -> r) -> Constraints A_Review p -> r Source # | |
Is An_Iso A_Review Source # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy An_Iso A_Review p -> (Constraints An_Iso p -> r) -> Constraints A_Review p -> r Source # | |
type ReversedOptic A_Review Source # | |
Defined in Optics.Re |
type family Constraints (k :: OpticKind) (p :: Type -> Type -> Type -> Type) :: Constraint where ... Source #
Mapping tag types k
to constraints on p
.
Using this type family we define the constraints that the various flavours of optics have to fulfill.
Constraints An_Iso p = Profunctor p | |
Constraints A_Lens p = Strong p | |
Constraints A_ReversedLens p = Costrong p | |
Constraints A_Prism p = Choice p | |
Constraints A_ReversedPrism p = Cochoice p | |
Constraints An_AffineTraversal p = Visiting p | |
Constraints A_Traversal p = Traversing p | |
Constraints A_Setter p = Mapping p | |
Constraints A_Getter p = (Bicontravariant p, Cochoice p, Strong p) | |
Constraints An_AffineFold p = (Bicontravariant p, Cochoice p, Visiting p) | |
Constraints A_Fold p = (Bicontravariant p, Cochoice p, Traversing p) | |
Constraints A_Review p = (Bifunctor p, Choice p, Costrong p) |