package dispatch

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dispatch.DSLSource

A module that implements the dispatch operations for a DLS represented as a string literal. A more familiar interface for the Web world.

Sourcetype 'a route = string * (assoc -> string option -> 'a)

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_dsk "/user/:id/settings";;
  = ([`Lit, "user"; `Var, "id"; `Lit, "settings"], `Exact)
Sourceval create : 'a route list -> 'a t
OCaml

Innovation. Community. Security.