reroute-0.1.0.0: abstract implementation of typed and untyped web routing

Safe HaskellNone

Web.Routing.TextRouting

Synopsis

Documentation

combineRoute :: Text -> Text -> TextSource

Combine two routes, ensuring that the slashes don't get messed up

type TextAction m r = TAction m r `[]`Source

newtype TPath a Source

Constructors

TPath 

Fields

unTPath :: Text
 

Instances

Eq (TPath a) 
Ord (TPath a) 
Read (TPath a) 
Show (TPath a) 
IsString (TPath a) 

newtype TAction m r p Source

Constructors

TAction (m r) 

newtype TActionAppl m r Source

Constructors

TActionAppl (m r) 

data TextRouter m a Source

Constructors

TextRouter 

Instances

data RegexWrapper Source

Constructors

RegexWrapper 

Fields

rw_regex :: !Regex
 
rw_original :: !Text
 

data RouteData a Source

Constructors

RouteData 

Fields

rd_node :: !RouteNode
 
rd_data :: Maybe a
 

Instances

Eq a => Eq (RouteData a) 
Show a => Show (RouteData a) 

data RoutingTree a Source

Constructors

RoutingTree 

Fields

rt_node :: !(RouteData a)
 
rt_children :: !(Vector (RoutingTree a))
 

Instances

Eq a => Eq (RoutingTree a) 
Show a => Show (RoutingTree a) 

matchRoute :: Text -> RoutingTree a -> [(ParamMap, a)]Source

matchRoute' :: [Text] -> RoutingTree a -> [(ParamMap, a)]Source

matchNode :: Text -> RouteNode -> (Bool, Maybe (CaptureVar, Text))Source