these-optics-1: Optics for These

Safe HaskellTrustworthy
LanguageHaskell2010

Data.These.Optics

Contents

Synopsis

Affine traversals

here :: AffineTraversal (These a c) (These b c) a b Source #

An AffineTraversal of the first half of a These.

>>> over here show (That 1)
That 1
>>> over here show (These 'a' 2)
These "'a'" 2

there :: AffineTraversal (These c a) (These c b) a b Source #

An AffineTraversal of the second half of a These.

>>> over there show (That 1)
That "1"
>>> over there show (These 'a' 2)
These 'a' "2"

Prisms

_This :: Prism' (These a b) a Source #

A Prism' selecting the This constructor.

Note: cannot change type.

_That :: Prism' (These a b) b Source #

A Prism' selecting the That constructor.

Note: cannot change type.

_These :: Prism' (These a b) (a, b) Source #

A Prism' selecting the These constructor. These names are ridiculous!

Note: cannot change type.

Orphan instances

Swapped These Source # 
Instance details

Methods

swapped :: Iso (These a b) (These c d) (These b a) (These d c) #