| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Optics.Internal.Optic.Subtyping
Description
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 :: proxy k l p -> (Constraints k p => r) -> Constraints l p => r
- 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.
Methods
implies :: proxy k l p -> (Constraints k p => r) -> Constraints l p => r Source #
Witness of the subtyping relationship.
Instances
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).
Equations