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

Safe HaskellNone
LanguageHaskell2010

Web.Routing.SafeRouting

Synopsis

Documentation

data RouteHandle m a Source

Constructors

forall as . RouteHandle (Path as) (HVectElim as (m a)) 

newtype HVectElim' x ts Source

Constructors

HVectElim' 

Fields

flipHVectElim :: HVectElim ts x
 

data SafeRouter m a Source

Constructors

SafeRouter 

Instances

AbstractRouter (SafeRouter m a) 
data Registry (SafeRouter m a) = SafeRouterReg (PathMap (m a), [[Text] -> m a]) 
data RoutePath (SafeRouter m a) = SafeRouterPath (Path xs) 
type RouteAction (SafeRouter m a) = HVectElim' (m a) 
type RouteAppliedAction (SafeRouter m a) = m a 

data Path as where Source

Constructors

Empty :: Path [] 
StaticCons :: Text -> Path as -> Path as 
VarCons :: (PathPiece a, Typeable a) => Path as -> Path (a : as) 

Instances

(~) [*] a ([] *) => IsString (Path a) 

pathToRep :: Path as -> Rep as Source

insertPathMap' :: Path ts -> (HVect ts -> x) -> PathMap x -> PathMap x Source

match :: PathMap x -> [Text] -> [x] Source

var :: (Typeable a, PathPiece a) => Path (a : []) Source

A route parameter

type Var a = Path (a : []) Source

static :: String -> Path [] Source

A static route piece

root :: Path [] Source

The root of a path piece. Use to define a handler for "/"

(</>) :: Path as -> Path bs -> Path (Append as bs) Source

renderRoute' :: Path as -> HVect as -> [Text] Source

parse :: Path as -> [Text] -> Maybe (HVect as) Source