Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapConcurrently_ :: forall f (es :: [Effect]) a b . (HasCallStack, Foldable f, Concurrent :> es) => (a -> Eff es b) -> f a -> Eff es ()

    effectful Effectful.Concurrent.Async

    Lifted mapConcurrently_.

  2. mapM :: (Vector v a, Vector v b, Applicative f) => (a -> f b) -> v a -> f (v b)

    fixed-vector Data.Vector.Fixed

    Effectful map over vector.

  3. mapM_ :: (Vector v a, Applicative f) => (a -> f b) -> v a -> f ()

    fixed-vector Data.Vector.Fixed

    Apply monadic action to each element of vector and ignore result.

  4. mapM :: forall (n :: PeanoNum) f a b . (ArityPeano n, Applicative f) => (a -> f b) -> ContVec n a -> f (ContVec n b)

    fixed-vector Data.Vector.Fixed.Cont

    Effectful map over vector.

  5. mapM_ :: forall (n :: PeanoNum) f a b . (ArityPeano n, Applicative f) => (a -> f b) -> ContVec n a -> f ()

    fixed-vector Data.Vector.Fixed.Cont

    Apply monadic action to each element of vector and ignore result.

  6. mapG :: (Vector v a, Vector w b, Dim v ~ Dim w) => (a -> b) -> v a -> w b

    fixed-vector Data.Vector.Fixed.Generic

    Map over vector

  7. mapMG :: (Vector v a, Vector w b, Dim w ~ Dim v, Monad m) => (a -> m b) -> v a -> m (w b)

    fixed-vector Data.Vector.Fixed.Generic

    Monadic map over vector.

  8. mapServerPartT :: (UnWebT m a -> UnWebT n b) -> ServerPartT m a -> ServerPartT n b

    happstack-server Happstack.Server.Internal.Monads

    Apply a function to transform the inner monad of ServerPartT m. Often used when transforming a monad with ServerPartT, since simpleHTTP requires a ServerPartT IO a. Refer to UnWebT for an explanation of the structure of the monad. Here is an example. Suppose you want to embed an ErrorT into your ServerPartT to enable throwError and catchError in your Monad.

    type MyServerPartT e m a = ServerPartT (ErrorT e m) a
    
    Now suppose you want to pass MyServerPartT into a function that demands a ServerPartT IO a (e.g. simpleHTTP). You can provide the function:
    unpackErrorT :: (Monad m, Show e) => UnWebT (ErrorT e m) a -> UnWebT m a
    unpackErrorT et = do
    eitherV <- runErrorT et
    return $ case eitherV of
    Left err -> Just (Left $ toResponse $
    "Catastrophic failure " ++ show err
    , filterFun $ \r -> r{rsCode = 500})
    Right x -> x
    
    With unpackErrorT you can now call simpleHTTP. Just wrap your ServerPartT list.
    simpleHTTP nullConf $ mapServerPartT unpackErrorT (myPart `catchError` myHandler)
    
    Or alternatively:
    simpleHTTP' unpackErrorT nullConf (myPart `catchError` myHandler)
    
    Also see spUnwrapErrorT for a more sophisticated version of this function.

  9. mapServerPartT' :: (Request -> UnWebT m a -> UnWebT n b) -> ServerPartT m a -> ServerPartT n b

    happstack-server Happstack.Server.Internal.Monads

    A variant of mapServerPartT where the first argument also takes a Request. Useful if you want to runServerPartT on a different ServerPartT inside your monad (see spUnwrapErrorT).

  10. mapWebT :: (UnWebT m a -> UnWebT n b) -> WebT m a -> WebT n b

    happstack-server Happstack.Server.Internal.Monads

    See mapServerPartT for a discussion of this function.

Page 220 of many | Previous | Next