package dispatch
Module Dispatch.DSL
A module that implements the dispatch operations for a DLS represented as a string literal. A more familiar interface for the Web world.
The type of a route using the DSL to specify the path pattern. For example, here are some DSL strings and their translation:
of_dsl "/" = ([], `Exact)of_dsl "/user/:id" = ([`Lit, "user"; `Var, "id"], `Exact)of_dsl "/user/:id/*" = ([`Lit, "user"; `Var, "id"], `Prefix)of_dsl "/user/:id/settings" = ([`Lit, "user"; `Var, "id"; `Var "settings"], `Prefix)
val dispatch :
'a route list ->
string ->
('a * assoc * string option, string) Result.result