servant-client-js-0.1.0.0: A servant client for frontend JavaScript

Safe HaskellNone
LanguageHaskell2010

Servant.Client.JS

Contents

Synopsis

Documentation

newtype ClientEnv Source #

Constructors

ClientEnv 

Fields

Instances
Eq ClientEnv Source # 
Instance details

Defined in Servant.Client.JS

Show ClientEnv Source # 
Instance details

Defined in Servant.Client.JS

MonadReader ClientEnv ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

ask :: ClientM ClientEnv #

local :: (ClientEnv -> ClientEnv) -> ClientM a -> ClientM a #

reader :: (ClientEnv -> a) -> ClientM a #

newtype ClientM a Source #

Instances
Monad ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

(>>=) :: ClientM a -> (a -> ClientM b) -> ClientM b #

(>>) :: ClientM a -> ClientM b -> ClientM b #

return :: a -> ClientM a #

fail :: String -> ClientM a #

Functor ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

fmap :: (a -> b) -> ClientM a -> ClientM b #

(<$) :: a -> ClientM b -> ClientM a #

Applicative ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

pure :: a -> ClientM a #

(<*>) :: ClientM (a -> b) -> ClientM a -> ClientM b #

liftA2 :: (a -> b -> c) -> ClientM a -> ClientM b -> ClientM c #

(*>) :: ClientM a -> ClientM b -> ClientM b #

(<*) :: ClientM a -> ClientM b -> ClientM a #

MonadIO ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

liftIO :: IO a -> ClientM a #

MonadThrow ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

throwM :: Exception e => e -> ClientM a #

MonadCatch ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

catch :: Exception e => ClientM a -> (e -> ClientM a) -> ClientM a #

MonadJSM ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

liftJSM' :: JSM a -> ClientM a #

Alt ClientM Source # 
Instance details

Defined in Servant.Client.JS

RunClient ClientM Source # 
Instance details

Defined in Servant.Client.JS

RunStreamingClient ClientM Source # 
Instance details

Defined in Servant.Client.JS

MonadReader ClientEnv ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

ask :: ClientM ClientEnv #

local :: (ClientEnv -> ClientEnv) -> ClientM a -> ClientM a #

reader :: (ClientEnv -> a) -> ClientM a #

MonadError ClientError ClientM Source # 
Instance details

Defined in Servant.Client.JS

MonadBase IO ClientM Source # 
Instance details

Defined in Servant.Client.JS

Methods

liftBase :: IO α -> ClientM α #

MonadBaseControl IO ClientM Source # 
Instance details

Defined in Servant.Client.JS

Associated Types

type StM ClientM a :: Type #

Generic (ClientM a) Source # 
Instance details

Defined in Servant.Client.JS

Associated Types

type Rep (ClientM a) :: Type -> Type #

Methods

from :: ClientM a -> Rep (ClientM a) x #

to :: Rep (ClientM a) x -> ClientM a #

type StM ClientM a Source # 
Instance details

Defined in Servant.Client.JS

type Rep (ClientM a) Source # 
Instance details

Defined in Servant.Client.JS

type Rep (ClientM a) = D1 (MetaData "ClientM" "Servant.Client.JS" "servant-client-js-0.1.0.0-6PU487BLTa52wt8h77Ijj1" True) (C1 (MetaCons "ClientM" PrefixI True) (S1 (MetaSel (Just "runClientM'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ReaderT ClientEnv (ExceptT ClientError JSM) a))))

withStreamingRequestJSM :: Request -> (StreamingResponse -> JSM a) -> ClientM a Source #

A variation on Servant.Client.Core.withStreamingRequest where the continuation / callback passed as the second argument is in the JSM monad as opposed to the IO monad. Executes the given request and passes the response data stream to the provided continuation / callback.

Orphan instances

MonadBase IO JSM Source # 
Instance details

Methods

liftBase :: IO α -> JSM α #

MonadBaseControl IO JSM Source # 
Instance details

Associated Types

type StM JSM a :: Type #

Methods

liftBaseWith :: (RunInBase JSM IO -> IO a) -> JSM a #

restoreM :: StM JSM a -> JSM a #