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

Safe HaskellNone
LanguageHaskell2010

Snap.Snaplet.Router.URL

Synopsis

Documentation

urlPath Source

Arguments

:: (HasRouter m, PathInfo (URL m)) 
=> URL m

URL data type

-> m Path

Path of route

Returns the path for the given URL

urlPathParams Source

Arguments

:: (HasRouter m, PathInfo (URL m)) 
=> URL m

URL data type

-> [(Text, Maybe Text)]

Params

-> m Path

Path of route with params as query string

Returns the path with query string for the given URL and params

redirectURL Source

Arguments

:: (HasRouter m, MonadSnap m, PathInfo (URL m)) 
=> URL m

URL data type

-> m () 

Redirect to the path for the given URL

redirectURLParams Source

Arguments

:: (HasRouter m, MonadSnap m, PathInfo (URL m)) 
=> URL m

URL data type

-> [(Text, Maybe Text)]

Params

-> m () 

Redirect to the path for the given URL with params as query string