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

Safe HaskellNone
LanguageHaskell2010

Optics.Review

Contents

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
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 :: (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 :: (Constraints An_Iso p -> r) -> Constraints A_Review 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 :: Type Source #

Methods

mapping :: 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