Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
%= ) :: forall (m :: Type -> Type) w s a r . (Monad m, Monoid w) => T s a -> a -> RWST r w s m ()data-accessor-transformers Data.Accessor.Monad.Trans.RWS Infix variant of set.
(
%: ) :: forall (m :: Type -> Type) r a . Monad m => T r a -> (a -> a) -> StateT r m ()data-accessor-transformers Data.Accessor.Monad.Trans.State Infix variant of modify.
(
%= ) :: forall (m :: Type -> Type) r a . Monad m => T r a -> a -> StateT r m ()data-accessor-transformers Data.Accessor.Monad.Trans.State Infix variant of set.
-
generic-data Generic.Data.Internal.Microsurgery Infix name for OnField. To be used with Surgeries or Cat.
Examples
Transform one Int field into Sum Int for deriving Monoid:data Vec a = Vec { len :: Int , contents :: [a] } deriving Generic deriving (Eq, Show) via Generically (Vec a) deriving (Semigroup, Monoid) via ProductSurgeries '["len" %~ Sum] (Vec a)
Wrap unshowable fields in Opaque for deriving Show:data Unshowable = Unshowable { fun :: Int -> Int , io :: IO Bool , int :: Int } deriving Generic deriving Show via Surgeries '["fun" %~ Opaque, "io" %~ Opaque] Unshowable -- show (Unshowable id (pure True) 42) = "Unshowable _ _ 42"
-
generic-data Generic.Data.Microsurgery Infix name for OnField. To be used with Surgeries or Cat.
Examples
Transform one Int field into Sum Int for deriving Monoid:data Vec a = Vec { len :: Int , contents :: [a] } deriving Generic deriving (Eq, Show) via Generically (Vec a) deriving (Semigroup, Monoid) via ProductSurgeries '["len" %~ Sum] (Vec a)
Wrap unshowable fields in Opaque for deriving Show:data Unshowable = Unshowable { fun :: Int -> Int , io :: IO Bool , int :: Int } deriving Generic deriving Show via Surgeries '["fun" %~ Opaque, "io" %~ Opaque] Unshowable -- show (Unshowable id (pure True) 42) = "Unshowable _ _ 42"
(
%~ ) :: ASetter s t a b -> (a -> b) -> s -> tlens-family-core Lens.Family Modify all referenced fields.
(
%!= ) :: forall (m :: Type -> Type) s a b . Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()lens-family-core Lens.Family.State.Lazy Strictly modify a field of the state.
-
lens-family-core Lens.Family.State.Lazy (%%=) :: Monad m => Lens s s a b -> (a -> (c, b)) -> StateT s m c
Modify a field of the state while returning another value.(%%=) :: (Monad m, Monoid c) => Traversal s s a b -> (a -> (c, b)) -> StateT s m c
Modify each field of the state and return the mconcat of the other values. (
%= ) :: forall (m :: Type -> Type) s a b . Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()lens-family-core Lens.Family.State.Lazy Modify a field of the state.
(
%!= ) :: forall (m :: Type -> Type) s a b . Monad m => ASetter s s a b -> (a -> b) -> StateT s m ()lens-family-core Lens.Family.State.Strict Strictly modify a field of the state.