Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- (.=) :: (MonadState s m, Is k A_Setter) => Optic k is s s a b -> b -> m ()
- (?=) :: (MonadState s m, Is k A_Setter) => Optic k is s s (Maybe a) (Maybe b) -> b -> m ()
- (%=) :: (MonadState s m, Is k A_Setter) => Optic k is s s a b -> (a -> b) -> m ()
- (%%=) :: (MonadState s m, PermeableOptic k r) => Optic k is s s a b -> (a -> (r, b)) -> m (ViewResult k r)
- (<.=) :: (MonadState s m, PermeableOptic k b) => Optic k is s s a b -> b -> m (ViewResult k b)
- (<?=) :: (MonadState s m, PermeableOptic k (Maybe b)) => Optic k is s s (Maybe a) (Maybe b) -> b -> m (ViewResult k (Maybe b))
- (<%=) :: (MonadState s m, PermeableOptic k b) => Optic k is s s a b -> (a -> b) -> m (ViewResult k b)
- (<<.=) :: (MonadState s m, PermeableOptic k a) => Optic k is s s a b -> b -> m (ViewResult k a)
- (<<?=) :: (MonadState s m, PermeableOptic k (Maybe a)) => Optic k is s s (Maybe a) (Maybe b) -> b -> m (ViewResult k (Maybe a))
- (<<%=) :: (MonadState s m, PermeableOptic k a) => Optic k is s s a b -> (a -> b) -> m (ViewResult k a)
- class (Is k A_Traversal, ViewableOptic k r) => PermeableOptic k r where
State modifying optics
(?=) :: (MonadState s m, Is k A_Setter) => Optic k is s s (Maybe a) (Maybe b) -> b -> m () infix 4 #
State modifying optics with passthrough
(%%=) :: (MonadState s m, PermeableOptic k r) => Optic k is s s a b -> (a -> (r, b)) -> m (ViewResult k r) infix 4 #
Returning new value
(<.=) :: (MonadState s m, PermeableOptic k b) => Optic k is s s a b -> b -> m (ViewResult k b) infix 4 #
(<?=) :: (MonadState s m, PermeableOptic k (Maybe b)) => Optic k is s s (Maybe a) (Maybe b) -> b -> m (ViewResult k (Maybe b)) infix 4 #
(<%=) :: (MonadState s m, PermeableOptic k b) => Optic k is s s a b -> (a -> b) -> m (ViewResult k b) infix 4 #
Returning old value
(<<.=) :: (MonadState s m, PermeableOptic k a) => Optic k is s s a b -> b -> m (ViewResult k a) infix 4 #
(<<?=) :: (MonadState s m, PermeableOptic k (Maybe a)) => Optic k is s s (Maybe a) (Maybe b) -> b -> m (ViewResult k (Maybe a)) infix 4 #
(<<%=) :: (MonadState s m, PermeableOptic k a) => Optic k is s s a b -> (a -> b) -> m (ViewResult k a) infix 4 #
Passthrough
class (Is k A_Traversal, ViewableOptic k r) => PermeableOptic k r where #
passthrough :: Optic k is s t a b -> (a -> (r, b)) -> s -> (ViewResult k r, t) #
Modify the target of an Optic
returning some extra information of type r
.
Instances
Monoid r => PermeableOptic A_Traversal r # | |
Defined in Optics.Internal.Passthrough passthrough :: Optic A_Traversal is s t a b -> (a -> (r, b)) -> s -> (ViewResult A_Traversal r, t) # | |
PermeableOptic An_AffineTraversal r # | |
Defined in Optics.Internal.Passthrough passthrough :: Optic An_AffineTraversal is s t a b -> (a -> (r, b)) -> s -> (ViewResult An_AffineTraversal r, t) # | |
PermeableOptic A_Prism r # | |
Defined in Optics.Internal.Passthrough passthrough :: Optic A_Prism is s t a b -> (a -> (r, b)) -> s -> (ViewResult A_Prism r, t) # | |
PermeableOptic A_Lens r # | |
Defined in Optics.Internal.Passthrough passthrough :: Optic A_Lens is s t a b -> (a -> (r, b)) -> s -> (ViewResult A_Lens r, t) # | |
PermeableOptic An_Iso r # | |
Defined in Optics.Internal.Passthrough passthrough :: Optic An_Iso is s t a b -> (a -> (r, b)) -> s -> (ViewResult An_Iso r, t) # |