optics-core-0.4.1.1: Optics as an abstract interface: core definitions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Optics.Review

Description

A Review is a backwards Getter, i.e. a Review T B is just a function B -> T.

Synopsis

Formation

type Review t b = Optic' A_Review NoIx t b Source #

Type synonym for a review.

Introduction

unto :: (b -> t) -> Review t b Source #

An analogue of to for reviews.

Elimination

review :: Is k A_Review => Optic' k is t b -> b -> t Source #

Retrieve the value targeted by a Review.

>>> review _Left "hi"
Left "hi"

Computation

review (unto f) = f

Subtyping

data A_Review :: OpticKind Source #

Tag for a review.

Instances

Instances details
ReversibleOptic A_Review Source # 
Instance details

Defined in Optics.Re

Associated Types

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

Methods

re :: forall (is :: IxList) s t a b. AcceptsEmptyIndices "re" is => Optic A_Review is s t a b -> Optic (ReversedOptic A_Review) is b a t s Source #

Is A_Prism A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

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

Is A_ReversedLens A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

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

Is An_Iso A_Review Source # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

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

Defined in Optics.Internal.Optic.Subtyping

Methods

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

(Functor f, f ~ g, s ~ t, a ~ b) => MappingOptic A_Review f g s t a b Source # 
Instance details

Defined in Optics.Mapping

Associated Types

type MappedOptic A_Review Source #

Methods

mapping :: forall (is :: IxList). AcceptsEmptyIndices "mapping" is => Optic A_Review is s t a b -> Optic (MappedOptic A_Review) is (f s) (g t) (f a) (g b) Source #

type MappedOptic A_Review Source # 
Instance details

Defined in Optics.Mapping

type ReversedOptic A_Review Source # 
Instance details

Defined in Optics.Re