| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Strict.Optics
Synopsis
- _Left :: Prism (Either a c) (Either b c) a b
- _Right :: Prism (Either c a) (Either c b) a b
- _Just :: Prism (Maybe a) (Maybe b) a b
- _Nothing :: Prism' (Maybe a) ()
- here :: Traversal (These a c) (These b c) a b
- there :: Traversal (These c a) (These c b) a b
- _This :: Prism' (These a b) a
- _That :: Prism' (These a b) b
- _These :: Prism' (These a b) (a, b)
- strict :: Strict lazy strict => Iso' lazy strict
- lazy :: Strict lazy strict => Iso' strict lazy
Tuple
Maybe
These
here :: Traversal (These a c) (These b c) a b Source #
A Traversal of the first half of a These, suitable for use with Control.Lens.
>>>over here show (That 1)That 1
>>>over here show (These 'a' 2)These "'a'" 2
Combinators
strict :: Strict lazy strict => Iso' lazy strict Source #
Ad hoc conversion between "strict" and "lazy" versions of a structure,
using Strict class.
lazy :: Strict lazy strict => Iso' strict lazy Source #
An Iso' between the strict variant of a structure and its lazy counterpart.
lazy = re strict
Orphan instances
| Swapped Pair Source # | |
| Swapped These Source # | |
| Swapped Either Source # | |
| Each () (Maybe a) (Maybe b) a b Source # | |
Methods each :: IxTraversal () (Maybe a) (Maybe b) a b # | |
| (a ~ a', b ~ b') => Each Int (Pair a a') (Pair b b') a b Source # | |
| Field1 (Pair a b) (Pair a' b) a a' Source # | |
| Field2 (Pair a b) (Pair a b') b b' Source # | |
| (a ~ a', b ~ b') => Each (Either () ()) (These a a') (These b b') a b Source # | |
| (a ~ a', b ~ b') => Each (Either () ()) (Either a a') (Either b b') a b Source # | |