Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
bifoldMapDefault :: (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> mbase Data.Bitraversable A default definition of bifoldMap in terms of the Bitraversable operations.
bifoldMapDefault f g ≡ getConst . bitraverse (Const . f) (Const . g)
-
base Data.Bitraversable The bimapAccumL function behaves like a combination of bimap and bifoldl; it traverses a structure from left to right, threading a state of type a and using the given actions to compute new elements for the structure.
Examples
Basic usage:>>> bimapAccumL (\acc bool -> (acc + 1, show bool)) (\acc string -> (acc * 2, reverse string)) 3 (True, "foo") (8,("True","oof")) -
base Data.Bitraversable The bimapAccumR function behaves like a combination of bimap and bifoldr; it traverses a structure from right to left, threading a state of type a and using the given actions to compute new elements for the structure.
Examples
Basic usage:>>> bimapAccumR (\acc bool -> (acc + 1, show bool)) (\acc string -> (acc * 2, reverse string)) 3 (True, "foo") (7,("True","oof")) bimapDefault :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b dbase Data.Bitraversable A default definition of bimap in terms of the Bitraversable operations.
bimapDefault f g ≡ runIdentity . bitraverse (Identity . f) (Identity . g)
bimapM :: (Bitraversable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)base Data.Bitraversable Alias for bitraverse.
gmapM :: (Data a, Monad m) => (forall d . Data d => d -> m d) -> a -> m abase Data.Data A generic monadic transformation that maps over the immediate subterms The default definition instantiates the type constructor c in the type of gfoldl to the monad datatype constructor, defining injection and projection using return and >>=.
gmapMo :: (Data a, MonadPlus m) => (forall d . Data d => d -> m d) -> a -> m abase Data.Data Transformation of one immediate subterm with success
gmapMp :: (Data a, MonadPlus m) => (forall d . Data d => d -> m d) -> a -> m abase Data.Data Transformation of at least one immediate subterm does not fail
gmapQ :: Data a => (forall d . Data d => d -> u) -> a -> [u]base Data.Data A generic query that processes the immediate subterms and returns a list of results. The list is given in the same order as originally specified in the declaration of the data constructors.
gmapQi :: Data a => Int -> (forall d . Data d => d -> u) -> a -> ubase Data.Data A generic query that processes one child by index (zero-based)