-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSharp.Router.html
More file actions
128 lines (119 loc) · 13.4 KB
/
Sharp.Router.html
File metadata and controls
128 lines (119 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Sharp.Ticker.html">
<link rel="Up" href="Sharp.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Sharp" rel="Chapter" href="Sharp.html">
<link title="Sharp_core" rel="Chapter" href="Sharp_core.html">
<link title="Sharp_event" rel="Chapter" href="Sharp_event.html">
<link title="Sharp_form" rel="Chapter" href="Sharp_form.html">
<link title="Sharp_vdom" rel="Chapter" href="Sharp_vdom.html">
<link title="Sharp_vdom_subnetwork" rel="Chapter" href="Sharp_vdom_subnetwork.html">
<link title="Sharp_router" rel="Chapter" href="Sharp_router.html">
<link title="Sharp_ticker" rel="Chapter" href="Sharp_ticker.html"><title>Sharp.Router</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Sharp.Ticker.html" title="Sharp.Ticker">Previous</a>
<a class="up" href="Sharp.html" title="Sharp">Up</a>
</div>
<h1>Module <a href="type_Sharp.Router.html">Sharp.Router</a></h1>
<pre><span class="keyword">module</span> Router: <code class="type"><a href="Sharp_router.html">Sharp_router</a></code></pre><hr width="100%">
<pre><span id="TYPEroute"><span class="keyword">type</span> <code class="type">'a</code> route</span> = <code class="type">string list -> ('a -> unit -> unit) option</code> </pre>
<div class="info ">
A route that can be handled by the router.
<p>
You probably want to create them using the modules provided here.<br>
</div>
<pre><span id="VALrouter"><span class="keyword">val</span> router</span> : <code class="type">?base_path:string -><br> 'a <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> -> 'a <a href="Sharp_router.html#TYPEroute">route</a> list -> unit -> unit</code></pre><div class="info ">
Start listening to changes to the hash.
<p>
When a route matches, the current network is stopped and the network
returned by the router is started.<br>
</div>
<pre><span id="VALrouter_"><span class="keyword">val</span> router_</span> : <code class="type">?base_path:string -> unit <a href="Sharp_router.html#TYPEroute">route</a> list -> unit -> unit</code></pre><div class="info ">
Same as <code class="code">router</code> but without an additional signal value.<br>
</div>
<pre><span class="keyword">module type</span> <a href="Sharp_router.Part.html">Part</a> = <code class="code">sig</code> <a href="Sharp_router.Part.html">..</a> <code class="code">end</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.Final.html">Final</a>: <code class="code">sig</code> <a href="Sharp_router.Final.html">..</a> <code class="code">end</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.Var.html">Var</a>: <div class="sig_block"><code class="code">functor (</code><code class="code">Rest</code><code class="code"> : </code><code class="type"><a href="Sharp_router.Part.html">Part</a></code><code class="code">) -> </code><code class="code">sig</code> <a href="Sharp_router.Var.html">..</a> <code class="code">end</code></div></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.Const.html">Const</a>: <div class="sig_block"><code class="code">functor (</code><code class="code">Rest</code><code class="code"> : </code><code class="type"><a href="Sharp_router.Part.html">Part</a></code><code class="code">) -> </code><code class="code">sig</code> <a href="Sharp_router.Const.html">..</a> <code class="code">end</code></div></pre>
<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type"><a href="Sharp_router.Final.html#TYPEt">Final.t</a></code></pre><div class="info ">
Same as <code class="code">Final.empty</code>. Match the path <code class="code">/</code>.<br>
</div>
<pre><span id="VAL(^/)"><span class="keyword">val</span> (^/)</span> : <code class="type">('a -> 'b) -> 'a -> 'b</code></pre><div class="info ">
See top documentation.<br>
</div>
<pre><span id="VAL(^//)"><span class="keyword">val</span> (^//)</span> : <code class="type">('a -> 'b) -> (<a href="Sharp_router.Final.html#TYPEt">Final.t</a> -> 'a) -> 'b</code></pre><div class="info ">
See top documentation.<br>
</div>
<pre><span class="keyword">module</span> <a href="Sharp_router.CF.html">CF</a>: <code class="type">module type of Const(Final)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VF.html">VF</a>: <code class="type">module type of Var(Final)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCF.html">CCF</a>: <code class="type">module type of Const(CF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCF.html">VCF</a>: <code class="type">module type of Var(CF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVF.html">VVF</a>: <code class="type">module type of Var(VF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVF.html">CVF</a>: <code class="type">module type of Const(VF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCF.html">CCCF</a>: <code class="type">module type of Const(CCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCF.html">CVCF</a>: <code class="type">module type of Const(VCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVF.html">CVVF</a>: <code class="type">module type of Const(VVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVF.html">CCVF</a>: <code class="type">module type of Const(CVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCF.html">VCCF</a>: <code class="type">module type of Var(CCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCF.html">VVCF</a>: <code class="type">module type of Var(VCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVF.html">VVVF</a>: <code class="type">module type of Var(VVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVF.html">VCVF</a>: <code class="type">module type of Var(CVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCCF.html">CCCCF</a>: <code class="type">module type of Const(CCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVCF.html">CCVCF</a>: <code class="type">module type of Const(CVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVVF.html">CCVVF</a>: <code class="type">module type of Const(CVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCVF.html">CCCVF</a>: <code class="type">module type of Const(CCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCCF.html">CVCCF</a>: <code class="type">module type of Const(VCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVCF.html">CVVCF</a>: <code class="type">module type of Const(VVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVVF.html">CVVVF</a>: <code class="type">module type of Const(VVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCVF.html">CVCVF</a>: <code class="type">module type of Const(VCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCCF.html">VCCCF</a>: <code class="type">module type of Var(CCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVCF.html">VCVCF</a>: <code class="type">module type of Var(CVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVVF.html">VCVVF</a>: <code class="type">module type of Var(CVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCVF.html">VCCVF</a>: <code class="type">module type of Var(CCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCCF.html">VVCCF</a>: <code class="type">module type of Var(VCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVCF.html">VVVCF</a>: <code class="type">module type of Var(VVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVVF.html">VVVVF</a>: <code class="type">module type of Var(VVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCVF.html">VVCVF</a>: <code class="type">module type of Var(VCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCCCF.html">CCCCCF</a>: <code class="type">module type of Const(CCCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCVCF.html">CCCVCF</a>: <code class="type">module type of Const(CCVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCVVF.html">CCCVVF</a>: <code class="type">module type of Const(CCVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCCCVF.html">CCCCVF</a>: <code class="type">module type of Const(CCCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVCCF.html">CCVCCF</a>: <code class="type">module type of Const(CVCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVVCF.html">CCVVCF</a>: <code class="type">module type of Const(CVVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVVVF.html">CCVVVF</a>: <code class="type">module type of Const(CVVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CCVCVF.html">CCVCVF</a>: <code class="type">module type of Const(CVCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCCCF.html">CVCCCF</a>: <code class="type">module type of Const(VCCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCVCF.html">CVCVCF</a>: <code class="type">module type of Const(VCVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCVVF.html">CVCVVF</a>: <code class="type">module type of Const(VCVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVCCVF.html">CVCCVF</a>: <code class="type">module type of Const(VCCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVCCF.html">CVVCCF</a>: <code class="type">module type of Const(VVCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVVCF.html">CVVVCF</a>: <code class="type">module type of Const(VVVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVVVF.html">CVVVVF</a>: <code class="type">module type of Const(VVVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.CVVCVF.html">CVVCVF</a>: <code class="type">module type of Const(VVCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCCCF.html">VCCCCF</a>: <code class="type">module type of Var(CCCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCVCF.html">VCCVCF</a>: <code class="type">module type of Var(CCVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCVVF.html">VCCVVF</a>: <code class="type">module type of Var(CCVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCCCVF.html">VCCCVF</a>: <code class="type">module type of Var(CCCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVCCF.html">VCVCCF</a>: <code class="type">module type of Var(CVCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVVCF.html">VCVVCF</a>: <code class="type">module type of Var(CVVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVVVF.html">VCVVVF</a>: <code class="type">module type of Var(CVVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VCVCVF.html">VCVCVF</a>: <code class="type">module type of Var(CVCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCCCF.html">VVCCCF</a>: <code class="type">module type of Var(VCCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCVCF.html">VVCVCF</a>: <code class="type">module type of Var(VCVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCVVF.html">VVCVVF</a>: <code class="type">module type of Var(VCVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVCCVF.html">VVCCVF</a>: <code class="type">module type of Var(VCCVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVCCF.html">VVVCCF</a>: <code class="type">module type of Var(VVCCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVVCF.html">VVVVCF</a>: <code class="type">module type of Var(VVVCF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVVVF.html">VVVVVF</a>: <code class="type">module type of Var(VVVVF)</code></pre>
<pre><span class="keyword">module</span> <a href="Sharp_router.VVVCVF.html">VVVCVF</a>: <code class="type">module type of Var(VVCVF)</code></pre></body></html>