web-routes-0.25.3: Library for maintaining correctness and composability of URLs within an application.





Declaration of the RouteT monad transformer


RouteT Monad Transformer

newtype RouteT url m a Source

monad transformer for generating URLs




unRouteT :: (url -> [(String, String)] -> Link) -> m a


MonadRWS r w s m => MonadRWS r w s (RouteT url m) 
MonadError e m => MonadError e (RouteT url m) 
MonadReader r m => MonadReader r (RouteT url m) 
MonadState s m => MonadState s (RouteT url m) 
MonadWriter w m => MonadWriter w (RouteT url m) 
MonadTrans (RouteT url) 
Monad m => Monad (RouteT url m) 
Functor m => Functor (RouteT url m) 
MonadFix m => MonadFix (RouteT url m) 
(MonadPlus m, Monad (RouteT url m)) => MonadPlus (RouteT url m) 
Applicative m => Applicative (RouteT url m) 
Alternative m => Alternative (RouteT url m) 
MonadIO m => MonadIO (RouteT url m) 
MonadCont m => MonadCont (RouteT url m) 
Monad m => ShowURL (RouteT url m) 

runRouteT :: (url -> RouteT url m a) -> (url -> [(String, String)] -> String) -> url -> m aSource

convert a RouteT based route handler to a handler that can be used with the Site type

NOTE: this function used to be the same as unRouteT. If you want the old behavior, just call unRouteT.

mapRouteT :: (m a -> n b) -> RouteT url m a -> RouteT url n bSource

Transform the computation inside a RouteT.

withRouteT :: ((url' -> [(String, String)] -> Link) -> url -> [(String, String)] -> Link) -> RouteT url m a -> RouteT url' m aSource

Execute a computation in a modified environment

liftRouteT :: m a -> RouteT url m aSource

askRouteT :: Monad m => RouteT url m (url -> [(String, String)] -> String)Source

class ShowURL m whereSource

Associated Types

type URL m Source




:: URL m 
-> [(String, String)] 
-> m Link

convert a URL value and a parameter list into a Link (aka, a String)


Monad m => ShowURL (RouteT url m) 

showURL :: ShowURL m => URL m -> m LinkSource

convert a URL value into a Link (aka, a String) using a null parameter list.

nestURL :: Monad m => (url2 -> url1) -> RouteT url2 m a -> RouteT url1 m aSource

used to embed a RouteT into a larger parent url

crossURL :: Monad m => (url2 -> url1) -> [(String, String)] -> RouteT url1 m (url2 -> Link)Source