11(* * Routing
22
3- Basic type-safe routing of handlers based on URL paths. This is optional,
4- it is possible to only define the root handler with something like
5- {{: https://github.com/anuragsoni/routes/} Routes}.
3+ Basic type-safe routing of handlers based on URL paths. This is optional, it
4+ is possible to only define the root handler with something like
5+ {{:https://github.com/anuragsoni/routes/} Routes}.
66 @since 0.6 *)
77
88type ('a, 'b) comp
@@ -27,31 +27,31 @@ val return : ('a, 'a) t
2727(* * Matches the empty path. *)
2828
2929val rest_of_path : (string -> 'a , 'a ) t
30- (* * Matches a string, even containing ['/']. This will match
31- the entirety of the remaining route.
32- @since 0.7 *)
30+ (* * Matches a string, even containing ['/']. This will match the entirety of the
31+ remaining route.
32+ @since 0.7 *)
3333
3434val rest_of_path_urlencoded : (string -> 'a , 'a ) t
35- (* * Matches a string, even containing ['/'], and URL-decode it (piecewise).
36- This will match the entirety of the remaining route.
37- @since 0.7 *)
35+ (* * Matches a string, even containing ['/'], and URL-decode it (piecewise). This
36+ will match the entirety of the remaining route.
37+ @since 0.7 *)
3838
3939val ( @/ ) : ('a, 'b) comp -> ('b, 'c) t -> ('a, 'c) t
40- (* * [comp / route] matches ["foo/bar/…"] iff [comp] matches ["foo"],
41- and [route] matches ["bar/…"]. *)
40+ (* * [comp / route] matches ["foo/bar/…"] iff [comp] matches ["foo"], and [route]
41+ matches ["bar/…"]. *)
4242
4343val exact_path : string -> ('a , 'b ) t -> ('a , 'b ) t
4444(* * [exact_path "foo/bar/..." r] is equivalent to
45- [exact "foo" @/ exact "bar" @/ ... @/ r]
46- @since 0.11 **)
45+ [exact "foo" @/ exact "bar" @/ ... @/ r]
46+ @since 0.11 **)
4747
4848val pp : Format .formatter -> _ t -> unit
4949(* * Print the route.
50- @since 0.7 *)
50+ @since 0.7 *)
5151
5252val to_string : _ t -> string
5353(* * Print the route.
54- @since 0.7 *)
54+ @since 0.7 *)
5555
5656val to_url : ('a , string ) t -> 'a
5757
0 commit comments