scotty-format-0.1.1.0: Response format helper for the Scotty web framework.

Safe HaskellNone
LanguageHaskell2010

Web.Scotty.Format.Trans

Documentation

respondTo :: (ScottyError e, Monad m) => ResponseFormat e m () -> ActionT e m () Source #

formatHtml :: (ScottyError e, Monad m) => ActionT e m () -> ResponseFormat e m () Source #

formatText :: (ScottyError e, Monad m) => ActionT e m () -> ResponseFormat e m () Source #

formatJson :: (ScottyError e, Monad m) => ActionT e m () -> ResponseFormat e m () Source #

format :: (ScottyError e, Monad m) => MediaType -> ActionT e m () -> ResponseFormat e m () Source #

data ResponseFormat e m a Source #

Instances

Monad (ResponseFormat e m) Source # 

Methods

(>>=) :: ResponseFormat e m a -> (a -> ResponseFormat e m b) -> ResponseFormat e m b #

(>>) :: ResponseFormat e m a -> ResponseFormat e m b -> ResponseFormat e m b #

return :: a -> ResponseFormat e m a #

fail :: String -> ResponseFormat e m a #

Functor (ResponseFormat e m) Source # 

Methods

fmap :: (a -> b) -> ResponseFormat e m a -> ResponseFormat e m b #

(<$) :: a -> ResponseFormat e m b -> ResponseFormat e m a #

Applicative (ResponseFormat e m) Source # 

Methods

pure :: a -> ResponseFormat e m a #

(<*>) :: ResponseFormat e m (a -> b) -> ResponseFormat e m a -> ResponseFormat e m b #

(*>) :: ResponseFormat e m a -> ResponseFormat e m b -> ResponseFormat e m b #

(<*) :: ResponseFormat e m a -> ResponseFormat e m b -> ResponseFormat e m a #

Monoid (ResponseFormat e m a) Source # 

Methods

mempty :: ResponseFormat e m a #

mappend :: ResponseFormat e m a -> ResponseFormat e m a -> ResponseFormat e m a #

mconcat :: [ResponseFormat e m a] -> ResponseFormat e m a #