Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. hoistWithIO :: (MonadTunnelIO m, Traversable f) => (forall a . () => IO a -> IO (f a)) -> m r -> m (f r)

    monadology Control.Monad.Ology.General.Trans.Tunnel

    No documentation available.

  2. hoistMaybe :: forall (m :: Type -> Type) b . Applicative m => Maybe b -> MaybeT m b

    monadology Control.Monad.Ology.Specific.MaybeT

    Convert a Maybe computation to MaybeT.

  3. hoistEither :: forall x (e :: [Type]) m a . (MonadError (Variant e) m, CouldBe e x, Monad m) => Either x a -> m a

    oops Control.Monad.Oops

    When the expression of type 'Either x a' evaluates to 'Left x', throw the x, otherwise return a.

  4. hoistMaybe :: forall e (es :: [Type]) m a . (MonadError (Variant es) m, CouldBe es e) => e -> Maybe a -> m a

    oops Control.Monad.Oops

    When the expression of type 'Maybe a' evaluates to Nothing, throw the specified value, otherwise return a.

  5. hoistClient :: HasClient ClientM api => Proxy api -> (forall a . () => m a -> n a) -> Client m api -> Client n api

    servant-http-streams Servant.HttpStreams

    Change the monad the client functions live in, by supplying a conversion function (a natural transformation to be precise). For example, assuming you have some manager :: Manager and baseurl :: BaseUrl around:

    type API = Get '[JSON] Int :<|> Capture "n" Int :> Post '[JSON] Int
    api :: Proxy API
    api = Proxy
    getInt :: IO Int
    postInt :: Int -> IO Int
    getInt :<|> postInt = hoistClient api (flip runClientM cenv) (client api)
    where cenv = mkClientEnv manager baseurl
    

  6. hoistClient :: HasClient ClientM api => Proxy api -> (forall a . () => m a -> n a) -> Client m api -> Client n api

    servant-http-streams Servant.HttpStreams.Internal

    Change the monad the client functions live in, by supplying a conversion function (a natural transformation to be precise). For example, assuming you have some manager :: Manager and baseurl :: BaseUrl around:

    type API = Get '[JSON] Int :<|> Capture "n" Int :> Post '[JSON] Int
    api :: Proxy API
    api = Proxy
    getInt :: IO Int
    postInt :: Int -> IO Int
    getInt :<|> postInt = hoistClient api (flip runClientM cenv) (client api)
    where cenv = mkClientEnv manager baseurl
    

  7. hoistEither :: Either Response a -> Controller s a

    simple Web.Simple.Controller

    No documentation available.

  8. hoistEither :: forall (m :: Type -> Type) a s . Monad m => Either Response a -> ControllerT s m a

    simple Web.Simple.Controller.Trans

    No documentation available.

  9. hoistApplicationT :: (Monad m, Monad n) => (forall a . () => m a -> n a) -> (forall a . () => n a -> m a) -> ApplicationT m -> ApplicationT n

    wai-transformers Network.Wai.Trans

    No documentation available.

  10. hoistMiddlewareT :: (Monad m, Monad n) => (forall a . () => m a -> n a) -> (forall a . () => n a -> m a) -> MiddlewareT m -> MiddlewareT n

    wai-transformers Network.Wai.Trans

    No documentation available.

Page 14 of many | Previous | Next