Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines some infix operators for optics operations. This is a deliberately small collection.
If you like operators, you may also wish to import Optics.State.Operators
from the optics-extra
package.
Synopsis
- (^.) :: Is k A_Getter => s -> Optic' k is s a -> a
- (^..) :: Is k A_Fold => s -> Optic' k is s a -> [a]
- (^?) :: Is k An_AffineFold => s -> Optic' k is s a -> Maybe a
- (#) :: Is k A_Review => Optic' k is t b -> b -> t
- (%~) :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- (%!~) :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- (.~) :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
- (!~) :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
- (?~) :: Is k A_Setter => Optic k is s t a (Maybe b) -> b -> s -> t
- (?!~) :: Is k A_Setter => Optic k is s t a (Maybe b) -> b -> s -> t
Documentation
(^..) :: Is k A_Fold => s -> Optic' k is s a -> [a] infixl 8 Source #
Flipped infix version of toListOf
.
(^?) :: Is k An_AffineFold => s -> Optic' k is s a -> Maybe a infixl 8 Source #
Flipped infix version of preview
.
(%~) :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t infixr 4 Source #
Infix version of over
.
(%!~) :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t infixr 4 Source #
Infix version of over'
.