pusher-http-haskell-0.3.0.0: Haskell client library for the Pusher HTTP API

Copyright(c) Will Sewell, 2015
LicenseMIT
Maintainerme@willsewell.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Pusher

Description

Monad type aliases for the return types of the external API functions.

The API functions return a monad that implements MonadPusher. The user of the library can use PusherT or PusherM as the concrete return type, or they can use their own types. They are really just aliases for a stack of ReaderT and ErrorT.

Synopsis

Documentation

type MonadPusher m = (Functor m, MonadError Text m, MonadHTTP m, MonadReader Pusher m, MonadTime m) Source

Typeclass alias for the return type of the API functions (keeps the signatures less verbose)

type PusherM a = PusherT Identity a Source

Monad that can be used as the return type of the main API functions.

type PusherT m a = ReaderT Pusher (ExceptT Text m) a Source

Use this if you wish to stack this on your own monads.

runPusherT :: PusherT m a -> Pusher -> m (Either Text a) Source

Run the monadic Pusher code to extract the result