optics-core-0.4.1: Optics as an abstract interface: core definitions
Safe Haskell None
Language Haskell2010

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_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

Is An_Iso A_Review Source #
Instance details

Defined in Optics.Internal.Optic.Subtyping

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_Review => JoinKinds A_Prism A_Review 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

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

Defined in Optics.Mapping

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 ReversedOptic A_Review Source #
Instance details

Defined in Optics.Re

type MappedOptic A_Review Source #
Instance details

Defined in Optics.Mapping