trasa-server-0.4: Type safe web server

Safe HaskellNone
LanguageHaskell2010

Trasa.Server

Documentation

data TrasaT m a Source #

Instances
MonadTrans TrasaT Source # 
Instance details

Defined in Trasa.Server

Methods

lift :: Monad m => m a -> TrasaT m a #

Monad m => MonadError TrasaErr (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

throwError :: TrasaErr -> TrasaT m a #

catchError :: TrasaT m a -> (TrasaErr -> TrasaT m a) -> TrasaT m a #

Monad m => Monad (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

(>>=) :: TrasaT m a -> (a -> TrasaT m b) -> TrasaT m b #

(>>) :: TrasaT m a -> TrasaT m b -> TrasaT m b #

return :: a -> TrasaT m a #

fail :: String -> TrasaT m a #

Functor m => Functor (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

fmap :: (a -> b) -> TrasaT m a -> TrasaT m b #

(<$) :: a -> TrasaT m b -> TrasaT m a #

Monad m => Applicative (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

pure :: a -> TrasaT m a #

(<*>) :: TrasaT m (a -> b) -> TrasaT m a -> TrasaT m b #

liftA2 :: (a -> b -> c) -> TrasaT m a -> TrasaT m b -> TrasaT m c #

(*>) :: TrasaT m a -> TrasaT m b -> TrasaT m b #

(<*) :: TrasaT m a -> TrasaT m b -> TrasaT m a #

MonadIO m => MonadIO (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

liftIO :: IO a -> TrasaT m a #

Monad m => MonadState (Map (CI ByteString) Text) (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

get :: TrasaT m (Map (CI ByteString) Text) #

put :: Map (CI ByteString) Text -> TrasaT m () #

state :: (Map (CI ByteString) Text -> (a, Map (CI ByteString) Text)) -> TrasaT m a #

Monad m => MonadReader (Map (CI ByteString) Text) (TrasaT m) Source # 
Instance details

Defined in Trasa.Server

Methods

ask :: TrasaT m (Map (CI ByteString) Text) #

local :: (Map (CI ByteString) Text -> Map (CI ByteString) Text) -> TrasaT m a -> TrasaT m a #

reader :: (Map (CI ByteString) Text -> a) -> TrasaT m a #

runTrasaT Source #

Arguments

:: TrasaT m a 
-> Map (CI ByteString) Text

Headers

-> m (Either TrasaErr a, Map (CI ByteString) Text) 

mapTrasaT :: (forall x. m x -> n x) -> TrasaT m a -> TrasaT n a Source #

serveWith Source #

Arguments

:: (forall caps qrys req resp. route caps qrys req resp -> MetaServer caps qrys req resp) 
-> (forall caps qrys req resp. route caps qrys req resp -> Rec Identity caps -> Rec Parameter qrys -> RequestBody Identity req -> TrasaT IO resp)

Actions to perform when requests come in

-> Router route

Router

-> Application

WAI Application