Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
gmapM :: (Data a, Monad m) => (forall d . Data d => d -> m d) -> a -> m ario RIO.Prelude.Types 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 ario RIO.Prelude.Types Transformation of one immediate subterm with success
gmapMp :: (Data a, MonadPlus m) => (forall d . Data d => d -> m d) -> a -> m ario RIO.Prelude.Types Transformation of at least one immediate subterm does not fail
gmapQ :: Data a => (forall d . Data d => d -> u) -> a -> [u]rio RIO.Prelude.Types 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 -> urio RIO.Prelude.Types A generic query that processes one child by index (zero-based)
gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d . Data d => d -> r') -> a -> rrio RIO.Prelude.Types A generic query with a left-associative binary operator
gmapQr :: forall r r' . Data a => (r' -> r -> r) -> r -> (forall d . Data d => d -> r') -> a -> rrio RIO.Prelude.Types A generic query with a right-associative binary operator
gmapT :: Data a => (forall b . Data b => b -> b) -> a -> ario RIO.Prelude.Types A generic transformation that maps over the immediate subterms The default definition instantiates the type constructor c in the type of gfoldl to an identity datatype constructor, using the isomorphism pair as injection and projection.
bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b ddiagrams-lib Diagrams.Prelude Map over both arguments at the same time.
bimap f g ≡ first f . second g
Examples
>>> bimap toUpper (+1) ('j', 3) ('J',4)
>>> bimap toUpper (+1) (Left 'j') Left 'J'
>>> bimap toUpper (+1) (Right 3) Right 4
-
diagrams-lib Diagrams.Prelude Lift two Isos into both arguments of a Bifunctor.
bimapping :: Bifunctor p => Iso s t a b -> Iso s' t' a' b' -> Iso (p s s') (p t t') (p a a') (p b b') bimapping :: Bifunctor p => Iso' s a -> Iso' s' a' -> Iso' (p s s') (p a a')