Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- type ReversedLens s t a b = Optic A_ReversedLens NoIx s t a b
- type ReversedLens' t b = Optic' A_ReversedLens NoIx t b
- data A_ReversedLens :: OpticKind

# Formation

type ReversedLens s t a b = Optic A_ReversedLens NoIx s t a b Source #

Type synonym for a type-modifying reversed lens.

type ReversedLens' t b = Optic' A_ReversedLens NoIx t b Source #

Type synonym for a type-preserving reversed lens.

# Introduction

There is no canonical introduction form for `ReversedLens`

, but you can use
`re`

to construct one from a `Lens`

:

(\ f g ->`re`

(`lens`

f g)) :: (b -> t) -> (b -> s -> a) ->`ReversedLens`

s t a b

# Elimination

A `ReversedLens`

is a `Review`

, so you can specialise types to obtain:

`review`

::`ReversedLens'`

s a -> a -> s

There is no corresponding optic kind for a backwards
`Setter`

, but a reversed `set`

is definable
using `re`

:

`set`

.`re`

::`ReversedLens`

s t a b -> s -> b -> a

# Computation

# Subtyping

data A_ReversedLens :: OpticKind Source #

Tag for a reversed lens.