package vif
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
A simple web framework for OCaml 5
Install
dune-project
Dependency
Authors
Maintainers
Sources
vif-0.0.1.beta5.tbz
sha256=f2dafa4f12105d85b4dc2d1e1492f03e809c85d5834dc5694b99226418fe2719
sha512=1e2087db43e8e13bfc240c1114790ceb702b941d389bbb94a7a18668e65f61d2224f05038cf9101ede890581b0e2227e4d2bd2c620f312fa18c8e37482e273c4
doc/vif.core/Vif_core/Route/index.html
Module Vif_core.RouteSource
Top level atoms are specialized for path and query, see documentation.
Extraction.
Extracting atom is just a matter of following the witness. We just need to take care of counting where we are in the matching groups.
Source
val extract_path :
'f 'x 'r. original:string ->
('f, 'x) re_path ->
Re.Group.t ->
('x -> 'r) ->
'f ->
'rSince path is in reversed order, we proceed by continuation.
Query are in the right order, we can proceed in direct style.
Multiple match
Source
type 'socket request = {extract : 'c 'a. [ `CONNECT | `DELETE | `GET | `HEAD | `OPTIONS | `POST | `PUT | `TRACE | `Other of string ] option -> ('c, 'a) Vif_core__.Vif_type.t -> ('socket, 'c, 'a) Vif_core__.Vif_request.t option;
}Source
val match_ :
((Re.re * 'a) Vif_core__.Vif_method.Map.t * (Re.re * 'a)) ->
[ `CONNECT
| `DELETE
| `GET
| `HEAD
| `OPTIONS
| `POST
| `PUT
| `TRACE
| `Other of string ] ->
string ->
(Re.Group.t * 'a) option sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page