Portability | Rank2Types |
---|---|
Stability | experimental |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Safe-Inferred |
- (<>~) :: Monoid a => Setting s t a a -> a -> s -> t
- (<<>~) :: Monoid m => LensLike ((,) m) s t m m -> m -> s -> (m, t)
- (<>=) :: (MonadState s m, Monoid a) => SimpleSetting s a -> a -> m ()
- (<<>=) :: (MonadState s m, Monoid r) => SimpleLensLike ((,) r) s r -> r -> m r
- _dual :: Iso a b (Dual a) (Dual b)
- _endo :: Iso (a -> a) (b -> b) (Endo a) (Endo b)
- _all :: Simple Iso Bool All
- _any :: Simple Iso Bool Any
- _sum :: Iso a b (Sum a) (Sum b)
- _product :: Iso a b (Product a) (Product b)
- _first :: Iso (Maybe a) (Maybe b) (First a) (First b)
- _last :: Iso (Maybe a) (Maybe b) (Last a) (Last b)
Monoid Lens Operators
(<>~) :: Monoid a => Setting s t a a -> a -> s -> tSource
Modify the target of a monoidally valued by mappend
ing another value.
>>>
both <>~ "!!!" $ ("hello","world")
("hello!!!","world!!!")
(<>~
) ::Monoid
a =>Setter
s t a a -> a -> s -> t (<>~
) ::Monoid
a =>Iso
s t a a -> a -> s -> t (<>~
) ::Monoid
a =>Lens
s t a a -> a -> s -> t (<>~
) ::Monoid
a =>Traversal
s t a a -> a -> s -> t
(<>=) :: (MonadState s m, Monoid a) => SimpleSetting s a -> a -> m ()Source
Modify the target(s) of a Simple
Lens
, Iso
, Setter
or Traversal
by mappend
ing a value.
>>>
execState (both <>= "!!!") ("hello","world")
("hello!!!","world!!!")
(<>=
) :: (MonadState
s m,Monoid
a) =>Simple
Setter
s a -> a -> m () (<>=
) :: (MonadState
s m,Monoid
a) =>Simple
Iso
s a -> a -> m () (<>=
) :: (MonadState
s m,Monoid
a) =>Simple
Lens
s a -> a -> m () (<>=
) :: (MonadState
s m,Monoid
a) =>Simple
Traversal
s a -> a -> m ()
(<<>=) :: (MonadState s m, Monoid r) => SimpleLensLike ((,) r) s r -> r -> m rSource