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.
-
effectful Effectful.Concurrent.Async Lifted mapConcurrently_.
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.
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.
-
fixed-vector Data.Vector.Fixed.Cont Effectful map over vector.
-
fixed-vector Data.Vector.Fixed.Cont Apply monadic action to each element of vector and ignore result.
mapG :: (Vector v a, Vector w b, Dim v ~ Dim w) => (a -> b) -> v a -> w bfixed-vector Data.Vector.Fixed.Generic Map over vector
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.
mapServerPartT :: (UnWebT m a -> UnWebT n b) -> ServerPartT m a -> ServerPartT n bhappstack-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 -> xWith 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.mapServerPartT' :: (Request -> UnWebT m a -> UnWebT n b) -> ServerPartT m a -> ServerPartT n bhappstack-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).
mapWebT :: (UnWebT m a -> UnWebT n b) -> WebT m a -> WebT n bhappstack-server Happstack.Server.Internal.Monads See mapServerPartT for a discussion of this function.