ruff 1.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/Gemfile +2 -1
  4. data/Gemfile.lock +16 -12
  5. data/README.md +35 -58
  6. data/Rakefile +2 -1
  7. data/docs/Ruff.html +7 -7
  8. data/docs/Ruff/Effect.html +165 -23
  9. data/docs/Ruff/Handler.html +45 -50
  10. data/docs/Ruff/Standard.html +6 -6
  11. data/docs/Ruff/Standard/Async.html +26 -26
  12. data/docs/Ruff/Standard/Async/Instance.html +8 -8
  13. data/docs/Ruff/Standard/Call1cc.html +6 -6
  14. data/docs/Ruff/Standard/CurrentTime.html +6 -6
  15. data/docs/Ruff/Standard/CurrentTime/Instance.html +7 -7
  16. data/docs/Ruff/Standard/Defer.html +6 -6
  17. data/docs/Ruff/Standard/Defer/Instance.html +6 -6
  18. data/docs/Ruff/Standard/MeasureTime.html +6 -6
  19. data/docs/Ruff/Standard/MeasureTime/Instance.html +8 -8
  20. data/docs/Ruff/Standard/State.html +6 -6
  21. data/docs/Ruff/Standard/State/Instance.html +6 -6
  22. data/docs/Ruff/Throws.html +6 -11
  23. data/docs/Ruff/Throws/Eff.html +6 -6
  24. data/docs/Ruff/Throws/Resend.html +6 -6
  25. data/docs/_index.html +7 -7
  26. data/docs/class_list.html +2 -2
  27. data/docs/css/style.css +2 -2
  28. data/docs/file.README.html +39 -56
  29. data/docs/file_list.html +2 -2
  30. data/docs/frames.html +2 -2
  31. data/docs/index.html +39 -56
  32. data/docs/js/app.js +14 -3
  33. data/docs/method_list.html +71 -63
  34. data/docs/top-level-namespace.html +6 -6
  35. data/lib/ruff/effect.rb +32 -3
  36. data/lib/ruff/handler.rb +43 -18
  37. data/lib/ruff/standard/async.rb +10 -7
  38. data/lib/ruff/standard/current_time.rb +1 -1
  39. data/lib/ruff/standard/measure_time.rb +2 -2
  40. data/lib/ruff/version.rb +1 -1
  41. data/version +1 -1
  42. metadata +3 -3
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Handler
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Handler";
19
19
  relpath = '../';
20
20
  </script>
@@ -87,11 +87,6 @@
87
87
 
88
88
 
89
89
 
90
- <dl>
91
- <dt>Includes:</dt>
92
- <dd><span class='object_link'><a href="Throws.html" title="Ruff::Throws (module)">Throws</a></span></dd>
93
- </dl>
94
-
95
90
 
96
91
 
97
92
 
@@ -148,7 +143,7 @@
148
143
 
149
144
 
150
145
 
151
- <span class="summary_desc"><div class='inline'><p>makes a new handler, internally having fresh empty hash.</p>
146
+ <span class="summary_desc"><div class='inline'><p>A new instance of Handler.</p>
152
147
  </div></span>
153
148
 
154
149
  </li>
@@ -171,7 +166,7 @@
171
166
 
172
167
 
173
168
 
174
- <span class="summary_desc"><div class='inline'><p>sets effec handler <code>&amp;fun</code> for <code>eff</code>.</p>
169
+ <span class="summary_desc"><div class='inline'><p>sets or updates effec handler <code>&amp;fun</code> for <code>eff</code>.</p>
175
170
  </div></span>
176
171
 
177
172
  </li>
@@ -226,13 +221,7 @@
226
221
  </ul>
227
222
 
228
223
 
229
-
230
-
231
-
232
-
233
-
234
-
235
- <div id="constructor_details" class="method_details_list">
224
+ <div id="constructor_details" class="method_details_list">
236
225
  <h2>Constructor Details</h2>
237
226
 
238
227
  <div class="method_details first">
@@ -246,10 +235,7 @@
246
235
 
247
236
  </h3><div class="docstring">
248
237
  <div class="discussion">
249
- <p>makes a new handler, internally having fresh empty hash.</p>
250
-
251
- <p>This is a effect-handler store and when handliong it is looked up.
252
- Value handler is set <code>id</code> function to by default.</p>
238
+ <p>Returns a new instance of Handler.</p>
253
239
 
254
240
 
255
241
  </div>
@@ -271,16 +257,16 @@ Value handler is set <code>id</code> function to by default.</p>
271
257
  <pre class="lines">
272
258
 
273
259
 
274
- 14
275
- 15
276
- 16
277
- 17</pre>
260
+ 38
261
+ 39
262
+ 40
263
+ 41</pre>
278
264
  </td>
279
265
  <td>
280
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 14</span>
266
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 38</span>
281
267
 
282
268
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
283
- <span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
269
+ <span class='ivar'>@handlers</span> <span class='op'>=</span> <span class='const'>Store</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
284
270
  <span class='ivar'>@valh</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_x'>x</span> <span class='rbrace'>}</span>
285
271
  <span class='kw'>end</span></pre>
286
272
  </td>
@@ -306,7 +292,9 @@ Value handler is set <code>id</code> function to by default.</p>
306
292
 
307
293
  </h3><div class="docstring">
308
294
  <div class="discussion">
309
- <p>sets effec handler <code>&amp;fun</code> for <code>eff</code></p>
295
+ <p>sets or updates effec handler <code>&amp;fun</code> for <code>eff</code></p>
296
+
297
+ <p>Note that <code>eff</code> can be a supertype of an effect to be caught.</p>
310
298
 
311
299
 
312
300
  </div>
@@ -378,23 +366,30 @@ to go back to the handled computation.</p>
378
366
 
379
367
  </ul>
380
368
 
369
+ <p class="tag_title">See Also:</p>
370
+ <ul class="see">
371
+
372
+ <li><span class='object_link'><a href="Effect.html#<<-class_method" title="Ruff::Effect.&lt;&lt; (method)">Effect.&lt;&lt;</a></span></li>
373
+
374
+ </ul>
375
+
381
376
  </div><table class="source_code">
382
377
  <tr>
383
378
  <td>
384
379
  <pre class="lines">
385
380
 
386
381
 
387
- 75
388
- 76
389
- 77
390
- 78
391
- 79</pre>
382
+ 102
383
+ 103
384
+ 104
385
+ 105
386
+ 106</pre>
392
387
  </td>
393
388
  <td>
394
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 75</span>
389
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 102</span>
395
390
 
396
391
  <span class='kw'>def</span> <span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_eff'>eff</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_fun'>fun</span><span class='rparen'>)</span>
397
- <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
392
+ <span class='ivar'>@handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_eff'>eff</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
398
393
 
399
394
  <span class='kw'>self</span>
400
395
  <span class='kw'>end</span></pre>
@@ -489,14 +484,14 @@ or returned from the effect handler throwing continuation away</p>
489
484
  <pre class="lines">
490
485
 
491
486
 
492
- 104
493
- 105
494
- 106
495
- 107
496
- 108</pre>
487
+ 131
488
+ 132
489
+ 133
490
+ 134
491
+ 135</pre>
497
492
  </td>
498
493
  <td>
499
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 104</span>
494
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 131</span>
500
495
 
501
496
  <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
502
497
  <span class='id identifier rubyid_co'>co</span> <span class='op'>=</span> <span class='const'>Fiber</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_prc'>prc</span><span class='rparen'>)</span>
@@ -599,14 +594,14 @@ in effect handlers of the handler.</p>
599
594
  <pre class="lines">
600
595
 
601
596
 
602
- 53
603
- 54
604
- 55
605
- 56
606
- 57</pre>
597
+ 77
598
+ 78
599
+ 79
600
+ 80
601
+ 81</pre>
607
602
  </td>
608
603
  <td>
609
- <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 53</span>
604
+ <pre class="code"><span class="info file"># File 'lib/ruff/handler.rb', line 77</span>
610
605
 
611
606
  <span class='kw'>def</span> <span class='id identifier rubyid_to'>to</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_fun'>fun</span><span class='rparen'>)</span>
612
607
  <span class='ivar'>@valh</span> <span class='op'>=</span> <span class='id identifier rubyid_fun'>fun</span>
@@ -623,9 +618,9 @@ in effect handlers of the handler.</p>
623
618
  </div>
624
619
 
625
620
  <div id="footer">
626
- Generated on Wed Oct 30 01:51:52 2019 by
621
+ Generated on Thu Jan 2 19:46:23 2020 by
627
622
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
628
- 0.9.20 (ruby-2.6.5).
623
+ 0.9.22 (ruby-2.6.5).
629
624
  </div>
630
625
 
631
626
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard";
19
19
  relpath = '../';
20
20
  </script>
@@ -135,9 +135,9 @@ Each module provides <code>Instance</code> class to instantiate and handle the i
135
135
  </div>
136
136
 
137
137
  <div id="footer">
138
- Generated on Wed Oct 30 01:51:52 2019 by
138
+ Generated on Thu Jan 2 19:46:22 2020 by
139
139
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
- 0.9.20 (ruby-2.6.5).
140
+ 0.9.22 (ruby-2.6.5).
141
141
  </div>
142
142
 
143
143
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::Async
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::Async";
19
19
  relpath = '../../';
20
20
  </script>
@@ -326,12 +326,12 @@ The module has an instance of <code>Instance</code> and provides its methods as
326
326
  <pre class="lines">
327
327
 
328
328
 
329
- 178
330
- 179
331
- 180</pre>
329
+ 181
330
+ 182
331
+ 183</pre>
332
332
  </td>
333
333
  <td>
334
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 178</span>
334
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 181</span>
335
335
 
336
336
  <span class='kw'>def</span> <span class='id identifier rubyid_eff'>eff</span>
337
337
  <span class='ivar'>@eff</span>
@@ -379,12 +379,12 @@ The module has an instance of <code>Instance</code> and provides its methods as
379
379
  <pre class="lines">
380
380
 
381
381
 
382
- 156
383
- 157
384
- 158</pre>
382
+ 159
383
+ 160
384
+ 161</pre>
385
385
  </td>
386
386
  <td>
387
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 156</span>
387
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 159</span>
388
388
 
389
389
  <span class='kw'>def</span> <span class='id identifier rubyid_async'>async</span><span class='lparen'>(</span><span class='id identifier rubyid_asynth'>asynth</span><span class='rparen'>)</span>
390
390
  <span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span> <span class='id identifier rubyid_asynth'>asynth</span>
@@ -425,12 +425,12 @@ The module has an instance of <code>Instance</code> and provides its methods as
425
425
  <pre class="lines">
426
426
 
427
427
 
428
- 161
429
- 162
430
- 163</pre>
428
+ 164
429
+ 165
430
+ 166</pre>
431
431
  </td>
432
432
  <td>
433
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 161</span>
433
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 164</span>
434
434
 
435
435
  <span class='kw'>def</span> <span class='id identifier rubyid_await'>await</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span>
436
436
  <span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_await'>await</span> <span class='id identifier rubyid_p'>p</span>
@@ -471,12 +471,12 @@ The module has an instance of <code>Instance</code> and provides its methods as
471
471
  <pre class="lines">
472
472
 
473
473
 
474
- 171
475
- 172
476
- 173</pre>
474
+ 174
475
+ 175
476
+ 176</pre>
477
477
  </td>
478
478
  <td>
479
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 171</span>
479
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 174</span>
480
480
 
481
481
  <span class='kw'>def</span> <span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
482
482
  <span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_th'>th</span><span class='rparen'>)</span>
@@ -517,12 +517,12 @@ The module has an instance of <code>Instance</code> and provides its methods as
517
517
  <pre class="lines">
518
518
 
519
519
 
520
- 166
521
- 167
522
- 168</pre>
520
+ 169
521
+ 170
522
+ 171</pre>
523
523
  </td>
524
524
  <td>
525
- <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 166</span>
525
+ <pre class="code"><span class="info file"># File 'lib/ruff/standard/async.rb', line 169</span>
526
526
 
527
527
  <span class='kw'>def</span> <span class='kw'>yield</span>
528
528
  <span class='ivar'>@inst</span><span class='period'>.</span><span class='id identifier rubyid_yield'>yield</span>
@@ -537,9 +537,9 @@ The module has an instance of <code>Instance</code> and provides its methods as
537
537
  </div>
538
538
 
539
539
  <div id="footer">
540
- Generated on Wed Oct 30 01:51:52 2019 by
540
+ Generated on Thu Jan 2 19:46:22 2020 by
541
541
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
542
- 0.9.20 (ruby-2.6.5).
542
+ 0.9.22 (ruby-2.6.5).
543
543
  </div>
544
544
 
545
545
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: Ruff::Standard::Async::Instance
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::Async::Instance";
19
19
  relpath = '../../../';
20
20
  </script>
@@ -257,7 +257,7 @@ These are used internally.</p>
257
257
  <li class="public ">
258
258
  <span class="summary_signature">
259
259
 
260
- <a href="#with-instance_method" title="#with (instance method)">#<strong>with</strong> &#x21d2; ()!{e} </a>
260
+ <a href="#with-instance_method" title="#with (instance method)">#<strong>with</strong>(&amp;th) &#x21d2; ()!{e} </a>
261
261
 
262
262
 
263
263
 
@@ -572,7 +572,7 @@ with accessing <code>Async.async</code> , <code>Async.yield</code> , and <code>A
572
572
  <div class="method_details ">
573
573
  <h3 class="signature " id="with-instance_method">
574
574
 
575
- #<strong>with</strong> &#x21d2; <tt>()!{e}</tt>
575
+ #<strong>with</strong>(&amp;th) &#x21d2; <tt>()!{e}</tt>
576
576
 
577
577
 
578
578
 
@@ -708,9 +708,9 @@ including <code>Async.async</code> , <code>Async.yield</code> and <code>Async.aw
708
708
  </div>
709
709
 
710
710
  <div id="footer">
711
- Generated on Wed Oct 30 01:51:52 2019 by
711
+ Generated on Thu Jan 2 19:46:23 2020 by
712
712
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
713
- 0.9.20 (ruby-2.6.5).
713
+ 0.9.22 (ruby-2.6.5).
714
714
  </div>
715
715
 
716
716
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::Call1cc
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::Call1cc";
19
19
  relpath = '../../';
20
20
  </script>
@@ -287,9 +287,9 @@ The continuation can be run in the <code>context</code>.</p>
287
287
  </div>
288
288
 
289
289
  <div id="footer">
290
- Generated on Wed Oct 30 01:51:52 2019 by
290
+ Generated on Thu Jan 2 19:46:22 2020 by
291
291
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
292
- 0.9.20 (ruby-2.6.5).
292
+ 0.9.22 (ruby-2.6.5).
293
293
  </div>
294
294
 
295
295
  </div>
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Module: Ruff::Standard::CurrentTime
8
8
 
9
- &mdash; Ruff 1.3.1 Documentation
9
+ &mdash; Ruff 1.4.0 Documentation
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "Ruff::Standard::CurrentTime";
19
19
  relpath = '../../';
20
20
  </script>
@@ -362,9 +362,9 @@
362
362
  </div>
363
363
 
364
364
  <div id="footer">
365
- Generated on Wed Oct 30 01:51:52 2019 by
365
+ Generated on Thu Jan 2 19:46:23 2020 by
366
366
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
367
- 0.9.20 (ruby-2.6.5).
367
+ 0.9.22 (ruby-2.6.5).
368
368
  </div>
369
369
 
370
370
  </div>