these-0.8: An either-or-both data type & a generalized 'zip with padding' typeclass
Data.These.Lens
Contents
here :: Applicative f => (a -> f b) -> These a t -> f (These b t) Source #
A Traversal of the first half of a These, suitable for use with Control.Lens.
Traversal
These
here :: Traversal (These a t) (These b t) a b
here
>>> over here show (That 1) That 1
>>>
over here show (That 1)
>>> over here show (These 'a' 2) These "'a'" 2
over here show (These 'a' 2)
there :: Applicative f => (a -> f b) -> These t a -> f (These t b) Source #
A Traversal of the second half of a These, suitable for use with Control.Lens.
there :: Traversal (These t b) (These t b) a b
there
>>> over there show (That 1) That "1"
over there show (That 1)
>>> over there show (These 'a' 2) These 'a' "2"
over there show (These 'a' 2)
_This :: Prism' (These a b) a Source #
A Prism' selecting the This constructor.
Prism'
This
Note: cannot change type.
_That :: Prism' (These a b) b Source #
A Prism' selecting the That constructor.
That
_These :: Prism' (These a b) (a, b) Source #
A Prism' selecting the These constructor. These names are ridiculous!