snap-web-routes-0.3.0.0: Type safe URLs for Snap

Safe HaskellNone

Snap.Web.Routes

Synopsis

Documentation

routeWithSource

Arguments

:: (PathInfo url, MonadSnap m) 
=> (url -> m ())

routing function

-> m () 

Given a routing function, routes matching requests or calls pass.

routeWithDebugSource

Arguments

:: (PathInfo url, MonadSnap m) 
=> (url -> m ())

routing function

-> m () 

Given a routing function, routes matching requests or returns debugging information. This is __not suitable for production__, but can be useful in seeing what paths are available or determining why a path isn't routing as expected.

renderRouteSource

Arguments

:: PathInfo url 
=> url

URL data type

-> [(Text, Maybe Text)]

parameters

-> Text

rendered route

Turn a route and params into a path.

renderRouteWithPrefixSource

Arguments

:: PathInfo url 
=> Text

route prefix

-> url

URL data type

-> [(Text, Maybe Text)]

parameters

-> Text

rendered route

Turn a route and params into a path with the given prefix.

showUrlSource

Arguments

:: MonadRoute m 
=> URL m

URL data type

-> m Text

rendered route

showUrlParamsSource

Arguments

:: MonadRoute m 
=> URL m

URL data type

-> [(Text, Maybe Text)]

parameters

-> m Text

rendered route

urlSplice :: MonadRoute m => URL m -> m [Node]Source

Render a url as a Heist splice.