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
data A_Review :: OpticKind Source #
Tag for a review.
Instances
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) |