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.

  1. mapParserInput :: (InputMappableParsing m, InputParsing (m s), s ~ ParserInput (m s), Monoid s, Monoid s') => (s -> s') -> (s' -> s) -> m s a -> m s' a

    construct Construct.Classes

    Converts a parser accepting one input stream type to another. The functions forth and back must be inverses of each other and they must distribute through <>:

    f (s1 <> s2) == f s1 <> f s2
    

  2. mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])

    control-monad-free Control.Monad.Free

    The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.

  3. mapFree :: (Functor f, Functor g) => (f (Free g a) -> g (Free g a)) -> Free f a -> Free g a

    control-monad-free Control.Monad.Free

    No documentation available.

  4. mapFreeA :: (Traversable f, Functor g, Applicative m) => m (f (Free g a) -> g (Free g a)) -> Free f a -> m (Free g a)

    control-monad-free Control.Monad.Free

    No documentation available.

  5. mapFreeM :: (Traversable f, Functor g, Monad m) => (f (Free g a) -> m (g (Free g a))) -> Free f a -> m (Free g a)

    control-monad-free Control.Monad.Free

    No documentation available.

  6. mapFreeM' :: (Functor f, Traversable g, Monad m) => (forall a1 . () => f a1 -> m (g a1)) -> Free f a -> m (Free g a)

    control-monad-free Control.Monad.Free

    No documentation available.

  7. mapFreeT :: forall (f :: Type -> Type) m m' a . (Functor f, Functor m) => (forall a1 . () => m a1 -> m' a1) -> FreeT f m a -> FreeT f m' a

    control-monad-free Control.Monad.Free

    No documentation available.

  8. mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)

    control-monad-free Control.Monad.Free

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

    Examples

    mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

  9. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    control-monad-free Control.Monad.Free

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

  10. mapWorkers :: Int -> (α -> Program τ β) -> [α] -> Program τ [β]

    core-program Core.Program.Workers

    Map a pool of workers over a list concurrently. Simply forking one Haskell thread for every item in a list is a suprisingly reasonable choice in many circumstances given how good Haskell's concurrency machinery is, and in this library can be achieved by forMing forkThread over a list of items. But if you need tighter control over the amount of concurrency—as is often the case when doing something computationally heavy or making requests of an external service with known limitations—then you are better off using this convenience function. (this was originally modelled on async's mapConcurrently. That implementation has the drawback that the number of threads created is set by the size of the structure being traversed. Here we set the amount of concurrency explicitly.) Be aware that the order of items in the output list is non-deterministic and will depend on the order that the action function completes, not the order of items in the input.

Page 326 of many | Previous | Next