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

Safe HaskellNone
LanguageHaskell98

Web.Routes.Happstack

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