| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Web.Routing.SafeRouting
Documentation
data RouteHandle (m :: Type -> Type) a Source #
Constructors
| RouteHandle (PathInternal as) (HVectElim as (m a)) |
newtype HVectElim' x (ts :: [Type]) Source #
Constructors
| HVectElim' | |
Fields
| |
emptyRegistry :: Registry m a Source #
defRoute :: forall (xs :: [Type]) m a. PathInternal xs -> HVectElim' (m a) xs -> Registry m a -> Registry m a Source #
matchRoute :: Registry m a -> [Text] -> [m a] Source #
data PathInternal (as :: [Type]) where Source #
Constructors
| PI_Empty :: PathInternal ('[] :: [Type]) | |
| PI_StaticCons :: forall (as :: [Type]). Text -> PathInternal as -> PathInternal as | |
| PI_VarCons :: forall a (as1 :: [Type]). (FromHttpApiData a, Typeable a) => PathInternal as1 -> PathInternal (a ': as1) | |
| PI_Wildcard :: forall (as1 :: [Type]). PathInternal as1 -> PathInternal (Text ': as1) |
Instances
| Monad m => MonadReader (PathInternal ('[] :: [Type])) (RegistryT n b middleware reqTypes m) Source | |
Defined in Web.Routing.Router Methods ask :: RegistryT n b middleware reqTypes m (PathInternal ('[] :: [Type])) local :: (PathInternal ('[] :: [Type]) -> PathInternal ('[] :: [Type])) -> RegistryT n b middleware reqTypes m a -> RegistryT n b middleware reqTypes m a reader :: (PathInternal ('[] :: [Type]) -> a) -> RegistryT n b middleware reqTypes m a | |
Constructors
| PathMap | |
Fields
| |
emptyPathMap :: PathMap x Source #
updatePathMap :: forall ctx (ts :: [Type]) x. (forall y. (ctx -> y) -> PathMap y -> PathMap y) -> PathInternal ts -> (HVect ts -> ctx -> x) -> PathMap x -> PathMap x Source #
insertPathMap' :: forall (ts :: [Type]) x. PathInternal ts -> (HVect ts -> x) -> PathMap x -> PathMap x Source #
insertPathMap :: RouteHandle m a -> PathMap (m a) -> PathMap (m a) Source #
insertSubComponent' :: forall (ts :: [Type]) x. PathInternal ts -> (HVect ts -> [Text] -> x) -> PathMap x -> PathMap x Source #
insertSubComponent :: Functor m => RouteHandle m ([Text] -> a) -> PathMap (m a) -> PathMap (m a) Source #
(</!>) :: forall (as :: [Type]) (bs :: [Type]). PathInternal as -> PathInternal bs -> PathInternal (Append as bs) Source #
combineRoutePieces :: [Text] -> Text Source #