Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data RouteHandle m a = forall as . RouteHandle (Path as) (HVectElim as (m a))
- newtype HVectElim' x ts = HVectElim' {
- flipHVectElim :: HVectElim ts x
- data SafeRouter m a = SafeRouter
- data Path as where
- data PathMap x = PathMap {
- pm_here :: [x]
- pm_staticMap :: HashMap Text (PathMap x)
- pm_polyMap :: PolyMap PathPiece PathMap x
- emptyPathMap :: PathMap x
- insertPathMap' :: Path ts -> (HVect ts -> x) -> PathMap x -> PathMap x
- singleton :: Path ts -> HVectElim ts x -> PathMap x
- insertPathMap :: RouteHandle m a -> PathMap (m a) -> PathMap (m a)
- match :: PathMap x -> [Text] -> [x]
- var :: (Typeable a, PathPiece a) => Path (a : [])
- type Var a = Path (a : [])
- static :: String -> Path []
- root :: Path []
- (</>) :: Path as -> Path bs -> Path (Append as bs)
- renderRoute :: Path as -> HVect as -> Text
- renderRoute' :: Path as -> HVect as -> [Text]
- parse :: Path as -> [Text] -> Maybe (HVect as)
Documentation
data RouteHandle m a Source
forall as . RouteHandle (Path as) (HVectElim as (m a)) |
newtype HVectElim' x ts Source
HVectElim' | |
|
data SafeRouter m a Source
AbstractRouter (SafeRouter m a) | |
data Registry (SafeRouter m a) = SafeRouterReg (PathMap (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 |
PathMap | |
|
emptyPathMap :: PathMap x Source
insertPathMap :: RouteHandle m a -> PathMap (m a) -> PathMap (m a) Source
renderRoute :: Path as -> HVect as -> Text Source
renderRoute' :: Path as -> HVect as -> [Text] Source