forked from athanclark/purescript-web-urlsearchparams
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.browser.js
3607 lines (3534 loc) · 127 KB
/
test.browser.js
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generated by purs bundle 0.12.0
var PS = {};
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Semigroupoid = function (compose) {
this.compose = compose;
};
var semigroupoidFn = new Semigroupoid(function (f) {
return function (g) {
return function (x) {
return f(g(x));
};
};
});
var compose = function (dict) {
return dict.compose;
};
exports["compose"] = compose;
exports["Semigroupoid"] = Semigroupoid;
exports["semigroupoidFn"] = semigroupoidFn;
})(PS["Control.Semigroupoid"] = PS["Control.Semigroupoid"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Semigroupoid = PS["Control.Semigroupoid"];
var Category = function (Semigroupoid0, identity) {
this.Semigroupoid0 = Semigroupoid0;
this.identity = identity;
};
var identity = function (dict) {
return dict.identity;
};
var categoryFn = new Category(function () {
return Control_Semigroupoid.semigroupoidFn;
}, function (x) {
return x;
});
exports["Category"] = Category;
exports["identity"] = identity;
exports["categoryFn"] = categoryFn;
})(PS["Control.Category"] = PS["Control.Category"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var otherwise = true;
exports["otherwise"] = otherwise;
})(PS["Data.Boolean"] = PS["Data.Boolean"] || {});
(function(exports) {
"use strict";
exports.refEq = function (r1) {
return function (r2) {
return r1 === r2;
};
};
})(PS["Data.Eq"] = PS["Data.Eq"] || {});
(function(exports) {
"use strict";
exports.unit = {};
})(PS["Data.Unit"] = PS["Data.Unit"] || {});
(function(exports) {
"use strict";
exports.showIntImpl = function (n) {
return n.toString();
};
exports.showStringImpl = function (s) {
var l = s.length;
return "\"" + s.replace(
/[\0-\x1F\x7F"\\]/g, // eslint-disable-line no-control-regex
function (c, i) {
switch (c) {
case "\"":
case "\\":
return "\\" + c;
case "\x07": return "\\a";
case "\b": return "\\b";
case "\f": return "\\f";
case "\n": return "\\n";
case "\r": return "\\r";
case "\t": return "\\t";
case "\v": return "\\v";
}
var k = i + 1;
var empty = k < l && s[k] >= "0" && s[k] <= "9" ? "\\&" : "";
return "\\" + c.charCodeAt(0).toString(10) + empty;
}
) + "\"";
};
exports.showArrayImpl = function (f) {
return function (xs) {
var ss = [];
for (var i = 0, l = xs.length; i < l; i++) {
ss[i] = f(xs[i]);
}
return "[" + ss.join(",") + "]";
};
};
exports.join = function (separator) {
return function (xs) {
return xs.join(separator);
};
};
})(PS["Data.Show"] = PS["Data.Show"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Show"];
var Data_Symbol = PS["Data.Symbol"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Show = function (show) {
this.show = show;
};
var showString = new Show($foreign.showStringImpl);
var showInt = new Show($foreign.showIntImpl);
var show = function (dict) {
return dict.show;
};
var showArray = function (dictShow) {
return new Show($foreign.showArrayImpl(show(dictShow)));
};
exports["Show"] = Show;
exports["show"] = show;
exports["showInt"] = showInt;
exports["showString"] = showString;
exports["showArray"] = showArray;
})(PS["Data.Show"] = PS["Data.Show"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Unit"];
var Data_Show = PS["Data.Show"];
exports["unit"] = $foreign.unit;
})(PS["Data.Unit"] = PS["Data.Unit"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Eq"];
var Data_HeytingAlgebra = PS["Data.HeytingAlgebra"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var Data_Void = PS["Data.Void"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Eq = function (eq) {
this.eq = eq;
};
var eqString = new Eq($foreign.refEq);
var eqNumber = new Eq($foreign.refEq);
var eqInt = new Eq($foreign.refEq);
var eqChar = new Eq($foreign.refEq);
var eq = function (dict) {
return dict.eq;
};
exports["Eq"] = Eq;
exports["eq"] = eq;
exports["eqInt"] = eqInt;
exports["eqNumber"] = eqNumber;
exports["eqChar"] = eqChar;
exports["eqString"] = eqString;
})(PS["Data.Eq"] = PS["Data.Eq"] || {});
(function(exports) {
"use strict";
exports.unsafeCompareImpl = function (lt) {
return function (eq) {
return function (gt) {
return function (x) {
return function (y) {
return x < y ? lt : x === y ? eq : gt;
};
};
};
};
};
})(PS["Data.Ord.Unsafe"] = PS["Data.Ord.Unsafe"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Semigroup"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var Data_Void = PS["Data.Void"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Semigroup = function (append) {
this.append = append;
};
var append = function (dict) {
return dict.append;
};
exports["Semigroup"] = Semigroup;
exports["append"] = append;
})(PS["Data.Semigroup"] = PS["Data.Semigroup"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Data_Eq = PS["Data.Eq"];
var Data_Semigroup = PS["Data.Semigroup"];
var Data_Show = PS["Data.Show"];
var LT = (function () {
function LT() {
};
LT.value = new LT();
return LT;
})();
var GT = (function () {
function GT() {
};
GT.value = new GT();
return GT;
})();
var EQ = (function () {
function EQ() {
};
EQ.value = new EQ();
return EQ;
})();
exports["LT"] = LT;
exports["GT"] = GT;
exports["EQ"] = EQ;
})(PS["Data.Ordering"] = PS["Data.Ordering"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Ord.Unsafe"];
var Data_Ordering = PS["Data.Ordering"];
var unsafeCompare = $foreign.unsafeCompareImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value);
exports["unsafeCompare"] = unsafeCompare;
})(PS["Data.Ord.Unsafe"] = PS["Data.Ord.Unsafe"] || {});
(function(exports) {
"use strict";
exports.intSub = function (x) {
return function (y) {
/* jshint bitwise: false */
return x - y | 0;
};
};
})(PS["Data.Ring"] = PS["Data.Ring"] || {});
(function(exports) {
"use strict";
exports.intAdd = function (x) {
return function (y) {
/* jshint bitwise: false */
return x + y | 0;
};
};
exports.intMul = function (x) {
return function (y) {
/* jshint bitwise: false */
return x * y | 0;
};
};
exports.numAdd = function (n1) {
return function (n2) {
return n1 + n2;
};
};
exports.numMul = function (n1) {
return function (n2) {
return n1 * n2;
};
};
})(PS["Data.Semiring"] = PS["Data.Semiring"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Semiring"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_Row = PS["Type.Data.Row"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Semiring = function (add, mul, one, zero) {
this.add = add;
this.mul = mul;
this.one = one;
this.zero = zero;
};
var zero = function (dict) {
return dict.zero;
};
var semiringNumber = new Semiring($foreign.numAdd, $foreign.numMul, 1.0, 0.0);
var semiringInt = new Semiring($foreign.intAdd, $foreign.intMul, 1, 0);
var one = function (dict) {
return dict.one;
};
var mul = function (dict) {
return dict.mul;
};
var add = function (dict) {
return dict.add;
};
exports["Semiring"] = Semiring;
exports["add"] = add;
exports["zero"] = zero;
exports["mul"] = mul;
exports["one"] = one;
exports["semiringInt"] = semiringInt;
exports["semiringNumber"] = semiringNumber;
})(PS["Data.Semiring"] = PS["Data.Semiring"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Ring"];
var Data_Semiring = PS["Data.Semiring"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Ring = function (Semiring0, sub) {
this.Semiring0 = Semiring0;
this.sub = sub;
};
var sub = function (dict) {
return dict.sub;
};
var ringInt = new Ring(function () {
return Data_Semiring.semiringInt;
}, $foreign.intSub);
exports["Ring"] = Ring;
exports["sub"] = sub;
exports["ringInt"] = ringInt;
})(PS["Data.Ring"] = PS["Data.Ring"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Ord"];
var Data_Eq = PS["Data.Eq"];
var Data_Ord_Unsafe = PS["Data.Ord.Unsafe"];
var Data_Ordering = PS["Data.Ordering"];
var Data_Ring = PS["Data.Ring"];
var Data_Semiring = PS["Data.Semiring"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var Data_Void = PS["Data.Void"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Ord = function (Eq0, compare) {
this.Eq0 = Eq0;
this.compare = compare;
};
var ordNumber = new Ord(function () {
return Data_Eq.eqNumber;
}, Data_Ord_Unsafe.unsafeCompare);
var ordInt = new Ord(function () {
return Data_Eq.eqInt;
}, Data_Ord_Unsafe.unsafeCompare);
var ordChar = new Ord(function () {
return Data_Eq.eqChar;
}, Data_Ord_Unsafe.unsafeCompare);
var compare = function (dict) {
return dict.compare;
};
var max = function (dictOrd) {
return function (x) {
return function (y) {
var v = compare(dictOrd)(x)(y);
if (v instanceof Data_Ordering.LT) {
return y;
};
if (v instanceof Data_Ordering.EQ) {
return x;
};
if (v instanceof Data_Ordering.GT) {
return x;
};
throw new Error("Failed pattern match at Data.Ord line 128, column 3 - line 131, column 12: " + [ v.constructor.name ]);
};
};
};
var min = function (dictOrd) {
return function (x) {
return function (y) {
var v = compare(dictOrd)(x)(y);
if (v instanceof Data_Ordering.LT) {
return x;
};
if (v instanceof Data_Ordering.EQ) {
return x;
};
if (v instanceof Data_Ordering.GT) {
return y;
};
throw new Error("Failed pattern match at Data.Ord line 119, column 3 - line 122, column 12: " + [ v.constructor.name ]);
};
};
};
exports["Ord"] = Ord;
exports["compare"] = compare;
exports["min"] = min;
exports["max"] = max;
exports["ordInt"] = ordInt;
exports["ordNumber"] = ordNumber;
exports["ordChar"] = ordChar;
})(PS["Data.Ord"] = PS["Data.Ord"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Category = PS["Control.Category"];
var Data_Boolean = PS["Data.Boolean"];
var Data_Ord = PS["Data.Ord"];
var Data_Ring = PS["Data.Ring"];
var flip = function (f) {
return function (b) {
return function (a) {
return f(a)(b);
};
};
};
var $$const = function (a) {
return function (v) {
return a;
};
};
exports["flip"] = flip;
exports["const"] = $$const;
})(PS["Data.Function"] = PS["Data.Function"] || {});
(function(exports) {
"use strict";
exports.arrayMap = function (f) {
return function (arr) {
var l = arr.length;
var result = new Array(l);
for (var i = 0; i < l; i++) {
result[i] = f(arr[i]);
}
return result;
};
};
})(PS["Data.Functor"] = PS["Data.Functor"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Functor"];
var Control_Semigroupoid = PS["Control.Semigroupoid"];
var Data_Function = PS["Data.Function"];
var Data_Unit = PS["Data.Unit"];
var Functor = function (map) {
this.map = map;
};
var map = function (dict) {
return dict.map;
};
var mapFlipped = function (dictFunctor) {
return function (fa) {
return function (f) {
return map(dictFunctor)(f)(fa);
};
};
};
var $$void = function (dictFunctor) {
return map(dictFunctor)(Data_Function["const"](Data_Unit.unit));
};
var voidRight = function (dictFunctor) {
return function (x) {
return map(dictFunctor)(Data_Function["const"](x));
};
};
var functorArray = new Functor($foreign.arrayMap);
exports["Functor"] = Functor;
exports["map"] = map;
exports["mapFlipped"] = mapFlipped;
exports["void"] = $$void;
exports["voidRight"] = voidRight;
exports["functorArray"] = functorArray;
})(PS["Data.Functor"] = PS["Data.Functor"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Control.Apply"];
var Control_Category = PS["Control.Category"];
var Data_Function = PS["Data.Function"];
var Data_Functor = PS["Data.Functor"];
var Apply = function (Functor0, apply) {
this.Functor0 = Functor0;
this.apply = apply;
};
var apply = function (dict) {
return dict.apply;
};
var applySecond = function (dictApply) {
return function (a) {
return function (b) {
return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(a))(b);
};
};
};
exports["Apply"] = Apply;
exports["apply"] = apply;
exports["applySecond"] = applySecond;
})(PS["Control.Apply"] = PS["Control.Apply"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Apply = PS["Control.Apply"];
var Data_Functor = PS["Data.Functor"];
var Data_Unit = PS["Data.Unit"];
var Applicative = function (Apply0, pure) {
this.Apply0 = Apply0;
this.pure = pure;
};
var pure = function (dict) {
return dict.pure;
};
var liftA1 = function (dictApplicative) {
return function (f) {
return function (a) {
return Control_Apply.apply(dictApplicative.Apply0())(pure(dictApplicative)(f))(a);
};
};
};
exports["Applicative"] = Applicative;
exports["pure"] = pure;
exports["liftA1"] = liftA1;
})(PS["Control.Applicative"] = PS["Control.Applicative"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Control.Bind"];
var Control_Applicative = PS["Control.Applicative"];
var Control_Apply = PS["Control.Apply"];
var Control_Category = PS["Control.Category"];
var Data_Function = PS["Data.Function"];
var Data_Functor = PS["Data.Functor"];
var Data_Unit = PS["Data.Unit"];
var Bind = function (Apply0, bind) {
this.Apply0 = Apply0;
this.bind = bind;
};
var Discard = function (discard) {
this.discard = discard;
};
var discard = function (dict) {
return dict.discard;
};
var bind = function (dict) {
return dict.bind;
};
var bindFlipped = function (dictBind) {
return Data_Function.flip(bind(dictBind));
};
var discardUnit = new Discard(function (dictBind) {
return bind(dictBind);
});
exports["Bind"] = Bind;
exports["bind"] = bind;
exports["bindFlipped"] = bindFlipped;
exports["Discard"] = Discard;
exports["discard"] = discard;
exports["discardUnit"] = discardUnit;
})(PS["Control.Bind"] = PS["Control.Bind"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Applicative = PS["Control.Applicative"];
var Control_Apply = PS["Control.Apply"];
var Control_Bind = PS["Control.Bind"];
var Data_Functor = PS["Data.Functor"];
var Data_Unit = PS["Data.Unit"];
var Monad = function (Applicative0, Bind1) {
this.Applicative0 = Applicative0;
this.Bind1 = Bind1;
};
var ap = function (dictMonad) {
return function (f) {
return function (a) {
return Control_Bind.bind(dictMonad.Bind1())(f)(function (v) {
return Control_Bind.bind(dictMonad.Bind1())(a)(function (v1) {
return Control_Applicative.pure(dictMonad.Applicative0())(v(v1));
});
});
};
};
};
exports["Monad"] = Monad;
exports["ap"] = ap;
})(PS["Control.Monad"] = PS["Control.Monad"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Prelude = PS["Prelude"];
var MonadGen = function (Monad0, chooseBool, chooseFloat, chooseInt, resize, sized) {
this.Monad0 = Monad0;
this.chooseBool = chooseBool;
this.chooseFloat = chooseFloat;
this.chooseInt = chooseInt;
this.resize = resize;
this.sized = sized;
};
var sized = function (dict) {
return dict.sized;
};
var resize = function (dict) {
return dict.resize;
};
var chooseInt = function (dict) {
return dict.chooseInt;
};
var chooseFloat = function (dict) {
return dict.chooseFloat;
};
var chooseBool = function (dict) {
return dict.chooseBool;
};
exports["chooseBool"] = chooseBool;
exports["chooseFloat"] = chooseFloat;
exports["chooseInt"] = chooseInt;
exports["resize"] = resize;
exports["sized"] = sized;
exports["MonadGen"] = MonadGen;
})(PS["Control.Monad.Gen.Class"] = PS["Control.Monad.Gen.Class"] || {});
(function(exports) {
"use strict";
exports.topInt = 2147483647;
exports.bottomInt = -2147483648;
exports.topChar = String.fromCharCode(65535);
exports.bottomChar = String.fromCharCode(0);
})(PS["Data.Bounded"] = PS["Data.Bounded"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Bounded"];
var Data_Ord = PS["Data.Ord"];
var Data_Ordering = PS["Data.Ordering"];
var Data_Unit = PS["Data.Unit"];
var Bounded = function (Ord0, bottom, top) {
this.Ord0 = Ord0;
this.bottom = bottom;
this.top = top;
};
var top = function (dict) {
return dict.top;
};
var boundedInt = new Bounded(function () {
return Data_Ord.ordInt;
}, $foreign.bottomInt, $foreign.topInt);
var boundedChar = new Bounded(function () {
return Data_Ord.ordChar;
}, $foreign.bottomChar, $foreign.topChar);
var bottom = function (dict) {
return dict.bottom;
};
exports["Bounded"] = Bounded;
exports["bottom"] = bottom;
exports["top"] = top;
exports["boundedInt"] = boundedInt;
exports["boundedChar"] = boundedChar;
})(PS["Data.Bounded"] = PS["Data.Bounded"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Data_Ring = PS["Data.Ring"];
var Data_Semiring = PS["Data.Semiring"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var CommutativeRing = function (Ring0) {
this.Ring0 = Ring0;
};
var commutativeRingInt = new CommutativeRing(function () {
return Data_Ring.ringInt;
});
exports["CommutativeRing"] = CommutativeRing;
exports["commutativeRingInt"] = commutativeRingInt;
})(PS["Data.CommutativeRing"] = PS["Data.CommutativeRing"] || {});
(function(exports) {
"use strict";
exports.intDegree = function (x) {
return Math.min(Math.abs(x), 2147483647);
};
// See the Euclidean definition in
// https://en.m.wikipedia.org/wiki/Modulo_operation.
exports.intDiv = function (x) {
return function (y) {
if (y === 0) return 0;
return y > 0 ? Math.floor(x / y) : -Math.floor(x / -y);
};
};
exports.intMod = function (x) {
return function (y) {
if (y === 0) return 0;
var yy = Math.abs(y);
return ((x % yy) + yy) % yy;
};
};
})(PS["Data.EuclideanRing"] = PS["Data.EuclideanRing"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.EuclideanRing"];
var Data_BooleanAlgebra = PS["Data.BooleanAlgebra"];
var Data_CommutativeRing = PS["Data.CommutativeRing"];
var Data_Eq = PS["Data.Eq"];
var Data_HeytingAlgebra = PS["Data.HeytingAlgebra"];
var Data_Ring = PS["Data.Ring"];
var Data_Semiring = PS["Data.Semiring"];
var EuclideanRing = function (CommutativeRing0, degree, div, mod) {
this.CommutativeRing0 = CommutativeRing0;
this.degree = degree;
this.div = div;
this.mod = mod;
};
var mod = function (dict) {
return dict.mod;
};
var euclideanRingInt = new EuclideanRing(function () {
return Data_CommutativeRing.commutativeRingInt;
}, $foreign.intDegree, $foreign.intDiv, $foreign.intMod);
var div = function (dict) {
return dict.div;
};
var degree = function (dict) {
return dict.degree;
};
exports["EuclideanRing"] = EuclideanRing;
exports["degree"] = degree;
exports["div"] = div;
exports["mod"] = mod;
exports["euclideanRingInt"] = euclideanRingInt;
})(PS["Data.EuclideanRing"] = PS["Data.EuclideanRing"] || {});
(function(exports) {
"use strict";
exports.foldrArray = function (f) {
return function (init) {
return function (xs) {
var acc = init;
var len = xs.length;
for (var i = len - 1; i >= 0; i--) {
acc = f(xs[i])(acc);
}
return acc;
};
};
};
exports.foldlArray = function (f) {
return function (init) {
return function (xs) {
var acc = init;
var len = xs.length;
for (var i = 0; i < len; i++) {
acc = f(acc)(xs[i]);
}
return acc;
};
};
};
})(PS["Data.Foldable"] = PS["Data.Foldable"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Data_Boolean = PS["Data.Boolean"];
var Data_Eq = PS["Data.Eq"];
var Data_EuclideanRing = PS["Data.EuclideanRing"];
var Data_Ord = PS["Data.Ord"];
var Data_Ordering = PS["Data.Ordering"];
var Data_Semigroup = PS["Data.Semigroup"];
var Data_Symbol = PS["Data.Symbol"];
var Data_Unit = PS["Data.Unit"];
var Record_Unsafe = PS["Record.Unsafe"];
var Type_Data_RowList = PS["Type.Data.RowList"];
var Monoid = function (Semigroup0, mempty) {
this.Semigroup0 = Semigroup0;
this.mempty = mempty;
};
var mempty = function (dict) {
return dict.mempty;
};
exports["Monoid"] = Monoid;
exports["mempty"] = mempty;
})(PS["Data.Monoid"] = PS["Data.Monoid"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Alt = PS["Control.Alt"];
var Control_Alternative = PS["Control.Alternative"];
var Control_Applicative = PS["Control.Applicative"];
var Control_Apply = PS["Control.Apply"];
var Control_Bind = PS["Control.Bind"];
var Control_Category = PS["Control.Category"];
var Control_Extend = PS["Control.Extend"];
var Control_Monad = PS["Control.Monad"];
var Control_MonadZero = PS["Control.MonadZero"];
var Control_Plus = PS["Control.Plus"];
var Data_Bounded = PS["Data.Bounded"];
var Data_Eq = PS["Data.Eq"];
var Data_Function = PS["Data.Function"];
var Data_Functor = PS["Data.Functor"];
var Data_Functor_Invariant = PS["Data.Functor.Invariant"];
var Data_Monoid = PS["Data.Monoid"];
var Data_Ord = PS["Data.Ord"];
var Data_Ordering = PS["Data.Ordering"];
var Data_Semigroup = PS["Data.Semigroup"];
var Data_Show = PS["Data.Show"];
var Data_Unit = PS["Data.Unit"];
var Prelude = PS["Prelude"];
var Nothing = (function () {
function Nothing() {
};
Nothing.value = new Nothing();
return Nothing;
})();
var Just = (function () {
function Just(value0) {
this.value0 = value0;
};
Just.create = function (value0) {
return new Just(value0);
};
return Just;
})();
var maybe = function (v) {
return function (v1) {
return function (v2) {
if (v2 instanceof Nothing) {
return v;
};
if (v2 instanceof Just) {
return v1(v2.value0);
};
throw new Error("Failed pattern match at Data.Maybe line 217, column 1 - line 217, column 51: " + [ v.constructor.name, v1.constructor.name, v2.constructor.name ]);
};
};
};
var isNothing = maybe(true)(Data_Function["const"](false));
var functorMaybe = new Data_Functor.Functor(function (v) {
return function (v1) {
if (v1 instanceof Just) {
return new Just(v(v1.value0));
};
return Nothing.value;
};
});
var fromMaybe = function (a) {
return maybe(a)(Control_Category.identity(Control_Category.categoryFn));
};
var fromJust = function (dictPartial) {
return function (v) {
var $__unused = function (dictPartial1) {
return function ($dollar35) {
return $dollar35;
};
};
return $__unused(dictPartial)((function () {
if (v instanceof Just) {
return v.value0;
};
throw new Error("Failed pattern match at Data.Maybe line 268, column 1 - line 268, column 46: " + [ v.constructor.name ]);
})());
};
};
exports["Nothing"] = Nothing;
exports["Just"] = Just;
exports["maybe"] = maybe;
exports["fromMaybe"] = fromMaybe;
exports["isNothing"] = isNothing;
exports["fromJust"] = fromJust;
exports["functorMaybe"] = functorMaybe;
})(PS["Data.Maybe"] = PS["Data.Maybe"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Semigroupoid = PS["Control.Semigroupoid"];
var Data_Function = PS["Data.Function"];
var Data_Functor = PS["Data.Functor"];
var Data_Monoid_Additive = PS["Data.Monoid.Additive"];
var Data_Monoid_Conj = PS["Data.Monoid.Conj"];
var Data_Monoid_Disj = PS["Data.Monoid.Disj"];
var Data_Monoid_Dual = PS["Data.Monoid.Dual"];
var Data_Monoid_Endo = PS["Data.Monoid.Endo"];
var Data_Monoid_Multiplicative = PS["Data.Monoid.Multiplicative"];
var Data_Semigroup_First = PS["Data.Semigroup.First"];
var Data_Semigroup_Last = PS["Data.Semigroup.Last"];
var Prelude = PS["Prelude"];
var Newtype = function (unwrap, wrap) {
this.unwrap = unwrap;
this.wrap = wrap;
};
var wrap = function (dict) {
return dict.wrap;
};
var unwrap = function (dict) {
return dict.unwrap;
};
exports["unwrap"] = unwrap;
exports["wrap"] = wrap;
exports["Newtype"] = Newtype;
})(PS["Data.Newtype"] = PS["Data.Newtype"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var Control_Alt = PS["Control.Alt"];
var Control_Alternative = PS["Control.Alternative"];
var Control_Applicative = PS["Control.Applicative"];
var Control_Apply = PS["Control.Apply"];
var Control_Bind = PS["Control.Bind"];
var Control_Extend = PS["Control.Extend"];
var Control_Monad = PS["Control.Monad"];
var Control_MonadZero = PS["Control.MonadZero"];
var Control_Plus = PS["Control.Plus"];
var Data_Bounded = PS["Data.Bounded"];
var Data_Eq = PS["Data.Eq"];
var Data_Functor = PS["Data.Functor"];
var Data_Functor_Invariant = PS["Data.Functor.Invariant"];
var Data_Maybe = PS["Data.Maybe"];
var Data_Monoid = PS["Data.Monoid"];
var Data_Newtype = PS["Data.Newtype"];
var Data_Ord = PS["Data.Ord"];
var Data_Semigroup = PS["Data.Semigroup"];
var Data_Show = PS["Data.Show"];
var Prelude = PS["Prelude"];
var semigroupFirst = new Data_Semigroup.Semigroup(function (v) {
return function (v1) {
if (v instanceof Data_Maybe.Just) {
return v;
};
return v1;
};
});
var monoidFirst = new Data_Monoid.Monoid(function () {
return semigroupFirst;
}, Data_Maybe.Nothing.value);
exports["semigroupFirst"] = semigroupFirst;
exports["monoidFirst"] = monoidFirst;
})(PS["Data.Maybe.First"] = PS["Data.Maybe.First"] || {});
(function(exports) {
// Generated by purs version 0.12.0
"use strict";
var $foreign = PS["Data.Foldable"];
var Control_Alt = PS["Control.Alt"];
var Control_Applicative = PS["Control.Applicative"];
var Control_Apply = PS["Control.Apply"];
var Control_Bind = PS["Control.Bind"];
var Control_Category = PS["Control.Category"];
var Control_Plus = PS["Control.Plus"];
var Control_Semigroupoid = PS["Control.Semigroupoid"];
var Data_Eq = PS["Data.Eq"];
var Data_Function = PS["Data.Function"];
var Data_Functor = PS["Data.Functor"];
var Data_HeytingAlgebra = PS["Data.HeytingAlgebra"];
var Data_Maybe = PS["Data.Maybe"];
var Data_Maybe_First = PS["Data.Maybe.First"];
var Data_Maybe_Last = PS["Data.Maybe.Last"];
var Data_Monoid = PS["Data.Monoid"];
var Data_Monoid_Additive = PS["Data.Monoid.Additive"];
var Data_Monoid_Conj = PS["Data.Monoid.Conj"];
var Data_Monoid_Disj = PS["Data.Monoid.Disj"];
var Data_Monoid_Dual = PS["Data.Monoid.Dual"];
var Data_Monoid_Endo = PS["Data.Monoid.Endo"];
var Data_Monoid_Multiplicative = PS["Data.Monoid.Multiplicative"];
var Data_Newtype = PS["Data.Newtype"];
var Data_Ord = PS["Data.Ord"];
var Data_Ordering = PS["Data.Ordering"];
var Data_Semigroup = PS["Data.Semigroup"];
var Data_Semiring = PS["Data.Semiring"];
var Data_Unit = PS["Data.Unit"];
var Prelude = PS["Prelude"];
var Foldable = function (foldMap, foldl, foldr) {
this.foldMap = foldMap;
this.foldl = foldl;
this.foldr = foldr;
};
var foldr = function (dict) {
return dict.foldr;
};
var traverse_ = function (dictApplicative) {
return function (dictFoldable) {
return function (f) {
return foldr(dictFoldable)(function ($195) {
return Control_Apply.applySecond(dictApplicative.Apply0())(f($195));
})(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
};
};
};
var for_ = function (dictApplicative) {
return function (dictFoldable) {
return Data_Function.flip(traverse_(dictApplicative)(dictFoldable));
};