optics-core-0.2: Optics as an abstract interface: core definitions

Safe HaskellNone
LanguageHaskell2010

Optics.Internal.Optic.Types

Description

This module is intended for internal use only, and may change without warning in subsequent releases.

Synopsis

Documentation

type OpticKind = Type Source #

Kind for types used as optic tags, such as A_Lens.

Since: 0.2

data An_Iso :: OpticKind Source #

Tag for an iso.

Instances
ReversibleOptic An_Iso Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic An_Iso = (r :: Type) Source #

Methods

re :: AcceptsEmptyIndices "re" is => Optic An_Iso is s t a b -> Optic (ReversedOptic An_Iso) is b a t s Source #

Is An_Iso A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Review p -> (Constraints An_Iso p -> r) -> Constraints A_Review p -> r Source #

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

Methods

implies :: proxy An_Iso A_Fold p -> (Constraints An_Iso p -> r) -> Constraints A_Fold p -> r Source #

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

Methods

implies :: proxy An_Iso A_Getter p -> (Constraints An_Iso p -> r) -> Constraints A_Getter p -> r Source #

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

Methods

implies :: proxy An_Iso A_Setter p -> (Constraints An_Iso p -> r) -> Constraints A_Setter p -> r Source #

Is An_Iso A_Traversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Traversal p -> (Constraints An_Iso p -> r) -> Constraints A_Traversal p -> r Source #

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

Methods

implies :: proxy An_Iso A_Prism p -> (Constraints An_Iso p -> r) -> Constraints A_Prism p -> r Source #

Is An_Iso A_Lens Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Lens p -> (Constraints An_Iso p -> r) -> Constraints A_Lens p -> r Source #

Arrow arr => ArrowOptic An_Iso arr Source # 
Instance details

Defined in Optics.Arrow

Methods

overA :: Optic An_Iso is s t a b -> arr a b -> arr s t Source #

ToReadOnly An_Iso s t a b Source # 
Instance details

Defined in Optics.ReadOnly

Methods

getting :: Optic An_Iso is s t a b -> Optic' (Join A_Getter An_Iso) is s a Source #

type ReversedOptic An_Iso Source # 
Instance details

Defined in Optics.Re

data A_Lens :: OpticKind Source #

Tag for a lens.

Instances
ReversibleOptic A_Lens Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic A_Lens = (r :: Type) Source #

Methods

re :: AcceptsEmptyIndices "re" is => Optic A_Lens is s t a b -> Optic (ReversedOptic A_Lens) is b a t s Source #

Is A_Lens A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Fold p -> (Constraints A_Lens p -> r) -> Constraints A_Fold p -> r Source #

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

Methods

implies :: proxy A_Lens A_Getter p -> (Constraints A_Lens p -> r) -> Constraints A_Getter p -> r Source #

Is A_Lens A_Setter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Setter p -> (Constraints A_Lens p -> r) -> Constraints A_Setter p -> r Source #

Is A_Lens A_Traversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Traversal p -> (Constraints A_Lens p -> r) -> Constraints A_Traversal p -> r Source #

Is A_Lens An_AffineTraversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_Lens Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Lens p -> (Constraints An_Iso p -> r) -> Constraints A_Lens p -> r Source #

Arrow arr => ArrowOptic A_Lens arr Source # 
Instance details

Defined in Optics.Arrow

Methods

overA :: Optic A_Lens is s t a b -> arr a b -> arr s t Source #

ToReadOnly A_Lens s t a b Source # 
Instance details

Defined in Optics.ReadOnly

Methods

getting :: Optic A_Lens is s t a b -> Optic' (Join A_Getter A_Lens) is s a Source #

IxOptic A_Lens s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

Methods

noIx :: NonEmptyIndices is => Optic A_Lens is s t a b -> Optic A_Lens NoIx s t a b Source #

type ReversedOptic A_Lens Source # 
Instance details

Defined in Optics.Re

data A_Prism :: OpticKind Source #

Tag for a prism.

Instances
ReversibleOptic A_Prism Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic A_Prism = (r :: Type) Source #

Methods

re :: AcceptsEmptyIndices "re" is => Optic A_Prism is s t a b -> Optic (ReversedOptic A_Prism) is b a t s Source #

Is A_Prism A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Review p -> (Constraints A_Prism p -> r) -> Constraints A_Review p -> r Source #

Is A_Prism A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Fold p -> (Constraints A_Prism p -> r) -> Constraints A_Fold p -> r Source #

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

Methods

implies :: proxy A_Prism A_Setter p -> (Constraints A_Prism p -> r) -> Constraints A_Setter p -> r Source #

Is A_Prism A_Traversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Traversal p -> (Constraints A_Prism p -> r) -> Constraints A_Traversal p -> r Source #

Is A_Prism 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

Methods

implies :: proxy An_Iso A_Prism p -> (Constraints An_Iso p -> r) -> Constraints A_Prism p -> r Source #

ArrowChoice arr => ArrowOptic A_Prism arr Source # 
Instance details

Defined in Optics.Arrow

Methods

overA :: Optic A_Prism is s t a b -> arr a b -> arr s t Source #

ToReadOnly A_Prism s t a b Source # 
Instance details

Defined in Optics.ReadOnly

Methods

getting :: Optic A_Prism is s t a b -> Optic' (Join A_Getter A_Prism) is s a Source #

type ReversedOptic A_Prism Source # 
Instance details

Defined in Optics.Re

data An_AffineTraversal :: OpticKind Source #

Tag for an affine traversal.

Instances
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 An_AffineTraversal 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 An_AffineTraversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

ArrowChoice arr => ArrowOptic An_AffineTraversal arr Source # 
Instance details

Defined in Optics.Arrow

Methods

overA :: Optic An_AffineTraversal is s t a b -> arr a b -> arr s t Source #

ToReadOnly An_AffineTraversal s t a b Source # 
Instance details

Defined in Optics.ReadOnly

IxOptic An_AffineTraversal s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

data A_Traversal :: OpticKind Source #

Tag for a traversal.

Instances
Is A_Traversal A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Traversal A_Fold p -> (Constraints A_Traversal p -> r) -> Constraints A_Fold p -> r Source #

Is A_Traversal 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_Traversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Traversal p -> (Constraints A_Prism p -> r) -> Constraints A_Traversal p -> r Source #

Is A_Lens A_Traversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Traversal p -> (Constraints A_Lens p -> r) -> Constraints A_Traversal p -> r Source #

Is An_Iso A_Traversal Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Traversal p -> (Constraints An_Iso p -> r) -> Constraints A_Traversal p -> r Source #

ToReadOnly A_Traversal s t a b Source # 
Instance details

Defined in Optics.ReadOnly

Methods

getting :: Optic A_Traversal is s t a b -> Optic' (Join A_Getter A_Traversal) is s a Source #

IxOptic A_Traversal s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

Methods

noIx :: NonEmptyIndices is => Optic A_Traversal is s t a b -> Optic A_Traversal NoIx s t a b Source #

data A_Setter :: OpticKind Source #

Tag for a setter.

Instances
Is A_Traversal A_Setter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineTraversal A_Setter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Setter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Setter p -> (Constraints A_Prism p -> r) -> Constraints A_Setter p -> r Source #

Is A_Lens A_Setter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Setter p -> (Constraints A_Lens p -> r) -> Constraints A_Setter p -> r Source #

Is An_Iso A_Setter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Setter p -> (Constraints An_Iso p -> r) -> Constraints A_Setter p -> r Source #

IxOptic A_Setter s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

Methods

noIx :: NonEmptyIndices is => Optic A_Setter is s t a b -> Optic A_Setter NoIx s t a b Source #

data A_ReversedPrism :: OpticKind Source #

Tag for a reversed prism.

Instances
ReversibleOptic A_ReversedPrism Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic A_ReversedPrism = (r :: Type) Source #

Methods

re :: AcceptsEmptyIndices "re" is => Optic A_ReversedPrism is s t a b -> Optic (ReversedOptic A_ReversedPrism) is b a t s Source #

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 An_Iso A_ReversedPrism Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

ToReadOnly A_ReversedPrism s t a b Source # 
Instance details

Defined in Optics.ReadOnly

type ReversedOptic A_ReversedPrism Source # 
Instance details

Defined in Optics.Re

data A_Getter :: OpticKind Source #

Tag for a getter.

Instances
ReversibleOptic A_Getter Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic A_Getter = (r :: Type) Source #

Methods

re :: AcceptsEmptyIndices "re" is => Optic A_Getter is s t a b -> Optic (ReversedOptic A_Getter) is b a t s Source #

Is A_Getter A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Getter A_Fold p -> (Constraints A_Getter p -> r) -> Constraints A_Fold p -> r Source #

Is A_Getter 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_Lens A_Getter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Getter p -> (Constraints A_Lens p -> r) -> Constraints A_Getter p -> r Source #

Is An_Iso A_Getter Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Getter p -> (Constraints An_Iso p -> r) -> Constraints A_Getter p -> r Source #

(s ~ t, a ~ b) => ToReadOnly A_Getter s t a b Source # 
Instance details

Defined in Optics.ReadOnly

Methods

getting :: Optic A_Getter is s t a b -> Optic' (Join A_Getter A_Getter) is s a Source #

(s ~ t, a ~ b) => IxOptic A_Getter s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

Methods

noIx :: NonEmptyIndices is => Optic A_Getter is s t a b -> Optic A_Getter NoIx s t a b Source #

type ReversedOptic A_Getter Source # 
Instance details

Defined in Optics.Re

data An_AffineFold :: OpticKind Source #

Tag for an affine fold.

Instances
Is An_AffineFold 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 An_AffineFold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_AffineTraversal An_AffineFold 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_Lens An_AffineFold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso An_AffineFold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

(s ~ t, a ~ b) => ToReadOnly An_AffineFold s t a b Source # 
Instance details

Defined in Optics.ReadOnly

(s ~ t, a ~ b) => IxOptic An_AffineFold s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

Methods

noIx :: NonEmptyIndices is => Optic An_AffineFold is s t a b -> Optic An_AffineFold NoIx s t a b Source #

data A_Fold :: OpticKind Source #

Tag for a fold.

Instances
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

Methods

implies :: proxy A_Getter A_Fold p -> (Constraints A_Getter p -> r) -> Constraints A_Fold p -> r Source #

Is A_ReversedPrism A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Traversal A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Traversal A_Fold p -> (Constraints A_Traversal p -> r) -> Constraints A_Fold p -> r Source #

Is An_AffineTraversal A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Fold p -> (Constraints A_Prism p -> r) -> Constraints A_Fold p -> r Source #

Is A_Lens A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Fold p -> (Constraints A_Lens p -> r) -> Constraints A_Fold p -> r Source #

Is An_Iso A_Fold Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Fold p -> (Constraints An_Iso p -> r) -> Constraints A_Fold p -> r Source #

(s ~ t, a ~ b) => ToReadOnly A_Fold s t a b Source # 
Instance details

Defined in Optics.ReadOnly

Methods

getting :: Optic A_Fold is s t a b -> Optic' (Join A_Getter A_Fold) is s a Source #

(s ~ t, a ~ b) => IxOptic A_Fold s t a b Source # 
Instance details

Defined in Optics.Indexed.Core

Methods

noIx :: NonEmptyIndices is => Optic A_Fold is s t a b -> Optic A_Fold NoIx s t a b Source #

data A_ReversedLens :: OpticKind Source #

Tag for a reversed lens.

Instances
ReversibleOptic A_ReversedLens Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic A_ReversedLens = (r :: Type) Source #

Methods

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 # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is An_Iso A_ReversedLens Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

type ReversedOptic A_ReversedLens Source # 
Instance details

Defined in Optics.Re

data A_Review :: OpticKind Source #

Tag for a review.

Instances
ReversibleOptic A_Review Source # 
Instance details

Defined in Optics.Re

Associated Types

type ReversedOptic A_Review = (r :: Type) Source #

Methods

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 # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Is A_Prism A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Review p -> (Constraints A_Prism p -> r) -> Constraints A_Review p -> r Source #

Is An_Iso A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Review p -> (Constraints An_Iso p -> r) -> Constraints A_Review p -> r Source #

type ReversedOptic A_Review Source # 
Instance details

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.