optics-core-0.4.1: Optics as an abstract interface: core definitions
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

Documentation

class Is k l where Source #

Subtyping relationship between kinds of optics.

An instance of Is k l means that any Optic k can be used as an Optic l . For example, we have an Is A_Lens A_Traversal instance, but not Is A_Traversal A_Lens .

This class needs instances for all possible combinations of tags.

Methods

implies :: ( Constraints k p => r) -> Constraints l p => r Source #

Witness of the subtyping relationship.

Instances

Instances details
( TypeError ((((' ShowType k :<>: ' Text " cannot be used as ") :<>: ' ShowType l) :$$: ' Text "Perhaps you meant one of these:") :$$: ShowEliminations ( EliminationForms k)) :: Constraint ) => Is k l Source #

Overlappable instance for a custom type error.

Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: forall (p :: Type -> Type -> Type -> Type ) r. ( Constraints k p => r) -> Constraints l p => r Source #

Is k k Source #

Every kind of optic can be used as itself.

Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: forall (p :: Type -> Type -> Type -> Type ) r. ( Constraints k p => r) -> Constraints k p => r Source #

Is A_ReversedLens A_Review Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineFold A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Getter A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Getter An_AffineFold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_ReversedPrism A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_ReversedPrism An_AffineFold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_ReversedPrism A_Getter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Traversal A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Traversal A_Setter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineTraversal A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineTraversal An_AffineFold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineTraversal A_Setter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineTraversal A_Traversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Review Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism An_AffineFold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Setter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Traversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism An_AffineTraversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Lens A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Lens An_AffineFold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Lens A_Getter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Lens A_Setter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Lens A_Traversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Lens An_AffineTraversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Review Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_ReversedLens Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Fold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso An_AffineFold Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Getter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_ReversedPrism Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Setter Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Traversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso An_AffineTraversal Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Prism Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Lens Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

type AffineFoldEliminations = '('['("preview", "Optics.AffineFold")], '["(^?)"]) Source #

type FoldEliminations = '('['("traverseOf_", "Optics.Fold"), '("foldMapOf", "Optics.Fold"), '("toListOf", "Optics.Fold")], '["(^..)"]) Source #

type GetterEliminations = '('['("view", "Optics.Getter")], '["(^.)"]) Source #

type ReviewEliminations = '('['("review", "Optics.Review")], '["(#)"]) Source #

type SetterEliminations = '('['("over", "Optics.Setter"), '("set", "Optics.Setter")], '["(%~)", "(.~)"]) Source #

class JoinKinds k l m | k l -> m where Source #

Computes the least upper bound of two optics kinds.

In presence of a JoinKinds k l m constraint Optic m 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 m .

Since: 0.4

Instances

Instances details
( JoinKinds k l m, TypeError ((' ShowType k :<>: ' Text " cannot be composed with ") :<>: ' ShowType l) :: Constraint ) => JoinKinds k l m Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

joinKinds :: forall (p :: Type -> Type -> Type -> Type ) r. (( Constraints k p, Constraints l p) => r) -> Constraints m p => r Source #

k ~ A_Review => JoinKinds A_Review A_Review k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_Review A_ReversedLens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_Review A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_Review An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_ReversedLens A_Review k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_ReversedLens => JoinKinds A_ReversedLens A_ReversedLens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_ReversedLens A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_ReversedLens => JoinKinds A_ReversedLens An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Fold An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds An_AffineFold A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds An_AffineFold A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineFold An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Getter A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Getter An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_Getter A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_Getter A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Getter A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Getter An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Getter A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_Getter A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_Getter An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_ReversedPrism A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_ReversedPrism An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_ReversedPrism A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_ReversedPrism => JoinKinds A_ReversedPrism A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_ReversedPrism A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_ReversedPrism An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_ReversedPrism A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_ReversedPrism A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_ReversedPrism => JoinKinds A_ReversedPrism An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Setter A_Setter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Setter A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Setter An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Setter A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Setter A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Setter An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Traversal A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Traversal An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Traversal A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Traversal A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Traversal A_Setter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Traversal A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Traversal An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Traversal A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Traversal A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Traversal An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds An_AffineTraversal A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineTraversal An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineTraversal A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_AffineTraversal A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds An_AffineTraversal A_Setter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds An_AffineTraversal A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds An_AffineTraversal An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds An_AffineTraversal A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds An_AffineTraversal A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds An_AffineTraversal An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_Prism A_Review k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds A_Prism A_ReversedLens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Prism A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Prism An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Prism A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Prism A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Prism A_Setter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Prism A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds A_Prism An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Prism => JoinKinds A_Prism A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds A_Prism A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Prism => JoinKinds A_Prism An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds A_Lens A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds A_Lens An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_Lens A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds A_Lens A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds A_Lens A_Setter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds A_Lens A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds A_Lens An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds A_Lens A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Lens => JoinKinds A_Lens A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Lens => JoinKinds A_Lens An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Review => JoinKinds An_Iso A_Review k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_ReversedLens => JoinKinds An_Iso A_ReversedLens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Fold => JoinKinds An_Iso A_Fold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineFold => JoinKinds An_Iso An_AffineFold k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Getter => JoinKinds An_Iso A_Getter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_ReversedPrism => JoinKinds An_Iso A_ReversedPrism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Setter => JoinKinds An_Iso A_Setter k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Traversal => JoinKinds An_Iso A_Traversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_AffineTraversal => JoinKinds An_Iso An_AffineTraversal k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Prism => JoinKinds An_Iso A_Prism k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ A_Lens => JoinKinds An_Iso A_Lens k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

k ~ An_Iso => JoinKinds An_Iso An_Iso k Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping