web-routes-happstack-0.23.12.1: Adds support for using web-routes with Happstack

Safe HaskellNone
LanguageHaskell2010

Web.Routes.Happstack

Contents

Synopsis

Documentation

implSite Source #

Arguments

:: (Functor m, Monad m, MonadPlus m, ServerMonad m) 
=> Text

"http://example.org"

-> Text

path to this handler, .e.g. "route" or ""

-> Site url (m a)

the Site

-> m a 

convert a Site to a normal Happstack route

calls mzero if the route can be decoded.

see also: implSite_

implSite_ Source #

Arguments

:: (Functor m, Monad m, MonadPlus m, ServerMonad m) 
=> Text

"http://example.org" (or "http://example.org:80")

-> Text

path to this handler, .e.g. "route" or ""

-> Site url (m a)

the Site

-> m (Either String a) 

convert a Site to a normal Happstack route

If url decoding fails, it returns Left "the parse error", otherwise Right a.

see also: implSite

seeOtherURL :: (MonadRoute m, FilterMonad Response m) => URL m -> m Response Source #

similar to seeOther but takes a URL m as an argument

Orphan instances

FilterMonad a m => FilterMonad a (RouteT url m) Source # 
Instance details

Methods

setFilter :: (a -> a) -> RouteT url m () #

composeFilter :: (a -> a) -> RouteT url m () #

getFilter :: RouteT url m b -> RouteT url m (b, a -> a) #

WebMonad a m => WebMonad a (RouteT url m) Source # 
Instance details

Methods

finishWith :: a -> RouteT url m b #

Happstack m => Happstack (RouteT url m) Source # 
Instance details

HasRqData m => HasRqData (RouteT url m) Source # 
Instance details

Methods

askRqEnv :: RouteT url m RqEnv #

localRqEnv :: (RqEnv -> RqEnv) -> RouteT url m a -> RouteT url m a #

rqDataError :: Errors String -> RouteT url m a #

ServerMonad m => ServerMonad (RouteT url m) Source # 
Instance details

Methods

askRq :: RouteT url m Request #

localRq :: (Request -> Request) -> RouteT url m a -> RouteT url m a #