@explorable-viz/fluid 0.11.4 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -9
- package/dist/fluid/fluid/lib/graphics.fld +60 -60
- package/dist/fluid/fluid/lib/matrix.fld +17 -17
- package/dist/fluid/fluid/lib/prelude.fld +36 -35
- package/dist/fluid/fluid/lib/stats.fld +19 -19
- package/dist/fluid/shared/fluid.mjs +1044 -2141
- package/dist/fluid/shared/load-figure.js +1123 -2147
- package/dist/fluid/shared/webtest-lib.js +124 -124
- package/package.json +1 -1
- package/website/article/css/styles.css +3 -3
- package/website/article/fluid/1805.02474v1-10.fld +2 -2
- package/website/article/fluid/bar-chart-line-chart.fld +1 -1
- package/website/article/fluid/convolution.fld +14 -17
- package/website/article/fluid/dataset/scigen/_1805_02474v1_10.fld +1 -1
- package/website/article/fluid/methane_data.fld +1 -1
- package/website/article/fluid/moving-average.fld +1 -1
- package/website/article/fluid/non-renewables.fld +1 -1
- package/website/article/fluid/nonRenewables.fld +2 -2
- package/website/article/fluid/renewables.fld +1 -1
- package/website/article/fluid/scigen.fld +3 -3
- package/website/article/fluid/util.fld +4 -4
- package/.spago/aff/v7.0.0/.editorconfig +0 -13
- package/.spago/aff/v7.0.0/.eslintrc.json +0 -28
- package/.spago/aff/v7.0.0/.gitignore +0 -14
- package/.spago/aff/v7.0.0/.tidyrc.json +0 -10
- package/.spago/argonaut-codecs/v9.0.0/.editorconfig +0 -13
- package/.spago/argonaut-codecs/v9.0.0/.gitignore +0 -9
- package/.spago/argonaut-codecs/v9.0.0/.tidyrc.json +0 -10
- package/.spago/arrays/v7.0.0/.eslintrc.json +0 -26
- package/.spago/arrays/v7.0.0/.gitignore +0 -9
- package/.spago/console/v6.0.0/.eslintrc.json +0 -30
- package/.spago/console/v6.0.0/.gitignore +0 -9
- package/.spago/debug/v6.0.0/.eslintrc.json +0 -36
- package/.spago/debug/v6.0.0/.gitignore +0 -8
- package/.spago/enums/v6.0.0/.gitignore +0 -7
- package/.spago/foreign-object/v4.0.0/.eslintrc.json +0 -26
- package/.spago/foreign-object/v4.0.0/.gitignore +0 -8
- package/.spago/free/v7.0.0/.gitignore +0 -8
- package/.spago/graphs/v8.0.0/.gitignore +0 -7
- package/.spago/js-uri/v3.0.0/.eslintrc.json +0 -30
- package/.spago/js-uri/v3.0.0/.gitignore +0 -14
- package/.spago/js-uri/v3.0.0/.tidyrc.json +0 -10
- package/.spago/node-buffer/v8.0.0/.eslintrc.json +0 -26
- package/.spago/node-buffer/v8.0.0/.gitignore +0 -8
- package/.spago/node-child-process/v9.0.0/.eslintrc.json +0 -29
- package/.spago/node-child-process/v9.0.0/.gitignore +0 -8
- package/.spago/node-process/v10.0.0/.eslintrc.json +0 -29
- package/.spago/node-process/v10.0.0/.gitignore +0 -8
- package/.spago/node-streams/v7.0.0/.eslintrc.json +0 -29
- package/.spago/node-streams/v7.0.0/.gitignore +0 -8
- package/.spago/optparse/v5.0.0/.gitignore +0 -8
- package/.spago/optparse/v5.0.0/.npmrc +0 -1
- package/.spago/ordered-collections/v3.0.0/.gitignore +0 -8
- package/.spago/parallel/v6.0.0/.gitignore +0 -7
- package/.spago/parsing/v10.0.0/.editorconfig +0 -13
- package/.spago/parsing/v10.0.0/.gitignore +0 -10
- package/.spago/parsing/v10.0.0/.tidyoperators +0 -231
- package/.spago/parsing/v10.0.0/.tidyrc.json +0 -10
- package/.spago/prelude/v6.0.0/.eslintrc.json +0 -26
- package/.spago/prelude/v6.0.0/.gitignore +0 -8
- package/.spago/st/v6.0.0/.eslintrc.json +0 -26
- package/.spago/st/v6.0.0/.gitignore +0 -8
- package/.spago/strings/v6.0.0/.eslintrc.json +0 -26
- package/.spago/strings/v6.0.0/.gitignore +0 -8
- package/.spago/tailrec/v6.0.0/.gitignore +0 -7
- package/.spago/web-html/v4.0.0/.eslintrc.json +0 -29
- package/.spago/web-html/v4.0.0/.gitignore +0 -8
- package/.spago/web-xhr/v5.0.0/.eslintrc.json +0 -29
- package/.spago/web-xhr/v5.0.0/.gitignore +0 -8
- package/website/article/.DS_Store +0 -0
- package/website/article/dataset/.DS_Store +0 -0
|
@@ -227,7 +227,6 @@ var showArrayImpl = function(f) {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
// output-es/Data.Show/index.js
|
|
230
|
-
var showUnit = { show: (v) => "unit" };
|
|
231
230
|
var showString = { show: showStringImpl };
|
|
232
231
|
var showInt = { show: showIntImpl };
|
|
233
232
|
|
|
@@ -2414,10 +2413,6 @@ var showList = (dictShow) => {
|
|
|
2414
2413
|
}
|
|
2415
2414
|
};
|
|
2416
2415
|
};
|
|
2417
|
-
var showNonEmptyList = (dictShow) => {
|
|
2418
|
-
const $0 = showList(dictShow);
|
|
2419
|
-
return { show: (v) => "(NonEmptyList (NonEmpty " + dictShow.show(v._1) + " " + $0.show(v._2) + "))" };
|
|
2420
|
-
};
|
|
2421
2416
|
var traversableList = {
|
|
2422
2417
|
traverse: (dictApplicative) => {
|
|
2423
2418
|
const Apply0 = dictApplicative.Apply0();
|
|
@@ -7746,6 +7741,12 @@ var spyWhen = (v) => (v1) => (v2) => (v3) => {
|
|
|
7746
7741
|
};
|
|
7747
7742
|
var spyFunWhenM = (dictFunctor) => (b) => (s) => (showIn) => (showOut) => (f) => (x) => dictFunctor.map(spyWhen(b)(s + " output")(showOut))(f(spyWhen(b)(s + " input")(showIn)(x)));
|
|
7748
7743
|
var spyFunWhen = (b) => (s) => (showIn) => (showOut) => (f) => spyFunWhenM(functorIdentity)(b)(s)(showIn)(showOut)((x) => f(x));
|
|
7744
|
+
var traceWhen = (dictApplicative) => (v) => (v1) => {
|
|
7745
|
+
if (v) {
|
|
7746
|
+
return _trace(v1, (v2) => dictApplicative.pure());
|
|
7747
|
+
}
|
|
7748
|
+
return dictApplicative.pure();
|
|
7749
|
+
};
|
|
7749
7750
|
var check = (dictMonadThrow) => (v) => {
|
|
7750
7751
|
if (!v) {
|
|
7751
7752
|
return $$throw(dictMonadThrow);
|
|
@@ -8358,7 +8359,6 @@ var Dictionary = (value0) => (value1) => $Expr("Dictionary", value0, value1);
|
|
|
8358
8359
|
var Constr = (value0) => (value1) => (value2) => $Expr("Constr", value0, value1, value2);
|
|
8359
8360
|
var Matrix = (value0) => (value1) => (value2) => (value3) => $Expr("Matrix", value0, value1, value2, value3);
|
|
8360
8361
|
var Lambda = (value0) => (value1) => $Expr("Lambda", value0, value1);
|
|
8361
|
-
var Project = (value0) => (value1) => $Expr("Project", value0, value1);
|
|
8362
8362
|
var DProject = (value0) => (value1) => $Expr("DProject", value0, value1);
|
|
8363
8363
|
var App2 = (value0) => (value1) => $Expr("App", value0, value1);
|
|
8364
8364
|
var Let = (value0) => (value1) => $Expr("Let", value0, value1);
|
|
@@ -8405,9 +8405,6 @@ var verticesExprVertex = {
|
|
|
8405
8405
|
if (v.tag === "Lambda") {
|
|
8406
8406
|
return union3($$$Map("Node", 1, 1, $Tuple(v._1, pack1(v)), void 0, Leaf2, Leaf2))(verticesElimVertex.vertices(v._2));
|
|
8407
8407
|
}
|
|
8408
|
-
if (v.tag === "Project") {
|
|
8409
|
-
return verticesExprVertex.vertices(v._1);
|
|
8410
|
-
}
|
|
8411
8408
|
if (v.tag === "DProject") {
|
|
8412
8409
|
return union3(verticesExprVertex.vertices(v._1))(verticesExprVertex.vertices(v._2));
|
|
8413
8410
|
}
|
|
@@ -8500,9 +8497,6 @@ var functorExpr = {
|
|
|
8500
8497
|
if (m.tag === "Lambda") {
|
|
8501
8498
|
return $Expr("Lambda", f(m._1), functorElim.map(f)(m._2));
|
|
8502
8499
|
}
|
|
8503
|
-
if (m.tag === "Project") {
|
|
8504
|
-
return $Expr("Project", functorExpr.map(f)(m._1), m._2);
|
|
8505
|
-
}
|
|
8506
8500
|
if (m.tag === "DProject") {
|
|
8507
8501
|
return $Expr("DProject", functorExpr.map(f)(m._1), functorExpr.map(f)(m._2));
|
|
8508
8502
|
}
|
|
@@ -8646,9 +8640,6 @@ var foldableExpr = {
|
|
|
8646
8640
|
if (m.tag === "Lambda") {
|
|
8647
8641
|
return foldableElim.foldl(f)(f(z)(m._1))(m._2);
|
|
8648
8642
|
}
|
|
8649
|
-
if (m.tag === "Project") {
|
|
8650
|
-
return foldableExpr.foldl(f)(z)(m._1);
|
|
8651
|
-
}
|
|
8652
8643
|
if (m.tag === "DProject") {
|
|
8653
8644
|
return foldableExpr.foldl(f)(foldableExpr.foldl(f)(z)(m._1))(m._2);
|
|
8654
8645
|
}
|
|
@@ -8701,9 +8692,6 @@ var foldableExpr = {
|
|
|
8701
8692
|
if (m.tag === "Lambda") {
|
|
8702
8693
|
return f(m._1)(foldableElim.foldr(f)(z)(m._2));
|
|
8703
8694
|
}
|
|
8704
|
-
if (m.tag === "Project") {
|
|
8705
|
-
return foldableExpr.foldr(f)(z)(m._1);
|
|
8706
|
-
}
|
|
8707
8695
|
if (m.tag === "DProject") {
|
|
8708
8696
|
return foldableExpr.foldr(f)(foldableExpr.foldr(f)(z)(m._2))(m._1);
|
|
8709
8697
|
}
|
|
@@ -8753,9 +8741,6 @@ var foldableExpr = {
|
|
|
8753
8741
|
if (m.tag === "Lambda") {
|
|
8754
8742
|
return $0.append(f(m._1))(foldableElim.foldMap(dictMonoid)(f)(m._2));
|
|
8755
8743
|
}
|
|
8756
|
-
if (m.tag === "Project") {
|
|
8757
|
-
return foldableExpr.foldMap(dictMonoid)(f)(m._1);
|
|
8758
|
-
}
|
|
8759
8744
|
if (m.tag === "DProject") {
|
|
8760
8745
|
return $0.append(foldableExpr.foldMap(dictMonoid)(f)(m._1))(foldableExpr.foldMap(dictMonoid)(f)(m._2));
|
|
8761
8746
|
}
|
|
@@ -8906,10 +8891,6 @@ var traversableExpr = {
|
|
|
8906
8891
|
if (m.tag === "Lambda") {
|
|
8907
8892
|
return Apply0.apply($0.map((v2) => (v3) => $Expr("Lambda", v2, v3))(f(m._1)))(traversableElim.traverse(dictApplicative)(f)(m._2));
|
|
8908
8893
|
}
|
|
8909
|
-
if (m.tag === "Project") {
|
|
8910
|
-
const $1 = m._2;
|
|
8911
|
-
return $0.map((v2) => $Expr("Project", v2, $1))(traversableExpr.traverse(dictApplicative)(f)(m._1));
|
|
8912
|
-
}
|
|
8913
8894
|
if (m.tag === "DProject") {
|
|
8914
8895
|
return Apply0.apply($0.map((v2) => (v3) => $Expr("DProject", v2, v3))(traversableExpr.traverse(dictApplicative)(f)(m._1)))(traversableExpr.traverse(dictApplicative)(f)(m._2));
|
|
8915
8896
|
}
|
|
@@ -9118,9 +9099,6 @@ var fVExpr = {
|
|
|
9118
9099
|
if (v.tag === "Lambda") {
|
|
9119
9100
|
return fVElim.fv(v._2);
|
|
9120
9101
|
}
|
|
9121
|
-
if (v.tag === "Project") {
|
|
9122
|
-
return fVExpr.fv(v._1);
|
|
9123
|
-
}
|
|
9124
9102
|
if (v.tag === "DProject") {
|
|
9125
9103
|
return setSet2.union(fVExpr.fv(v._1))(fVExpr.fv(v._2));
|
|
9126
9104
|
}
|
|
@@ -10042,12 +10020,6 @@ var ringNumber = { sub: numSub, Semiring0: () => semiringNumber };
|
|
|
10042
10020
|
var ringInt = { sub: intSub, Semiring0: () => semiringInt };
|
|
10043
10021
|
|
|
10044
10022
|
// output-es/Data.EuclideanRing/foreign.js
|
|
10045
|
-
var intDiv2 = function(x) {
|
|
10046
|
-
return function(y) {
|
|
10047
|
-
if (y === 0) return 0;
|
|
10048
|
-
return y > 0 ? Math.floor(x / y) : -Math.floor(x / -y);
|
|
10049
|
-
};
|
|
10050
|
-
};
|
|
10051
10023
|
var intMod = function(x) {
|
|
10052
10024
|
return function(y) {
|
|
10053
10025
|
if (y === 0) return 0;
|
|
@@ -11325,23 +11297,37 @@ var makeParser = (term) => (ops) => {
|
|
|
11325
11297
|
};
|
|
11326
11298
|
|
|
11327
11299
|
// output-es/Primitive.Parse/index.js
|
|
11328
|
-
var
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
/* @__PURE__ */ $
|
|
11336
|
-
/* @__PURE__ */ $
|
|
11337
|
-
/* @__PURE__ */ $
|
|
11338
|
-
/* @__PURE__ */ $
|
|
11339
|
-
/* @__PURE__ */ $
|
|
11340
|
-
/* @__PURE__ */ $
|
|
11341
|
-
/* @__PURE__ */ $
|
|
11342
|
-
/* @__PURE__ */ $
|
|
11343
|
-
/* @__PURE__ */ $
|
|
11344
|
-
|
|
11300
|
+
var $InfixParser = (tag) => tag;
|
|
11301
|
+
var $OpDef = (_1, _2, _3, _4) => ({ tag: "Infix", _1, _2, _3, _4 });
|
|
11302
|
+
var $$Symbol = /* @__PURE__ */ $InfixParser("Symbol");
|
|
11303
|
+
var Ident = /* @__PURE__ */ $InfixParser("Ident");
|
|
11304
|
+
var ConsOp = /* @__PURE__ */ $InfixParser("ConsOp");
|
|
11305
|
+
var Custom = /* @__PURE__ */ $InfixParser("Custom");
|
|
11306
|
+
var opDefs = [
|
|
11307
|
+
/* @__PURE__ */ $OpDef($$Symbol, "!", AssocLeft, 9),
|
|
11308
|
+
/* @__PURE__ */ $OpDef($$Symbol, "**", AssocRight, 8),
|
|
11309
|
+
/* @__PURE__ */ $OpDef($$Symbol, "*", AssocLeft, 7),
|
|
11310
|
+
/* @__PURE__ */ $OpDef($$Symbol, "/", AssocLeft, 7),
|
|
11311
|
+
/* @__PURE__ */ $OpDef($$Symbol, "//", AssocLeft, 7),
|
|
11312
|
+
/* @__PURE__ */ $OpDef($$Symbol, "%", AssocLeft, 7),
|
|
11313
|
+
/* @__PURE__ */ $OpDef($$Symbol, "+", AssocLeft, 6),
|
|
11314
|
+
/* @__PURE__ */ $OpDef($$Symbol, "-", AssocLeft, 6),
|
|
11315
|
+
/* @__PURE__ */ $OpDef(ConsOp, ":", AssocRight, 5),
|
|
11316
|
+
/* @__PURE__ */ $OpDef($$Symbol, "++", AssocRight, 4),
|
|
11317
|
+
/* @__PURE__ */ $OpDef(Custom, "|x|", AssocLeft, 3),
|
|
11318
|
+
/* @__PURE__ */ $OpDef($$Symbol, "==", AssocNone, 2),
|
|
11319
|
+
/* @__PURE__ */ $OpDef($$Symbol, "/=", AssocNone, 2),
|
|
11320
|
+
/* @__PURE__ */ $OpDef($$Symbol, "<", AssocLeft, 2),
|
|
11321
|
+
/* @__PURE__ */ $OpDef($$Symbol, ">", AssocLeft, 2),
|
|
11322
|
+
/* @__PURE__ */ $OpDef($$Symbol, "<=", AssocLeft, 2),
|
|
11323
|
+
/* @__PURE__ */ $OpDef($$Symbol, ">=", AssocLeft, 2),
|
|
11324
|
+
/* @__PURE__ */ $OpDef(Ident, "and", AssocLeft, 1),
|
|
11325
|
+
/* @__PURE__ */ $OpDef(Ident, "or", AssocLeft, 0)
|
|
11326
|
+
];
|
|
11327
|
+
var opMap = /* @__PURE__ */ fromFoldable(ordString)(foldableArray)(/* @__PURE__ */ arrayMap((def) => $Tuple(
|
|
11328
|
+
def._2,
|
|
11329
|
+
def
|
|
11330
|
+
))(opDefs));
|
|
11345
11331
|
|
|
11346
11332
|
// output-es/Bind/index.js
|
|
11347
11333
|
var union4 = /* @__PURE__ */ (() => setSet(ordString).union)();
|
|
@@ -11451,86 +11437,6 @@ var genericShowSum3 = /* @__PURE__ */ (() => {
|
|
|
11451
11437
|
});
|
|
11452
11438
|
})();
|
|
11453
11439
|
var PListNextIsSymbol = { reflectSymbol: () => "PListNext" };
|
|
11454
|
-
var VarDefIsSymbol = { reflectSymbol: () => "VarDef" };
|
|
11455
|
-
var ListCompGuardIsSymbol = { reflectSymbol: () => "ListCompGuard" };
|
|
11456
|
-
var ListCompGenIsSymbol = { reflectSymbol: () => "ListCompGen" };
|
|
11457
|
-
var ListCompDeclIsSymbol = { reflectSymbol: () => "ListCompDecl" };
|
|
11458
|
-
var genericShowSum4 = /* @__PURE__ */ (() => {
|
|
11459
|
-
const $0 = genericShowConstructor(genericShowArgsArgument)({ reflectSymbol: () => "Token" });
|
|
11460
|
-
return (dictGenericShow1) => ({
|
|
11461
|
-
"genericShow'": (v) => {
|
|
11462
|
-
if (v.tag === "Inl") {
|
|
11463
|
-
return $0["genericShow'"](v._1);
|
|
11464
|
-
}
|
|
11465
|
-
if (v.tag === "Inr") {
|
|
11466
|
-
return dictGenericShow1["genericShow'"](v._1);
|
|
11467
|
-
}
|
|
11468
|
-
fail();
|
|
11469
|
-
}
|
|
11470
|
-
});
|
|
11471
|
-
})();
|
|
11472
|
-
var UnquoteIsSymbol = { reflectSymbol: () => "Unquote" };
|
|
11473
|
-
var EndIsSymbol = { reflectSymbol: () => "End" };
|
|
11474
|
-
var NextIsSymbol = { reflectSymbol: () => "Next" };
|
|
11475
|
-
var genericShowSum5 = /* @__PURE__ */ (() => {
|
|
11476
|
-
const $0 = genericShowConstructor(genericShowArgsArgument)({ reflectSymbol: () => "Var" });
|
|
11477
|
-
return (dictGenericShow1) => ({
|
|
11478
|
-
"genericShow'": (v) => {
|
|
11479
|
-
if (v.tag === "Inl") {
|
|
11480
|
-
return $0["genericShow'"](v._1);
|
|
11481
|
-
}
|
|
11482
|
-
if (v.tag === "Inr") {
|
|
11483
|
-
return dictGenericShow1["genericShow'"](v._1);
|
|
11484
|
-
}
|
|
11485
|
-
fail();
|
|
11486
|
-
}
|
|
11487
|
-
});
|
|
11488
|
-
})();
|
|
11489
|
-
var genericShowSum6 = /* @__PURE__ */ (() => {
|
|
11490
|
-
const $0 = genericShowConstructor(genericShowArgsArgument)({ reflectSymbol: () => "Op" });
|
|
11491
|
-
return (dictGenericShow1) => ({
|
|
11492
|
-
"genericShow'": (v) => {
|
|
11493
|
-
if (v.tag === "Inl") {
|
|
11494
|
-
return $0["genericShow'"](v._1);
|
|
11495
|
-
}
|
|
11496
|
-
if (v.tag === "Inr") {
|
|
11497
|
-
return dictGenericShow1["genericShow'"](v._1);
|
|
11498
|
-
}
|
|
11499
|
-
fail();
|
|
11500
|
-
}
|
|
11501
|
-
});
|
|
11502
|
-
})();
|
|
11503
|
-
var genericShowArgsArgument1 = { genericShowArgs: (v) => [showIntImpl(v)] };
|
|
11504
|
-
var IntIsSymbol = { reflectSymbol: () => "Int" };
|
|
11505
|
-
var genericShowArgsArgument2 = { genericShowArgs: (v) => [showNumberImpl(v)] };
|
|
11506
|
-
var FloatIsSymbol = { reflectSymbol: () => "Float" };
|
|
11507
|
-
var StrIsSymbol = { reflectSymbol: () => "Str" };
|
|
11508
|
-
var ConstrIsSymbol = { reflectSymbol: () => "Constr" };
|
|
11509
|
-
var DictionaryIsSymbol = { reflectSymbol: () => "Dictionary" };
|
|
11510
|
-
var genericShowArgsProduct1 = /* @__PURE__ */ genericShowArgsProduct(/* @__PURE__ */ (() => {
|
|
11511
|
-
const $0 = showTuple(showString);
|
|
11512
|
-
return { genericShowArgs: (v) => [$0.show(v)] };
|
|
11513
|
-
})());
|
|
11514
|
-
var MatrixIsSymbol = { reflectSymbol: () => "Matrix" };
|
|
11515
|
-
var LambdaIsSymbol = { reflectSymbol: () => "Lambda" };
|
|
11516
|
-
var ProjectIsSymbol = { reflectSymbol: () => "Project" };
|
|
11517
|
-
var DProjectIsSymbol = { reflectSymbol: () => "DProject" };
|
|
11518
|
-
var AppIsSymbol = { reflectSymbol: () => "App" };
|
|
11519
|
-
var BinaryAppIsSymbol = { reflectSymbol: () => "BinaryApp" };
|
|
11520
|
-
var MatchAsIsSymbol = { reflectSymbol: () => "MatchAs" };
|
|
11521
|
-
var IfElseIsSymbol = { reflectSymbol: () => "IfElse" };
|
|
11522
|
-
var ParagraphIsSymbol = { reflectSymbol: () => "Paragraph" };
|
|
11523
|
-
var ListEmptyIsSymbol = { reflectSymbol: () => "ListEmpty" };
|
|
11524
|
-
var ListNonEmptyIsSymbol = { reflectSymbol: () => "ListNonEmpty" };
|
|
11525
|
-
var ListEnumIsSymbol = { reflectSymbol: () => "ListEnum" };
|
|
11526
|
-
var ListCompIsSymbol = { reflectSymbol: () => "ListComp" };
|
|
11527
|
-
var LetIsSymbol = { reflectSymbol: () => "Let" };
|
|
11528
|
-
var LetRecIsSymbol = { reflectSymbol: () => "LetRec" };
|
|
11529
|
-
var DocExprIsSymbol = { reflectSymbol: () => "DocExpr" };
|
|
11530
|
-
var ExprKeyIsSymbol = { reflectSymbol: () => "ExprKey" };
|
|
11531
|
-
var VarKeyIsSymbol = { reflectSymbol: () => "VarKey" };
|
|
11532
|
-
var ClausesIsSymbol = { reflectSymbol: () => "Clauses" };
|
|
11533
|
-
var ClauseIsSymbol = { reflectSymbol: () => "Clause" };
|
|
11534
11440
|
var difference2 = /* @__PURE__ */ difference(eqString);
|
|
11535
11441
|
var toUnfoldable4 = (x) => {
|
|
11536
11442
|
const go = (m$p, z$p) => {
|
|
@@ -11659,1274 +11565,91 @@ var showListRestPattern = {
|
|
|
11659
11565
|
fail();
|
|
11660
11566
|
})())
|
|
11661
11567
|
};
|
|
11662
|
-
var
|
|
11663
|
-
var
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
if (x._1.tag === "Inl") {
|
|
11674
|
-
return $Expr2("Op", x._1._1);
|
|
11675
|
-
}
|
|
11676
|
-
if (x._1.tag === "Inr") {
|
|
11677
|
-
if (x._1._1.tag === "Inl") {
|
|
11678
|
-
return $Expr2("Int", x._1._1._1._1, x._1._1._1._2);
|
|
11679
|
-
}
|
|
11680
|
-
if (x._1._1.tag === "Inr") {
|
|
11681
|
-
if (x._1._1._1.tag === "Inl") {
|
|
11682
|
-
return $Expr2("Float", x._1._1._1._1._1, x._1._1._1._1._2);
|
|
11683
|
-
}
|
|
11684
|
-
if (x._1._1._1.tag === "Inr") {
|
|
11685
|
-
if (x._1._1._1._1.tag === "Inl") {
|
|
11686
|
-
return $Expr2("Str", x._1._1._1._1._1._1, x._1._1._1._1._1._2);
|
|
11687
|
-
}
|
|
11688
|
-
if (x._1._1._1._1.tag === "Inr") {
|
|
11689
|
-
if (x._1._1._1._1._1.tag === "Inl") {
|
|
11690
|
-
return $Expr2("Constr", x._1._1._1._1._1._1._1, x._1._1._1._1._1._1._2._1, x._1._1._1._1._1._1._2._2);
|
|
11691
|
-
}
|
|
11692
|
-
if (x._1._1._1._1._1.tag === "Inr") {
|
|
11693
|
-
if (x._1._1._1._1._1._1.tag === "Inl") {
|
|
11694
|
-
return $Expr2("Dictionary", x._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._2);
|
|
11695
|
-
}
|
|
11696
|
-
if (x._1._1._1._1._1._1.tag === "Inr") {
|
|
11697
|
-
if (x._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11698
|
-
return $Expr2("Matrix", x._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._2._1, x._1._1._1._1._1._1._1._1._2._2._1, x._1._1._1._1._1._1._1._1._2._2._2);
|
|
11699
|
-
}
|
|
11700
|
-
if (x._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11701
|
-
if (x._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11702
|
-
return $Expr2("Lambda", x._1._1._1._1._1._1._1._1._1);
|
|
11703
|
-
}
|
|
11704
|
-
if (x._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11705
|
-
if (x._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11706
|
-
return $Expr2("Project", x._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._2);
|
|
11707
|
-
}
|
|
11708
|
-
if (x._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11709
|
-
if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11710
|
-
return $Expr2("DProject", x._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
11711
|
-
}
|
|
11712
|
-
if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11713
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11714
|
-
return $Expr2("App", x._1._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
11715
|
-
}
|
|
11716
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11717
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11718
|
-
return $Expr2(
|
|
11719
|
-
"BinaryApp",
|
|
11720
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11721
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
11722
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
11723
|
-
);
|
|
11724
|
-
}
|
|
11725
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11726
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11727
|
-
return $Expr2("MatchAs", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
11728
|
-
}
|
|
11729
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11730
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11731
|
-
return $Expr2(
|
|
11732
|
-
"IfElse",
|
|
11733
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11734
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
11735
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
11736
|
-
);
|
|
11737
|
-
}
|
|
11738
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11739
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11740
|
-
return $Expr2("Paragraph", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
11741
|
-
}
|
|
11742
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11743
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11744
|
-
return $Expr2("ListEmpty", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
11745
|
-
}
|
|
11746
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11747
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11748
|
-
return $Expr2(
|
|
11749
|
-
"ListNonEmpty",
|
|
11750
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11751
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
11752
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
11753
|
-
);
|
|
11754
|
-
}
|
|
11755
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11756
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11757
|
-
return $Expr2(
|
|
11758
|
-
"ListEnum",
|
|
11759
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11760
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
11761
|
-
);
|
|
11762
|
-
}
|
|
11763
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11764
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11765
|
-
return $Expr2(
|
|
11766
|
-
"ListComp",
|
|
11767
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11768
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
11769
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
11770
|
-
);
|
|
11771
|
-
}
|
|
11772
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11773
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11774
|
-
return $Expr2(
|
|
11775
|
-
"Let",
|
|
11776
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11777
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
11778
|
-
);
|
|
11779
|
-
}
|
|
11780
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11781
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
11782
|
-
return $Expr2(
|
|
11783
|
-
"LetRec",
|
|
11784
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11785
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
11786
|
-
);
|
|
11787
|
-
}
|
|
11788
|
-
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
11789
|
-
return $Expr2(
|
|
11790
|
-
"DocExpr",
|
|
11791
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
11792
|
-
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
11793
|
-
);
|
|
11794
|
-
}
|
|
11795
|
-
}
|
|
11796
|
-
}
|
|
11797
|
-
}
|
|
11798
|
-
}
|
|
11799
|
-
}
|
|
11800
|
-
}
|
|
11801
|
-
}
|
|
11802
|
-
}
|
|
11803
|
-
}
|
|
11804
|
-
}
|
|
11805
|
-
}
|
|
11806
|
-
}
|
|
11807
|
-
}
|
|
11808
|
-
}
|
|
11809
|
-
}
|
|
11810
|
-
}
|
|
11811
|
-
}
|
|
11812
|
-
}
|
|
11813
|
-
}
|
|
11814
|
-
}
|
|
11568
|
+
var functorVarDef2 = { map: (f) => (m) => $VarDef2(m._1, functorExpr2.map(f)(m._2)) };
|
|
11569
|
+
var functorQualifier = {
|
|
11570
|
+
map: (f) => (m) => {
|
|
11571
|
+
if (m.tag === "ListCompGuard") {
|
|
11572
|
+
return $Qualifier("ListCompGuard", functorExpr2.map(f)(m._1));
|
|
11573
|
+
}
|
|
11574
|
+
if (m.tag === "ListCompGen") {
|
|
11575
|
+
return $Qualifier("ListCompGen", m._1, functorExpr2.map(f)(m._2));
|
|
11576
|
+
}
|
|
11577
|
+
if (m.tag === "ListCompDecl") {
|
|
11578
|
+
return $Qualifier("ListCompDecl", $VarDef2(m._1._1, functorExpr2.map(f)(m._1._2)));
|
|
11815
11579
|
}
|
|
11816
11580
|
fail();
|
|
11817
|
-
}
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11581
|
+
}
|
|
11582
|
+
};
|
|
11583
|
+
var functorParagraphElem = {
|
|
11584
|
+
map: (f) => (m) => {
|
|
11585
|
+
if (m.tag === "Token") {
|
|
11586
|
+
return $ParagraphElem("Token", m._1);
|
|
11821
11587
|
}
|
|
11822
|
-
if (
|
|
11823
|
-
return $
|
|
11588
|
+
if (m.tag === "Unquote") {
|
|
11589
|
+
return $ParagraphElem("Unquote", functorExpr2.map(f)(m._1));
|
|
11824
11590
|
}
|
|
11825
|
-
|
|
11826
|
-
|
|
11591
|
+
fail();
|
|
11592
|
+
}
|
|
11593
|
+
};
|
|
11594
|
+
var functorListRest = {
|
|
11595
|
+
map: (f) => (m) => {
|
|
11596
|
+
if (m.tag === "End") {
|
|
11597
|
+
return $ListRest("End", f(m._1));
|
|
11827
11598
|
}
|
|
11828
|
-
if (
|
|
11829
|
-
return $
|
|
11599
|
+
if (m.tag === "Next") {
|
|
11600
|
+
return $ListRest("Next", f(m._1), functorExpr2.map(f)(m._2), functorListRest.map(f)(m._3));
|
|
11830
11601
|
}
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11602
|
+
fail();
|
|
11603
|
+
}
|
|
11604
|
+
};
|
|
11605
|
+
var functorExpr2 = {
|
|
11606
|
+
map: (f) => (m) => {
|
|
11607
|
+
if (m.tag === "Var") {
|
|
11608
|
+
return $Expr2("Var", m._1);
|
|
11836
11609
|
}
|
|
11837
|
-
if (
|
|
11838
|
-
return $
|
|
11839
|
-
"Inr",
|
|
11840
|
-
$Sum(
|
|
11841
|
-
"Inr",
|
|
11842
|
-
$Sum(
|
|
11843
|
-
"Inr",
|
|
11844
|
-
$Sum(
|
|
11845
|
-
"Inr",
|
|
11846
|
-
$Sum("Inr", $Sum("Inl", $Product(x._1, $Product(x._2, x._3))))
|
|
11847
|
-
)
|
|
11848
|
-
)
|
|
11849
|
-
)
|
|
11850
|
-
);
|
|
11610
|
+
if (m.tag === "Op") {
|
|
11611
|
+
return $Expr2("Op", m._1);
|
|
11851
11612
|
}
|
|
11852
|
-
if (
|
|
11853
|
-
return $
|
|
11854
|
-
"Inr",
|
|
11855
|
-
$Sum(
|
|
11856
|
-
"Inr",
|
|
11857
|
-
$Sum(
|
|
11858
|
-
"Inr",
|
|
11859
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2)))))
|
|
11860
|
-
)
|
|
11861
|
-
)
|
|
11862
|
-
);
|
|
11613
|
+
if (m.tag === "Int") {
|
|
11614
|
+
return $Expr2("Int", f(m._1), m._2);
|
|
11863
11615
|
}
|
|
11864
|
-
if (
|
|
11865
|
-
return $
|
|
11866
|
-
"Inr",
|
|
11867
|
-
$Sum(
|
|
11868
|
-
"Inr",
|
|
11869
|
-
$Sum(
|
|
11870
|
-
"Inr",
|
|
11871
|
-
$Sum(
|
|
11872
|
-
"Inr",
|
|
11873
|
-
$Sum(
|
|
11874
|
-
"Inr",
|
|
11875
|
-
$Sum(
|
|
11876
|
-
"Inr",
|
|
11877
|
-
$Sum(
|
|
11878
|
-
"Inr",
|
|
11879
|
-
$Sum("Inl", $Product(x._1, $Product(x._2, $Product(x._3, x._4))))
|
|
11880
|
-
)
|
|
11881
|
-
)
|
|
11882
|
-
)
|
|
11883
|
-
)
|
|
11884
|
-
)
|
|
11885
|
-
)
|
|
11886
|
-
);
|
|
11616
|
+
if (m.tag === "Float") {
|
|
11617
|
+
return $Expr2("Float", f(m._1), m._2);
|
|
11887
11618
|
}
|
|
11888
|
-
if (
|
|
11889
|
-
return $
|
|
11890
|
-
"Inr",
|
|
11891
|
-
$Sum(
|
|
11892
|
-
"Inr",
|
|
11893
|
-
$Sum(
|
|
11894
|
-
"Inr",
|
|
11895
|
-
$Sum(
|
|
11896
|
-
"Inr",
|
|
11897
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inr", $Sum("Inr", $Sum("Inl", x._1)))))
|
|
11898
|
-
)
|
|
11899
|
-
)
|
|
11900
|
-
)
|
|
11901
|
-
);
|
|
11619
|
+
if (m.tag === "Str") {
|
|
11620
|
+
return $Expr2("Str", f(m._1), m._2);
|
|
11902
11621
|
}
|
|
11903
|
-
if (
|
|
11904
|
-
return $
|
|
11905
|
-
"Inr",
|
|
11906
|
-
$Sum(
|
|
11907
|
-
"Inr",
|
|
11908
|
-
$Sum(
|
|
11909
|
-
"Inr",
|
|
11910
|
-
$Sum(
|
|
11911
|
-
"Inr",
|
|
11912
|
-
$Sum(
|
|
11913
|
-
"Inr",
|
|
11914
|
-
$Sum(
|
|
11915
|
-
"Inr",
|
|
11916
|
-
$Sum(
|
|
11917
|
-
"Inr",
|
|
11918
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
11919
|
-
)
|
|
11920
|
-
)
|
|
11921
|
-
)
|
|
11922
|
-
)
|
|
11923
|
-
)
|
|
11924
|
-
)
|
|
11925
|
-
);
|
|
11622
|
+
if (m.tag === "Constr") {
|
|
11623
|
+
return $Expr2("Constr", f(m._1), m._2, listMap(functorExpr2.map(f))(m._3));
|
|
11926
11624
|
}
|
|
11927
|
-
if (
|
|
11928
|
-
return $
|
|
11929
|
-
"
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
$
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
$Sum(
|
|
11937
|
-
"Inr",
|
|
11938
|
-
$Sum(
|
|
11939
|
-
"Inr",
|
|
11940
|
-
$Sum(
|
|
11941
|
-
"Inr",
|
|
11942
|
-
$Sum(
|
|
11943
|
-
"Inr",
|
|
11944
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
11945
|
-
)
|
|
11946
|
-
)
|
|
11947
|
-
)
|
|
11948
|
-
)
|
|
11949
|
-
)
|
|
11950
|
-
)
|
|
11951
|
-
)
|
|
11625
|
+
if (m.tag === "Dictionary") {
|
|
11626
|
+
return $Expr2(
|
|
11627
|
+
"Dictionary",
|
|
11628
|
+
f(m._1),
|
|
11629
|
+
listMap((() => {
|
|
11630
|
+
const $0 = functorDictEntry.map(f);
|
|
11631
|
+
const $1 = functorExpr2.map(f);
|
|
11632
|
+
return (v) => $Tuple($0(v._1), $1(v._2));
|
|
11633
|
+
})())(m._2)
|
|
11952
11634
|
);
|
|
11953
11635
|
}
|
|
11954
|
-
if (
|
|
11955
|
-
return $
|
|
11956
|
-
"Inr",
|
|
11957
|
-
$Sum(
|
|
11958
|
-
"Inr",
|
|
11959
|
-
$Sum(
|
|
11960
|
-
"Inr",
|
|
11961
|
-
$Sum(
|
|
11962
|
-
"Inr",
|
|
11963
|
-
$Sum(
|
|
11964
|
-
"Inr",
|
|
11965
|
-
$Sum(
|
|
11966
|
-
"Inr",
|
|
11967
|
-
$Sum(
|
|
11968
|
-
"Inr",
|
|
11969
|
-
$Sum(
|
|
11970
|
-
"Inr",
|
|
11971
|
-
$Sum(
|
|
11972
|
-
"Inr",
|
|
11973
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
11974
|
-
)
|
|
11975
|
-
)
|
|
11976
|
-
)
|
|
11977
|
-
)
|
|
11978
|
-
)
|
|
11979
|
-
)
|
|
11980
|
-
)
|
|
11981
|
-
)
|
|
11982
|
-
);
|
|
11636
|
+
if (m.tag === "Matrix") {
|
|
11637
|
+
return $Expr2("Matrix", f(m._1), functorExpr2.map(f)(m._2), m._3, functorExpr2.map(f)(m._4));
|
|
11983
11638
|
}
|
|
11984
|
-
if (
|
|
11985
|
-
return $
|
|
11986
|
-
"Inr",
|
|
11987
|
-
$Sum(
|
|
11988
|
-
"Inr",
|
|
11989
|
-
$Sum(
|
|
11990
|
-
"Inr",
|
|
11991
|
-
$Sum(
|
|
11992
|
-
"Inr",
|
|
11993
|
-
$Sum(
|
|
11994
|
-
"Inr",
|
|
11995
|
-
$Sum(
|
|
11996
|
-
"Inr",
|
|
11997
|
-
$Sum(
|
|
11998
|
-
"Inr",
|
|
11999
|
-
$Sum(
|
|
12000
|
-
"Inr",
|
|
12001
|
-
$Sum(
|
|
12002
|
-
"Inr",
|
|
12003
|
-
$Sum(
|
|
12004
|
-
"Inr",
|
|
12005
|
-
$Sum(
|
|
12006
|
-
"Inr",
|
|
12007
|
-
$Sum("Inr", $Sum("Inl", $Product(x._1, $Product(x._2, x._3))))
|
|
12008
|
-
)
|
|
12009
|
-
)
|
|
12010
|
-
)
|
|
12011
|
-
)
|
|
12012
|
-
)
|
|
12013
|
-
)
|
|
12014
|
-
)
|
|
12015
|
-
)
|
|
12016
|
-
)
|
|
12017
|
-
)
|
|
12018
|
-
);
|
|
11639
|
+
if (m.tag === "Lambda") {
|
|
11640
|
+
return $Expr2("Lambda", functorClauses.map(f)(m._1));
|
|
12019
11641
|
}
|
|
12020
|
-
if (
|
|
12021
|
-
return $
|
|
12022
|
-
"Inr",
|
|
12023
|
-
$Sum(
|
|
12024
|
-
"Inr",
|
|
12025
|
-
$Sum(
|
|
12026
|
-
"Inr",
|
|
12027
|
-
$Sum(
|
|
12028
|
-
"Inr",
|
|
12029
|
-
$Sum(
|
|
12030
|
-
"Inr",
|
|
12031
|
-
$Sum(
|
|
12032
|
-
"Inr",
|
|
12033
|
-
$Sum(
|
|
12034
|
-
"Inr",
|
|
12035
|
-
$Sum(
|
|
12036
|
-
"Inr",
|
|
12037
|
-
$Sum(
|
|
12038
|
-
"Inr",
|
|
12039
|
-
$Sum(
|
|
12040
|
-
"Inr",
|
|
12041
|
-
$Sum(
|
|
12042
|
-
"Inr",
|
|
12043
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
12044
|
-
)
|
|
12045
|
-
)
|
|
12046
|
-
)
|
|
12047
|
-
)
|
|
12048
|
-
)
|
|
12049
|
-
)
|
|
12050
|
-
)
|
|
12051
|
-
)
|
|
12052
|
-
)
|
|
12053
|
-
)
|
|
12054
|
-
);
|
|
11642
|
+
if (m.tag === "Project") {
|
|
11643
|
+
return $Expr2("Project", functorExpr2.map(f)(m._1), m._2);
|
|
12055
11644
|
}
|
|
12056
|
-
if (
|
|
12057
|
-
return $
|
|
12058
|
-
"Inr",
|
|
12059
|
-
$Sum(
|
|
12060
|
-
"Inr",
|
|
12061
|
-
$Sum(
|
|
12062
|
-
"Inr",
|
|
12063
|
-
$Sum(
|
|
12064
|
-
"Inr",
|
|
12065
|
-
$Sum(
|
|
12066
|
-
"Inr",
|
|
12067
|
-
$Sum(
|
|
12068
|
-
"Inr",
|
|
12069
|
-
$Sum(
|
|
12070
|
-
"Inr",
|
|
12071
|
-
$Sum(
|
|
12072
|
-
"Inr",
|
|
12073
|
-
$Sum(
|
|
12074
|
-
"Inr",
|
|
12075
|
-
$Sum(
|
|
12076
|
-
"Inr",
|
|
12077
|
-
$Sum(
|
|
12078
|
-
"Inr",
|
|
12079
|
-
$Sum(
|
|
12080
|
-
"Inr",
|
|
12081
|
-
$Sum(
|
|
12082
|
-
"Inr",
|
|
12083
|
-
$Sum("Inr", $Sum("Inl", $Product(x._1, $Product(x._2, x._3))))
|
|
12084
|
-
)
|
|
12085
|
-
)
|
|
12086
|
-
)
|
|
12087
|
-
)
|
|
12088
|
-
)
|
|
12089
|
-
)
|
|
12090
|
-
)
|
|
12091
|
-
)
|
|
12092
|
-
)
|
|
12093
|
-
)
|
|
12094
|
-
)
|
|
12095
|
-
)
|
|
12096
|
-
);
|
|
11645
|
+
if (m.tag === "DProject") {
|
|
11646
|
+
return $Expr2("DProject", functorExpr2.map(f)(m._1), functorExpr2.map(f)(m._2));
|
|
12097
11647
|
}
|
|
12098
|
-
if (
|
|
12099
|
-
return $
|
|
12100
|
-
"Inr",
|
|
12101
|
-
$Sum(
|
|
12102
|
-
"Inr",
|
|
12103
|
-
$Sum(
|
|
12104
|
-
"Inr",
|
|
12105
|
-
$Sum(
|
|
12106
|
-
"Inr",
|
|
12107
|
-
$Sum(
|
|
12108
|
-
"Inr",
|
|
12109
|
-
$Sum(
|
|
12110
|
-
"Inr",
|
|
12111
|
-
$Sum(
|
|
12112
|
-
"Inr",
|
|
12113
|
-
$Sum(
|
|
12114
|
-
"Inr",
|
|
12115
|
-
$Sum(
|
|
12116
|
-
"Inr",
|
|
12117
|
-
$Sum(
|
|
12118
|
-
"Inr",
|
|
12119
|
-
$Sum(
|
|
12120
|
-
"Inr",
|
|
12121
|
-
$Sum(
|
|
12122
|
-
"Inr",
|
|
12123
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inr", $Sum("Inl", x._1))))
|
|
12124
|
-
)
|
|
12125
|
-
)
|
|
12126
|
-
)
|
|
12127
|
-
)
|
|
12128
|
-
)
|
|
12129
|
-
)
|
|
12130
|
-
)
|
|
12131
|
-
)
|
|
12132
|
-
)
|
|
12133
|
-
)
|
|
12134
|
-
)
|
|
12135
|
-
);
|
|
11648
|
+
if (m.tag === "App") {
|
|
11649
|
+
return $Expr2("App", functorExpr2.map(f)(m._1), functorExpr2.map(f)(m._2));
|
|
12136
11650
|
}
|
|
12137
|
-
if (
|
|
12138
|
-
return $
|
|
12139
|
-
"Inr",
|
|
12140
|
-
$Sum(
|
|
12141
|
-
"Inr",
|
|
12142
|
-
$Sum(
|
|
12143
|
-
"Inr",
|
|
12144
|
-
$Sum(
|
|
12145
|
-
"Inr",
|
|
12146
|
-
$Sum(
|
|
12147
|
-
"Inr",
|
|
12148
|
-
$Sum(
|
|
12149
|
-
"Inr",
|
|
12150
|
-
$Sum(
|
|
12151
|
-
"Inr",
|
|
12152
|
-
$Sum(
|
|
12153
|
-
"Inr",
|
|
12154
|
-
$Sum(
|
|
12155
|
-
"Inr",
|
|
12156
|
-
$Sum(
|
|
12157
|
-
"Inr",
|
|
12158
|
-
$Sum(
|
|
12159
|
-
"Inr",
|
|
12160
|
-
$Sum(
|
|
12161
|
-
"Inr",
|
|
12162
|
-
$Sum(
|
|
12163
|
-
"Inr",
|
|
12164
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inr", $Sum("Inl", x._1))))
|
|
12165
|
-
)
|
|
12166
|
-
)
|
|
12167
|
-
)
|
|
12168
|
-
)
|
|
12169
|
-
)
|
|
12170
|
-
)
|
|
12171
|
-
)
|
|
12172
|
-
)
|
|
12173
|
-
)
|
|
12174
|
-
)
|
|
12175
|
-
)
|
|
12176
|
-
)
|
|
12177
|
-
);
|
|
12178
|
-
}
|
|
12179
|
-
if (x.tag === "ListNonEmpty") {
|
|
12180
|
-
return $Sum(
|
|
12181
|
-
"Inr",
|
|
12182
|
-
$Sum(
|
|
12183
|
-
"Inr",
|
|
12184
|
-
$Sum(
|
|
12185
|
-
"Inr",
|
|
12186
|
-
$Sum(
|
|
12187
|
-
"Inr",
|
|
12188
|
-
$Sum(
|
|
12189
|
-
"Inr",
|
|
12190
|
-
$Sum(
|
|
12191
|
-
"Inr",
|
|
12192
|
-
$Sum(
|
|
12193
|
-
"Inr",
|
|
12194
|
-
$Sum(
|
|
12195
|
-
"Inr",
|
|
12196
|
-
$Sum(
|
|
12197
|
-
"Inr",
|
|
12198
|
-
$Sum(
|
|
12199
|
-
"Inr",
|
|
12200
|
-
$Sum(
|
|
12201
|
-
"Inr",
|
|
12202
|
-
$Sum(
|
|
12203
|
-
"Inr",
|
|
12204
|
-
$Sum(
|
|
12205
|
-
"Inr",
|
|
12206
|
-
$Sum(
|
|
12207
|
-
"Inr",
|
|
12208
|
-
$Sum(
|
|
12209
|
-
"Inr",
|
|
12210
|
-
$Sum(
|
|
12211
|
-
"Inr",
|
|
12212
|
-
$Sum("Inr", $Sum("Inl", $Product(x._1, $Product(x._2, x._3))))
|
|
12213
|
-
)
|
|
12214
|
-
)
|
|
12215
|
-
)
|
|
12216
|
-
)
|
|
12217
|
-
)
|
|
12218
|
-
)
|
|
12219
|
-
)
|
|
12220
|
-
)
|
|
12221
|
-
)
|
|
12222
|
-
)
|
|
12223
|
-
)
|
|
12224
|
-
)
|
|
12225
|
-
)
|
|
12226
|
-
)
|
|
12227
|
-
)
|
|
12228
|
-
);
|
|
12229
|
-
}
|
|
12230
|
-
if (x.tag === "ListEnum") {
|
|
12231
|
-
return $Sum(
|
|
12232
|
-
"Inr",
|
|
12233
|
-
$Sum(
|
|
12234
|
-
"Inr",
|
|
12235
|
-
$Sum(
|
|
12236
|
-
"Inr",
|
|
12237
|
-
$Sum(
|
|
12238
|
-
"Inr",
|
|
12239
|
-
$Sum(
|
|
12240
|
-
"Inr",
|
|
12241
|
-
$Sum(
|
|
12242
|
-
"Inr",
|
|
12243
|
-
$Sum(
|
|
12244
|
-
"Inr",
|
|
12245
|
-
$Sum(
|
|
12246
|
-
"Inr",
|
|
12247
|
-
$Sum(
|
|
12248
|
-
"Inr",
|
|
12249
|
-
$Sum(
|
|
12250
|
-
"Inr",
|
|
12251
|
-
$Sum(
|
|
12252
|
-
"Inr",
|
|
12253
|
-
$Sum(
|
|
12254
|
-
"Inr",
|
|
12255
|
-
$Sum(
|
|
12256
|
-
"Inr",
|
|
12257
|
-
$Sum(
|
|
12258
|
-
"Inr",
|
|
12259
|
-
$Sum(
|
|
12260
|
-
"Inr",
|
|
12261
|
-
$Sum(
|
|
12262
|
-
"Inr",
|
|
12263
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
12264
|
-
)
|
|
12265
|
-
)
|
|
12266
|
-
)
|
|
12267
|
-
)
|
|
12268
|
-
)
|
|
12269
|
-
)
|
|
12270
|
-
)
|
|
12271
|
-
)
|
|
12272
|
-
)
|
|
12273
|
-
)
|
|
12274
|
-
)
|
|
12275
|
-
)
|
|
12276
|
-
)
|
|
12277
|
-
)
|
|
12278
|
-
)
|
|
12279
|
-
);
|
|
12280
|
-
}
|
|
12281
|
-
if (x.tag === "ListComp") {
|
|
12282
|
-
return $Sum(
|
|
12283
|
-
"Inr",
|
|
12284
|
-
$Sum(
|
|
12285
|
-
"Inr",
|
|
12286
|
-
$Sum(
|
|
12287
|
-
"Inr",
|
|
12288
|
-
$Sum(
|
|
12289
|
-
"Inr",
|
|
12290
|
-
$Sum(
|
|
12291
|
-
"Inr",
|
|
12292
|
-
$Sum(
|
|
12293
|
-
"Inr",
|
|
12294
|
-
$Sum(
|
|
12295
|
-
"Inr",
|
|
12296
|
-
$Sum(
|
|
12297
|
-
"Inr",
|
|
12298
|
-
$Sum(
|
|
12299
|
-
"Inr",
|
|
12300
|
-
$Sum(
|
|
12301
|
-
"Inr",
|
|
12302
|
-
$Sum(
|
|
12303
|
-
"Inr",
|
|
12304
|
-
$Sum(
|
|
12305
|
-
"Inr",
|
|
12306
|
-
$Sum(
|
|
12307
|
-
"Inr",
|
|
12308
|
-
$Sum(
|
|
12309
|
-
"Inr",
|
|
12310
|
-
$Sum(
|
|
12311
|
-
"Inr",
|
|
12312
|
-
$Sum(
|
|
12313
|
-
"Inr",
|
|
12314
|
-
$Sum(
|
|
12315
|
-
"Inr",
|
|
12316
|
-
$Sum(
|
|
12317
|
-
"Inr",
|
|
12318
|
-
$Sum("Inr", $Sum("Inl", $Product(x._1, $Product(x._2, x._3))))
|
|
12319
|
-
)
|
|
12320
|
-
)
|
|
12321
|
-
)
|
|
12322
|
-
)
|
|
12323
|
-
)
|
|
12324
|
-
)
|
|
12325
|
-
)
|
|
12326
|
-
)
|
|
12327
|
-
)
|
|
12328
|
-
)
|
|
12329
|
-
)
|
|
12330
|
-
)
|
|
12331
|
-
)
|
|
12332
|
-
)
|
|
12333
|
-
)
|
|
12334
|
-
)
|
|
12335
|
-
)
|
|
12336
|
-
);
|
|
12337
|
-
}
|
|
12338
|
-
if (x.tag === "Let") {
|
|
12339
|
-
return $Sum(
|
|
12340
|
-
"Inr",
|
|
12341
|
-
$Sum(
|
|
12342
|
-
"Inr",
|
|
12343
|
-
$Sum(
|
|
12344
|
-
"Inr",
|
|
12345
|
-
$Sum(
|
|
12346
|
-
"Inr",
|
|
12347
|
-
$Sum(
|
|
12348
|
-
"Inr",
|
|
12349
|
-
$Sum(
|
|
12350
|
-
"Inr",
|
|
12351
|
-
$Sum(
|
|
12352
|
-
"Inr",
|
|
12353
|
-
$Sum(
|
|
12354
|
-
"Inr",
|
|
12355
|
-
$Sum(
|
|
12356
|
-
"Inr",
|
|
12357
|
-
$Sum(
|
|
12358
|
-
"Inr",
|
|
12359
|
-
$Sum(
|
|
12360
|
-
"Inr",
|
|
12361
|
-
$Sum(
|
|
12362
|
-
"Inr",
|
|
12363
|
-
$Sum(
|
|
12364
|
-
"Inr",
|
|
12365
|
-
$Sum(
|
|
12366
|
-
"Inr",
|
|
12367
|
-
$Sum(
|
|
12368
|
-
"Inr",
|
|
12369
|
-
$Sum(
|
|
12370
|
-
"Inr",
|
|
12371
|
-
$Sum(
|
|
12372
|
-
"Inr",
|
|
12373
|
-
$Sum(
|
|
12374
|
-
"Inr",
|
|
12375
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
12376
|
-
)
|
|
12377
|
-
)
|
|
12378
|
-
)
|
|
12379
|
-
)
|
|
12380
|
-
)
|
|
12381
|
-
)
|
|
12382
|
-
)
|
|
12383
|
-
)
|
|
12384
|
-
)
|
|
12385
|
-
)
|
|
12386
|
-
)
|
|
12387
|
-
)
|
|
12388
|
-
)
|
|
12389
|
-
)
|
|
12390
|
-
)
|
|
12391
|
-
)
|
|
12392
|
-
)
|
|
12393
|
-
);
|
|
12394
|
-
}
|
|
12395
|
-
if (x.tag === "LetRec") {
|
|
12396
|
-
return $Sum(
|
|
12397
|
-
"Inr",
|
|
12398
|
-
$Sum(
|
|
12399
|
-
"Inr",
|
|
12400
|
-
$Sum(
|
|
12401
|
-
"Inr",
|
|
12402
|
-
$Sum(
|
|
12403
|
-
"Inr",
|
|
12404
|
-
$Sum(
|
|
12405
|
-
"Inr",
|
|
12406
|
-
$Sum(
|
|
12407
|
-
"Inr",
|
|
12408
|
-
$Sum(
|
|
12409
|
-
"Inr",
|
|
12410
|
-
$Sum(
|
|
12411
|
-
"Inr",
|
|
12412
|
-
$Sum(
|
|
12413
|
-
"Inr",
|
|
12414
|
-
$Sum(
|
|
12415
|
-
"Inr",
|
|
12416
|
-
$Sum(
|
|
12417
|
-
"Inr",
|
|
12418
|
-
$Sum(
|
|
12419
|
-
"Inr",
|
|
12420
|
-
$Sum(
|
|
12421
|
-
"Inr",
|
|
12422
|
-
$Sum(
|
|
12423
|
-
"Inr",
|
|
12424
|
-
$Sum(
|
|
12425
|
-
"Inr",
|
|
12426
|
-
$Sum(
|
|
12427
|
-
"Inr",
|
|
12428
|
-
$Sum(
|
|
12429
|
-
"Inr",
|
|
12430
|
-
$Sum(
|
|
12431
|
-
"Inr",
|
|
12432
|
-
$Sum(
|
|
12433
|
-
"Inr",
|
|
12434
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inl", $Product(x._1, x._2))))
|
|
12435
|
-
)
|
|
12436
|
-
)
|
|
12437
|
-
)
|
|
12438
|
-
)
|
|
12439
|
-
)
|
|
12440
|
-
)
|
|
12441
|
-
)
|
|
12442
|
-
)
|
|
12443
|
-
)
|
|
12444
|
-
)
|
|
12445
|
-
)
|
|
12446
|
-
)
|
|
12447
|
-
)
|
|
12448
|
-
)
|
|
12449
|
-
)
|
|
12450
|
-
)
|
|
12451
|
-
)
|
|
12452
|
-
)
|
|
12453
|
-
);
|
|
12454
|
-
}
|
|
12455
|
-
if (x.tag === "DocExpr") {
|
|
12456
|
-
return $Sum(
|
|
12457
|
-
"Inr",
|
|
12458
|
-
$Sum(
|
|
12459
|
-
"Inr",
|
|
12460
|
-
$Sum(
|
|
12461
|
-
"Inr",
|
|
12462
|
-
$Sum(
|
|
12463
|
-
"Inr",
|
|
12464
|
-
$Sum(
|
|
12465
|
-
"Inr",
|
|
12466
|
-
$Sum(
|
|
12467
|
-
"Inr",
|
|
12468
|
-
$Sum(
|
|
12469
|
-
"Inr",
|
|
12470
|
-
$Sum(
|
|
12471
|
-
"Inr",
|
|
12472
|
-
$Sum(
|
|
12473
|
-
"Inr",
|
|
12474
|
-
$Sum(
|
|
12475
|
-
"Inr",
|
|
12476
|
-
$Sum(
|
|
12477
|
-
"Inr",
|
|
12478
|
-
$Sum(
|
|
12479
|
-
"Inr",
|
|
12480
|
-
$Sum(
|
|
12481
|
-
"Inr",
|
|
12482
|
-
$Sum(
|
|
12483
|
-
"Inr",
|
|
12484
|
-
$Sum(
|
|
12485
|
-
"Inr",
|
|
12486
|
-
$Sum(
|
|
12487
|
-
"Inr",
|
|
12488
|
-
$Sum(
|
|
12489
|
-
"Inr",
|
|
12490
|
-
$Sum(
|
|
12491
|
-
"Inr",
|
|
12492
|
-
$Sum(
|
|
12493
|
-
"Inr",
|
|
12494
|
-
$Sum("Inr", $Sum("Inr", $Sum("Inr", $Product(x._1, x._2))))
|
|
12495
|
-
)
|
|
12496
|
-
)
|
|
12497
|
-
)
|
|
12498
|
-
)
|
|
12499
|
-
)
|
|
12500
|
-
)
|
|
12501
|
-
)
|
|
12502
|
-
)
|
|
12503
|
-
)
|
|
12504
|
-
)
|
|
12505
|
-
)
|
|
12506
|
-
)
|
|
12507
|
-
)
|
|
12508
|
-
)
|
|
12509
|
-
)
|
|
12510
|
-
)
|
|
12511
|
-
)
|
|
12512
|
-
)
|
|
12513
|
-
);
|
|
12514
|
-
}
|
|
12515
|
-
fail();
|
|
12516
|
-
}
|
|
12517
|
-
};
|
|
12518
|
-
var showVarDef = (dictShow) => ({
|
|
12519
|
-
show: (c) => genericShowConstructor(genericShowArgsProduct({ genericShowArgs: (v) => [showPattern1.show(v)] })((() => {
|
|
12520
|
-
const $0 = showExpr(dictShow);
|
|
12521
|
-
return { genericShowArgs: (v) => [$0.show(v)] };
|
|
12522
|
-
})()))(VarDefIsSymbol)["genericShow'"]($Product(c._1, c._2))
|
|
12523
|
-
});
|
|
12524
|
-
var showQualifier = (dictShow) => ({
|
|
12525
|
-
show: (c) => {
|
|
12526
|
-
const $0 = genericShowConstructor((() => {
|
|
12527
|
-
const $02 = showExpr(dictShow);
|
|
12528
|
-
return { genericShowArgs: (v) => [$02.show(v)] };
|
|
12529
|
-
})())(ListCompGuardIsSymbol);
|
|
12530
|
-
const $1 = genericShowConstructor(genericShowArgsProduct({ genericShowArgs: (v) => [showPattern1.show(v)] })((() => {
|
|
12531
|
-
const $12 = showExpr(dictShow);
|
|
12532
|
-
return { genericShowArgs: (v) => [$12.show(v)] };
|
|
12533
|
-
})()))(ListCompGenIsSymbol);
|
|
12534
|
-
const $2 = genericShowConstructor((() => {
|
|
12535
|
-
const $22 = showVarDef(dictShow);
|
|
12536
|
-
return { genericShowArgs: (v) => [$22.show(v)] };
|
|
12537
|
-
})())(ListCompDeclIsSymbol);
|
|
12538
|
-
if (c.tag === "ListCompGuard") {
|
|
12539
|
-
return $0["genericShow'"](c._1);
|
|
12540
|
-
}
|
|
12541
|
-
if (c.tag === "ListCompGen") {
|
|
12542
|
-
return $1["genericShow'"]($Product(c._1, c._2));
|
|
12543
|
-
}
|
|
12544
|
-
if (c.tag === "ListCompDecl") {
|
|
12545
|
-
return $2["genericShow'"](c._1);
|
|
12546
|
-
}
|
|
12547
|
-
fail();
|
|
12548
|
-
}
|
|
12549
|
-
});
|
|
12550
|
-
var showParagraphElem = (dictShow) => ({
|
|
12551
|
-
show: (c) => genericShowSum4(genericShowConstructor((() => {
|
|
12552
|
-
const $0 = showExpr(dictShow);
|
|
12553
|
-
return { genericShowArgs: (v) => [$0.show(v)] };
|
|
12554
|
-
})())(UnquoteIsSymbol))["genericShow'"]((() => {
|
|
12555
|
-
if (c.tag === "Token") {
|
|
12556
|
-
return $Sum("Inl", c._1);
|
|
12557
|
-
}
|
|
12558
|
-
if (c.tag === "Unquote") {
|
|
12559
|
-
return $Sum("Inr", c._1);
|
|
12560
|
-
}
|
|
12561
|
-
fail();
|
|
12562
|
-
})())
|
|
12563
|
-
});
|
|
12564
|
-
var showListRest = (dictShow) => {
|
|
12565
|
-
const genericShowArgsArgument3 = { genericShowArgs: (v) => [dictShow.show(v)] };
|
|
12566
|
-
const $0 = genericShowConstructor(genericShowArgsArgument3)(EndIsSymbol);
|
|
12567
|
-
return {
|
|
12568
|
-
show: (c) => {
|
|
12569
|
-
const $1 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsProduct((() => {
|
|
12570
|
-
const $12 = showExpr(dictShow);
|
|
12571
|
-
return { genericShowArgs: (v) => [$12.show(v)] };
|
|
12572
|
-
})())((() => {
|
|
12573
|
-
const $12 = showListRest(dictShow);
|
|
12574
|
-
return { genericShowArgs: (v) => [$12.show(v)] };
|
|
12575
|
-
})())))(NextIsSymbol);
|
|
12576
|
-
if (c.tag === "End") {
|
|
12577
|
-
return $0["genericShow'"](c._1);
|
|
12578
|
-
}
|
|
12579
|
-
if (c.tag === "Next") {
|
|
12580
|
-
return $1["genericShow'"]($Product(c._1, $Product(c._2, c._3)));
|
|
12581
|
-
}
|
|
12582
|
-
fail();
|
|
12583
|
-
}
|
|
12584
|
-
};
|
|
12585
|
-
};
|
|
12586
|
-
var showExpr = (dictShow) => {
|
|
12587
|
-
const genericShowArgsArgument3 = { genericShowArgs: (v) => [dictShow.show(v)] };
|
|
12588
|
-
const $0 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsArgument1))(IntIsSymbol);
|
|
12589
|
-
const $1 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsArgument2))(FloatIsSymbol);
|
|
12590
|
-
const $2 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsArgument))(StrIsSymbol);
|
|
12591
|
-
const $3 = genericShowConstructor(genericShowArgsArgument3)(ListEmptyIsSymbol);
|
|
12592
|
-
return {
|
|
12593
|
-
show: (c) => genericShowSum5(genericShowSum6((() => {
|
|
12594
|
-
const $4 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsProduct(genericShowArgsArgument)((() => {
|
|
12595
|
-
const $42 = showList(showExpr(dictShow));
|
|
12596
|
-
return { genericShowArgs: (v) => [$42.show(v)] };
|
|
12597
|
-
})())))(ConstrIsSymbol);
|
|
12598
|
-
const $5 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)((() => {
|
|
12599
|
-
const $52 = showList((() => {
|
|
12600
|
-
const $53 = showDictEntry(dictShow);
|
|
12601
|
-
const $62 = showExpr(dictShow);
|
|
12602
|
-
return { show: (v) => "(Tuple " + $53.show(v._1) + " " + $62.show(v._2) + ")" };
|
|
12603
|
-
})());
|
|
12604
|
-
return { genericShowArgs: (v) => [$52.show(v)] };
|
|
12605
|
-
})()))(DictionaryIsSymbol);
|
|
12606
|
-
const $6 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsProduct((() => {
|
|
12607
|
-
const $62 = showExpr(dictShow);
|
|
12608
|
-
return { genericShowArgs: (v) => [$62.show(v)] };
|
|
12609
|
-
})())(genericShowArgsProduct1((() => {
|
|
12610
|
-
const $62 = showExpr(dictShow);
|
|
12611
|
-
return { genericShowArgs: (v) => [$62.show(v)] };
|
|
12612
|
-
})()))))(MatrixIsSymbol);
|
|
12613
|
-
const $7 = genericShowConstructor((() => {
|
|
12614
|
-
const $72 = showClauses(dictShow);
|
|
12615
|
-
return { genericShowArgs: (v) => [$72.show(v)] };
|
|
12616
|
-
})())(LambdaIsSymbol);
|
|
12617
|
-
const $8 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12618
|
-
const $82 = showExpr(dictShow);
|
|
12619
|
-
return { genericShowArgs: (v) => [$82.show(v)] };
|
|
12620
|
-
})())(genericShowArgsArgument))(ProjectIsSymbol);
|
|
12621
|
-
const $9 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12622
|
-
const $92 = showExpr(dictShow);
|
|
12623
|
-
return { genericShowArgs: (v) => [$92.show(v)] };
|
|
12624
|
-
})())((() => {
|
|
12625
|
-
const $92 = showExpr(dictShow);
|
|
12626
|
-
return { genericShowArgs: (v) => [$92.show(v)] };
|
|
12627
|
-
})()))(DProjectIsSymbol);
|
|
12628
|
-
const $10 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12629
|
-
const $102 = showExpr(dictShow);
|
|
12630
|
-
return { genericShowArgs: (v) => [$102.show(v)] };
|
|
12631
|
-
})())((() => {
|
|
12632
|
-
const $102 = showExpr(dictShow);
|
|
12633
|
-
return { genericShowArgs: (v) => [$102.show(v)] };
|
|
12634
|
-
})()))(AppIsSymbol);
|
|
12635
|
-
const $11 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12636
|
-
const $112 = showExpr(dictShow);
|
|
12637
|
-
return { genericShowArgs: (v) => [$112.show(v)] };
|
|
12638
|
-
})())(genericShowArgsProduct(genericShowArgsArgument)((() => {
|
|
12639
|
-
const $112 = showExpr(dictShow);
|
|
12640
|
-
return { genericShowArgs: (v) => [$112.show(v)] };
|
|
12641
|
-
})())))(BinaryAppIsSymbol);
|
|
12642
|
-
const $12 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12643
|
-
const $122 = showExpr(dictShow);
|
|
12644
|
-
return { genericShowArgs: (v) => [$122.show(v)] };
|
|
12645
|
-
})())((() => {
|
|
12646
|
-
const $122 = showNonEmptyList(showTuple1(showExpr(dictShow)));
|
|
12647
|
-
return { genericShowArgs: (v) => [$122.show(v)] };
|
|
12648
|
-
})()))(MatchAsIsSymbol);
|
|
12649
|
-
const $13 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12650
|
-
const $132 = showExpr(dictShow);
|
|
12651
|
-
return { genericShowArgs: (v) => [$132.show(v)] };
|
|
12652
|
-
})())(genericShowArgsProduct((() => {
|
|
12653
|
-
const $132 = showExpr(dictShow);
|
|
12654
|
-
return { genericShowArgs: (v) => [$132.show(v)] };
|
|
12655
|
-
})())((() => {
|
|
12656
|
-
const $132 = showExpr(dictShow);
|
|
12657
|
-
return { genericShowArgs: (v) => [$132.show(v)] };
|
|
12658
|
-
})())))(IfElseIsSymbol);
|
|
12659
|
-
const $14 = genericShowConstructor((() => {
|
|
12660
|
-
const $142 = showList(showParagraphElem(dictShow));
|
|
12661
|
-
return { genericShowArgs: (v) => [$142.show(v)] };
|
|
12662
|
-
})())(ParagraphIsSymbol);
|
|
12663
|
-
const $15 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsProduct((() => {
|
|
12664
|
-
const $152 = showExpr(dictShow);
|
|
12665
|
-
return { genericShowArgs: (v) => [$152.show(v)] };
|
|
12666
|
-
})())((() => {
|
|
12667
|
-
const $152 = showListRest(dictShow);
|
|
12668
|
-
return { genericShowArgs: (v) => [$152.show(v)] };
|
|
12669
|
-
})())))(ListNonEmptyIsSymbol);
|
|
12670
|
-
const $16 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12671
|
-
const $162 = showExpr(dictShow);
|
|
12672
|
-
return { genericShowArgs: (v) => [$162.show(v)] };
|
|
12673
|
-
})())((() => {
|
|
12674
|
-
const $162 = showExpr(dictShow);
|
|
12675
|
-
return { genericShowArgs: (v) => [$162.show(v)] };
|
|
12676
|
-
})()))(ListEnumIsSymbol);
|
|
12677
|
-
const $17 = genericShowConstructor(genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsProduct((() => {
|
|
12678
|
-
const $172 = showExpr(dictShow);
|
|
12679
|
-
return { genericShowArgs: (v) => [$172.show(v)] };
|
|
12680
|
-
})())((() => {
|
|
12681
|
-
const $172 = showList(showQualifier(dictShow));
|
|
12682
|
-
return { genericShowArgs: (v) => [$172.show(v)] };
|
|
12683
|
-
})())))(ListCompIsSymbol);
|
|
12684
|
-
const $18 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12685
|
-
const $182 = showNonEmptyList(showVarDef(dictShow));
|
|
12686
|
-
return { genericShowArgs: (v) => [$182.show(v)] };
|
|
12687
|
-
})())((() => {
|
|
12688
|
-
const $182 = showExpr(dictShow);
|
|
12689
|
-
return { genericShowArgs: (v) => [$182.show(v)] };
|
|
12690
|
-
})()))(LetIsSymbol);
|
|
12691
|
-
const $19 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12692
|
-
const $192 = showNonEmptyList(showTuple(showClause(dictShow)));
|
|
12693
|
-
return { genericShowArgs: (v) => [$192.show(v)] };
|
|
12694
|
-
})())((() => {
|
|
12695
|
-
const $192 = showExpr(dictShow);
|
|
12696
|
-
return { genericShowArgs: (v) => [$192.show(v)] };
|
|
12697
|
-
})()))(LetRecIsSymbol);
|
|
12698
|
-
const $20 = genericShowConstructor(genericShowArgsProduct((() => {
|
|
12699
|
-
const $202 = showExpr(dictShow);
|
|
12700
|
-
return { genericShowArgs: (v) => [$202.show(v)] };
|
|
12701
|
-
})())((() => {
|
|
12702
|
-
const $202 = showExpr(dictShow);
|
|
12703
|
-
return { genericShowArgs: (v) => [$202.show(v)] };
|
|
12704
|
-
})()))(DocExprIsSymbol);
|
|
12705
|
-
return {
|
|
12706
|
-
"genericShow'": (v) => {
|
|
12707
|
-
if (v.tag === "Inl") {
|
|
12708
|
-
return $0["genericShow'"](v._1);
|
|
12709
|
-
}
|
|
12710
|
-
if (v.tag === "Inr") {
|
|
12711
|
-
if (v._1.tag === "Inl") {
|
|
12712
|
-
return $1["genericShow'"](v._1._1);
|
|
12713
|
-
}
|
|
12714
|
-
if (v._1.tag === "Inr") {
|
|
12715
|
-
if (v._1._1.tag === "Inl") {
|
|
12716
|
-
return $2["genericShow'"](v._1._1._1);
|
|
12717
|
-
}
|
|
12718
|
-
if (v._1._1.tag === "Inr") {
|
|
12719
|
-
if (v._1._1._1.tag === "Inl") {
|
|
12720
|
-
return $4["genericShow'"](v._1._1._1._1);
|
|
12721
|
-
}
|
|
12722
|
-
if (v._1._1._1.tag === "Inr") {
|
|
12723
|
-
if (v._1._1._1._1.tag === "Inl") {
|
|
12724
|
-
return $5["genericShow'"](v._1._1._1._1._1);
|
|
12725
|
-
}
|
|
12726
|
-
if (v._1._1._1._1.tag === "Inr") {
|
|
12727
|
-
if (v._1._1._1._1._1.tag === "Inl") {
|
|
12728
|
-
return $6["genericShow'"](v._1._1._1._1._1._1);
|
|
12729
|
-
}
|
|
12730
|
-
if (v._1._1._1._1._1.tag === "Inr") {
|
|
12731
|
-
if (v._1._1._1._1._1._1.tag === "Inl") {
|
|
12732
|
-
return $7["genericShow'"](v._1._1._1._1._1._1._1);
|
|
12733
|
-
}
|
|
12734
|
-
if (v._1._1._1._1._1._1.tag === "Inr") {
|
|
12735
|
-
if (v._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12736
|
-
return $8["genericShow'"](v._1._1._1._1._1._1._1._1);
|
|
12737
|
-
}
|
|
12738
|
-
if (v._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12739
|
-
if (v._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12740
|
-
return $9["genericShow'"](v._1._1._1._1._1._1._1._1._1);
|
|
12741
|
-
}
|
|
12742
|
-
if (v._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12743
|
-
if (v._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12744
|
-
return $10["genericShow'"](v._1._1._1._1._1._1._1._1._1._1);
|
|
12745
|
-
}
|
|
12746
|
-
if (v._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12747
|
-
if (v._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12748
|
-
return $11["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1);
|
|
12749
|
-
}
|
|
12750
|
-
if (v._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12751
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12752
|
-
return $12["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12753
|
-
}
|
|
12754
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12755
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12756
|
-
return $13["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12757
|
-
}
|
|
12758
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12759
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12760
|
-
return $14["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12761
|
-
}
|
|
12762
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12763
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12764
|
-
return $3["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12765
|
-
}
|
|
12766
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12767
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12768
|
-
return $15["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12769
|
-
}
|
|
12770
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12771
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12772
|
-
return $16["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12773
|
-
}
|
|
12774
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12775
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12776
|
-
return $17["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12777
|
-
}
|
|
12778
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12779
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12780
|
-
return $18["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12781
|
-
}
|
|
12782
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12783
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
12784
|
-
return $19["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12785
|
-
}
|
|
12786
|
-
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
12787
|
-
return $20["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
12788
|
-
}
|
|
12789
|
-
}
|
|
12790
|
-
}
|
|
12791
|
-
}
|
|
12792
|
-
}
|
|
12793
|
-
}
|
|
12794
|
-
}
|
|
12795
|
-
}
|
|
12796
|
-
}
|
|
12797
|
-
}
|
|
12798
|
-
}
|
|
12799
|
-
}
|
|
12800
|
-
}
|
|
12801
|
-
}
|
|
12802
|
-
}
|
|
12803
|
-
}
|
|
12804
|
-
}
|
|
12805
|
-
}
|
|
12806
|
-
}
|
|
12807
|
-
}
|
|
12808
|
-
fail();
|
|
12809
|
-
}
|
|
12810
|
-
};
|
|
12811
|
-
})()))["genericShow'"](genericExpr_.from(c))
|
|
12812
|
-
};
|
|
12813
|
-
};
|
|
12814
|
-
var showDictEntry = (dictShow) => {
|
|
12815
|
-
const genericShowConstructor2 = genericShowConstructor(genericShowArgsProduct({ genericShowArgs: (v) => [dictShow.show(v)] })(genericShowArgsArgument))(VarKeyIsSymbol);
|
|
12816
|
-
return {
|
|
12817
|
-
show: (c) => {
|
|
12818
|
-
const $0 = genericShowConstructor((() => {
|
|
12819
|
-
const $02 = showExpr(dictShow);
|
|
12820
|
-
return { genericShowArgs: (v) => [$02.show(v)] };
|
|
12821
|
-
})())(ExprKeyIsSymbol);
|
|
12822
|
-
if (c.tag === "ExprKey") {
|
|
12823
|
-
return $0["genericShow'"](c._1);
|
|
12824
|
-
}
|
|
12825
|
-
if (c.tag === "VarKey") {
|
|
12826
|
-
return genericShowConstructor2["genericShow'"]($Product(c._1, c._2));
|
|
12827
|
-
}
|
|
12828
|
-
fail();
|
|
12829
|
-
}
|
|
12830
|
-
};
|
|
12831
|
-
};
|
|
12832
|
-
var showClauses = (dictShow) => ({
|
|
12833
|
-
show: (c) => genericShowConstructor((() => {
|
|
12834
|
-
const $0 = showNonEmptyList(showClause(dictShow));
|
|
12835
|
-
return { genericShowArgs: (v) => [$0.show(v)] };
|
|
12836
|
-
})())(ClausesIsSymbol)["genericShow'"](c)
|
|
12837
|
-
});
|
|
12838
|
-
var showClause = (dictShow) => ({
|
|
12839
|
-
show: (c) => genericShowConstructor((() => {
|
|
12840
|
-
const $0 = showTuple2(showExpr(dictShow));
|
|
12841
|
-
return { genericShowArgs: (v) => [$0.show(v)] };
|
|
12842
|
-
})())(ClauseIsSymbol)["genericShow'"](c)
|
|
12843
|
-
});
|
|
12844
|
-
var show2 = /* @__PURE__ */ (() => showExpr(showUnit).show)();
|
|
12845
|
-
var functorVarDef2 = { map: (f) => (m) => $VarDef2(m._1, functorExpr2.map(f)(m._2)) };
|
|
12846
|
-
var functorQualifier = {
|
|
12847
|
-
map: (f) => (m) => {
|
|
12848
|
-
if (m.tag === "ListCompGuard") {
|
|
12849
|
-
return $Qualifier("ListCompGuard", functorExpr2.map(f)(m._1));
|
|
12850
|
-
}
|
|
12851
|
-
if (m.tag === "ListCompGen") {
|
|
12852
|
-
return $Qualifier("ListCompGen", m._1, functorExpr2.map(f)(m._2));
|
|
12853
|
-
}
|
|
12854
|
-
if (m.tag === "ListCompDecl") {
|
|
12855
|
-
return $Qualifier("ListCompDecl", $VarDef2(m._1._1, functorExpr2.map(f)(m._1._2)));
|
|
12856
|
-
}
|
|
12857
|
-
fail();
|
|
12858
|
-
}
|
|
12859
|
-
};
|
|
12860
|
-
var functorParagraphElem = {
|
|
12861
|
-
map: (f) => (m) => {
|
|
12862
|
-
if (m.tag === "Token") {
|
|
12863
|
-
return $ParagraphElem("Token", m._1);
|
|
12864
|
-
}
|
|
12865
|
-
if (m.tag === "Unquote") {
|
|
12866
|
-
return $ParagraphElem("Unquote", functorExpr2.map(f)(m._1));
|
|
12867
|
-
}
|
|
12868
|
-
fail();
|
|
12869
|
-
}
|
|
12870
|
-
};
|
|
12871
|
-
var functorListRest = {
|
|
12872
|
-
map: (f) => (m) => {
|
|
12873
|
-
if (m.tag === "End") {
|
|
12874
|
-
return $ListRest("End", f(m._1));
|
|
12875
|
-
}
|
|
12876
|
-
if (m.tag === "Next") {
|
|
12877
|
-
return $ListRest("Next", f(m._1), functorExpr2.map(f)(m._2), functorListRest.map(f)(m._3));
|
|
12878
|
-
}
|
|
12879
|
-
fail();
|
|
12880
|
-
}
|
|
12881
|
-
};
|
|
12882
|
-
var functorExpr2 = {
|
|
12883
|
-
map: (f) => (m) => {
|
|
12884
|
-
if (m.tag === "Var") {
|
|
12885
|
-
return $Expr2("Var", m._1);
|
|
12886
|
-
}
|
|
12887
|
-
if (m.tag === "Op") {
|
|
12888
|
-
return $Expr2("Op", m._1);
|
|
12889
|
-
}
|
|
12890
|
-
if (m.tag === "Int") {
|
|
12891
|
-
return $Expr2("Int", f(m._1), m._2);
|
|
12892
|
-
}
|
|
12893
|
-
if (m.tag === "Float") {
|
|
12894
|
-
return $Expr2("Float", f(m._1), m._2);
|
|
12895
|
-
}
|
|
12896
|
-
if (m.tag === "Str") {
|
|
12897
|
-
return $Expr2("Str", f(m._1), m._2);
|
|
12898
|
-
}
|
|
12899
|
-
if (m.tag === "Constr") {
|
|
12900
|
-
return $Expr2("Constr", f(m._1), m._2, listMap(functorExpr2.map(f))(m._3));
|
|
12901
|
-
}
|
|
12902
|
-
if (m.tag === "Dictionary") {
|
|
12903
|
-
return $Expr2(
|
|
12904
|
-
"Dictionary",
|
|
12905
|
-
f(m._1),
|
|
12906
|
-
listMap((() => {
|
|
12907
|
-
const $0 = functorDictEntry.map(f);
|
|
12908
|
-
const $1 = functorExpr2.map(f);
|
|
12909
|
-
return (v) => $Tuple($0(v._1), $1(v._2));
|
|
12910
|
-
})())(m._2)
|
|
12911
|
-
);
|
|
12912
|
-
}
|
|
12913
|
-
if (m.tag === "Matrix") {
|
|
12914
|
-
return $Expr2("Matrix", f(m._1), functorExpr2.map(f)(m._2), m._3, functorExpr2.map(f)(m._4));
|
|
12915
|
-
}
|
|
12916
|
-
if (m.tag === "Lambda") {
|
|
12917
|
-
return $Expr2("Lambda", functorClauses.map(f)(m._1));
|
|
12918
|
-
}
|
|
12919
|
-
if (m.tag === "Project") {
|
|
12920
|
-
return $Expr2("Project", functorExpr2.map(f)(m._1), m._2);
|
|
12921
|
-
}
|
|
12922
|
-
if (m.tag === "DProject") {
|
|
12923
|
-
return $Expr2("DProject", functorExpr2.map(f)(m._1), functorExpr2.map(f)(m._2));
|
|
12924
|
-
}
|
|
12925
|
-
if (m.tag === "App") {
|
|
12926
|
-
return $Expr2("App", functorExpr2.map(f)(m._1), functorExpr2.map(f)(m._2));
|
|
12927
|
-
}
|
|
12928
|
-
if (m.tag === "BinaryApp") {
|
|
12929
|
-
return $Expr2("BinaryApp", functorExpr2.map(f)(m._1), m._2, functorExpr2.map(f)(m._3));
|
|
11651
|
+
if (m.tag === "BinaryApp") {
|
|
11652
|
+
return $Expr2("BinaryApp", functorExpr2.map(f)(m._1), m._2, functorExpr2.map(f)(m._3));
|
|
12930
11653
|
}
|
|
12931
11654
|
if (m.tag === "MatchAs") {
|
|
12932
11655
|
return $Expr2(
|
|
@@ -12939,7 +11662,15 @@ var functorExpr2 = {
|
|
|
12939
11662
|
);
|
|
12940
11663
|
}
|
|
12941
11664
|
if (m.tag === "IfElse") {
|
|
12942
|
-
return $Expr2(
|
|
11665
|
+
return $Expr2(
|
|
11666
|
+
"IfElse",
|
|
11667
|
+
(() => {
|
|
11668
|
+
const $0 = functorExpr2.map(f);
|
|
11669
|
+
const $1 = functorExpr2.map(f);
|
|
11670
|
+
return $NonEmpty($Tuple($0(m._1._1._1), $1(m._1._1._2)), listMap((v) => $Tuple($0(v._1), $1(v._2)))(m._1._2));
|
|
11671
|
+
})(),
|
|
11672
|
+
functorExpr2.map(f)(m._2)
|
|
11673
|
+
);
|
|
12943
11674
|
}
|
|
12944
11675
|
if (m.tag === "Paragraph") {
|
|
12945
11676
|
return $Expr2("Paragraph", listMap(functorParagraphElem.map(f))(m._1));
|
|
@@ -14212,7 +12943,7 @@ var listCompFwd = (dictMonadError) => {
|
|
|
14212
12943
|
);
|
|
14213
12944
|
})()))((\u03C3) => Functor0.map(App2($Expr(
|
|
14214
12945
|
"App",
|
|
14215
|
-
$Expr("Var", "
|
|
12946
|
+
$Expr("Var", "concat_map"),
|
|
14216
12947
|
$Expr("Lambda", $1, \u03C3.tag === "ContElim" ? \u03C3._1 : throwException(error("Eliminator expected"))())
|
|
14217
12948
|
)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())($0)));
|
|
14218
12949
|
}
|
|
@@ -14272,7 +13003,7 @@ var listCompBwd = (dictBoundedJoinSemilattice) => {
|
|
|
14272
13003
|
}
|
|
14273
13004
|
return throwException(error("absurd"))();
|
|
14274
13005
|
}
|
|
14275
|
-
if (v._1.tag === "App" && v._1._1.tag === "Var" && v._1._1._1 === "
|
|
13006
|
+
if (v._1.tag === "App" && v._1._1.tag === "Var" && v._1._1._1 === "concat_map" && v._1._2.tag === "Lambda" && v1._1._1.tag === "ListCompGen") {
|
|
14276
13007
|
const $2 = orElseBwd1($Tuple(
|
|
14277
13008
|
$List("Cons", $Either("Left", v1._1._1._1), Nil),
|
|
14278
13009
|
$Expr2("ListComp", void 0, v1._2, v1._1._2)
|
|
@@ -14315,6 +13046,73 @@ var listCompBwd = (dictBoundedJoinSemilattice) => {
|
|
|
14315
13046
|
return throwException(error("absurd"))();
|
|
14316
13047
|
};
|
|
14317
13048
|
};
|
|
13049
|
+
var ifElseFwd = (dictBoundedLattice) => {
|
|
13050
|
+
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
13051
|
+
return (dictMonadError) => {
|
|
13052
|
+
const Apply0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0();
|
|
13053
|
+
const $0 = Apply0.Functor0();
|
|
13054
|
+
return (v) => {
|
|
13055
|
+
const $1 = (v1, e3) => Apply0.apply($0.map(App2)($0.map(Lambda(top))(Apply0.apply($0.map(elimBool)($0.map(ContExpr)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v1._2))))($0.map(ContExpr)(e3)))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v1._1));
|
|
13056
|
+
return $1(
|
|
13057
|
+
v._1._1,
|
|
13058
|
+
foldableList.foldr(($2) => ($3) => $1($2, $3))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2))(v._1._2)
|
|
13059
|
+
);
|
|
13060
|
+
};
|
|
13061
|
+
};
|
|
13062
|
+
};
|
|
13063
|
+
var ifElseBwd = (dictBoundedJoinSemilattice) => {
|
|
13064
|
+
const botOf = functorExpr2.map((() => {
|
|
13065
|
+
const $0 = dictBoundedJoinSemilattice.bot;
|
|
13066
|
+
return (v) => $0;
|
|
13067
|
+
})());
|
|
13068
|
+
return (v) => (v1) => {
|
|
13069
|
+
if (v.tag === "App" && v._1.tag === "Lambda" && v._1._2.tag === "ElimConstr") {
|
|
13070
|
+
const $0 = v._1._2._1;
|
|
13071
|
+
const bwdWhen = (c) => {
|
|
13072
|
+
if (Object.hasOwn($0, c)) {
|
|
13073
|
+
return exprBwd(dictBoundedJoinSemilattice)((() => {
|
|
13074
|
+
const $1 = $$get(showString)(mapDictString)(c)($0);
|
|
13075
|
+
if ($1.tag === "ContExpr") {
|
|
13076
|
+
return $1._1;
|
|
13077
|
+
}
|
|
13078
|
+
return throwException(error("Expression expected"))();
|
|
13079
|
+
})());
|
|
13080
|
+
}
|
|
13081
|
+
return botOf;
|
|
13082
|
+
};
|
|
13083
|
+
if (v1._1._2.tag === "Nil") {
|
|
13084
|
+
return $Tuple(
|
|
13085
|
+
nonEmptyListNonEmptyList.nonEmpty($List(
|
|
13086
|
+
"Cons",
|
|
13087
|
+
$Tuple(exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1), bwdWhen("True")(v1._1._1._2)),
|
|
13088
|
+
Nil
|
|
13089
|
+
)),
|
|
13090
|
+
bwdWhen("False")(v1._2)
|
|
13091
|
+
);
|
|
13092
|
+
}
|
|
13093
|
+
const v3 = bwdWhen("False")($Expr2("IfElse", nonEmptyListNonEmptyList.nonEmpty(v1._1._2), v1._2));
|
|
13094
|
+
if (v3.tag === "IfElse") {
|
|
13095
|
+
return $Tuple(
|
|
13096
|
+
nonEmptyListNonEmptyList.nonEmpty($List(
|
|
13097
|
+
"Cons",
|
|
13098
|
+
$Tuple(exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1), bwdWhen("True")(v1._1._1._2)),
|
|
13099
|
+
$List("Cons", v3._1._1, v3._1._2)
|
|
13100
|
+
)),
|
|
13101
|
+
v3._2
|
|
13102
|
+
);
|
|
13103
|
+
}
|
|
13104
|
+
return $Tuple(
|
|
13105
|
+
nonEmptyListNonEmptyList.nonEmpty($List(
|
|
13106
|
+
"Cons",
|
|
13107
|
+
$Tuple(exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1), bwdWhen("True")(v1._1._1._2)),
|
|
13108
|
+
throwException(error("absurd"))()._1
|
|
13109
|
+
)),
|
|
13110
|
+
throwException(error("absurd"))()._2
|
|
13111
|
+
);
|
|
13112
|
+
}
|
|
13113
|
+
return throwException(error("absurd"))();
|
|
13114
|
+
};
|
|
13115
|
+
};
|
|
14318
13116
|
var exprFwd = (dictBoundedLattice) => {
|
|
14319
13117
|
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
14320
13118
|
const JoinSemilattice0 = dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0();
|
|
@@ -14401,8 +13199,7 @@ var exprFwd = (dictBoundedLattice) => {
|
|
|
14401
13199
|
return Functor0.map(Lambda(top))(desugarableClausesElim.desug(dictMonadError)(dictBoundedLattice)(v._1));
|
|
14402
13200
|
}
|
|
14403
13201
|
if (v.tag === "Project") {
|
|
14404
|
-
|
|
14405
|
-
return Functor0.map((f) => f($0))(Functor0.map(Project)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1)));
|
|
13202
|
+
return Functor0.map((f) => f($Expr("Str", top, v._2)))(Functor0.map(DProject)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1)));
|
|
14406
13203
|
}
|
|
14407
13204
|
if (v.tag === "DProject") {
|
|
14408
13205
|
return Apply0.apply(Functor0.map(DProject)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
@@ -14420,7 +13217,7 @@ var exprFwd = (dictBoundedLattice) => {
|
|
|
14420
13217
|
)))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1));
|
|
14421
13218
|
}
|
|
14422
13219
|
if (v.tag === "IfElse") {
|
|
14423
|
-
return
|
|
13220
|
+
return ifElseFwd(dictBoundedLattice)(dictMonadError)($Tuple(v._1, v._2));
|
|
14424
13221
|
}
|
|
14425
13222
|
if (v.tag === "Paragraph") {
|
|
14426
13223
|
return paragraphFwd(dictBoundedLattice)(dictMonadError)(v._1);
|
|
@@ -14433,7 +13230,11 @@ var exprFwd = (dictBoundedLattice) => {
|
|
|
14433
13230
|
return Apply0.apply(Functor0.map((e) => (e$p) => $Expr("Constr", $0, ":", $List("Cons", e, $List("Cons", e$p, Nil))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2)))(desugarableListRestExpr.desug(dictMonadError)(dictBoundedLattice)(v._3));
|
|
14434
13231
|
}
|
|
14435
13232
|
if (v.tag === "ListEnum") {
|
|
14436
|
-
return Apply0.apply(Functor0.map(App2)(Functor0.map(App2($Expr("Var", "
|
|
13233
|
+
return Apply0.apply(Functor0.map(App2)(Functor0.map(App2($Expr("Var", "range")))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1))))(Functor0.map((f) => f($Expr(
|
|
13234
|
+
"Int",
|
|
13235
|
+
top,
|
|
13236
|
+
1
|
|
13237
|
+
)))(Functor0.map(App2)(Functor0.map(App2($Expr("Op", "+")))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2)))));
|
|
14437
13238
|
}
|
|
14438
13239
|
if (v.tag === "ListComp") {
|
|
14439
13240
|
if (v._3.tag === "Cons" && v._3._1.tag === "ListCompGen") {
|
|
@@ -14462,339 +13263,314 @@ var exprFwd = (dictBoundedLattice) => {
|
|
|
14462
13263
|
};
|
|
14463
13264
|
};
|
|
14464
13265
|
};
|
|
14465
|
-
var exprBwd = (dictBoundedJoinSemilattice) => {
|
|
14466
|
-
const $0 =
|
|
14467
|
-
const
|
|
14468
|
-
return (
|
|
14469
|
-
}
|
|
14470
|
-
|
|
14471
|
-
const
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
return $Expr2("ListComp", v2._1, v2._2._2, v2._2._1);
|
|
14478
|
-
};
|
|
14479
|
-
if (v.tag === "Var") {
|
|
14480
|
-
if (v1.tag === "Var") {
|
|
14481
|
-
return $Expr2("Var", v1._1);
|
|
14482
|
-
}
|
|
14483
|
-
if (v1.tag === "ListComp") {
|
|
14484
|
-
return $2(v, v1._3, v1._2);
|
|
14485
|
-
}
|
|
14486
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13266
|
+
var exprBwd = (dictBoundedJoinSemilattice) => (v) => (v1) => {
|
|
13267
|
+
const $0 = (e, q, qs, s) => {
|
|
13268
|
+
const v2 = listCompBwd(dictBoundedJoinSemilattice)(e)($Tuple($List("Cons", q, qs), s));
|
|
13269
|
+
return $Expr2("ListComp", v2._1, v2._2._2, v2._2._1);
|
|
13270
|
+
};
|
|
13271
|
+
const $1 = (e, qs, s) => {
|
|
13272
|
+
const v2 = listCompBwd(dictBoundedJoinSemilattice)(e)($Tuple(qs, s));
|
|
13273
|
+
return $Expr2("ListComp", v2._1, v2._2._2, v2._2._1);
|
|
13274
|
+
};
|
|
13275
|
+
if (v.tag === "Var") {
|
|
13276
|
+
if (v1.tag === "Var") {
|
|
13277
|
+
return $Expr2("Var", v1._1);
|
|
14487
13278
|
}
|
|
14488
|
-
if (
|
|
14489
|
-
|
|
14490
|
-
return $Expr2("Op", v1._1);
|
|
14491
|
-
}
|
|
14492
|
-
if (v1.tag === "ListComp") {
|
|
14493
|
-
return $2(v, v1._3, v1._2);
|
|
14494
|
-
}
|
|
14495
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13279
|
+
if (v1.tag === "ListComp") {
|
|
13280
|
+
return $1(v, v1._3, v1._2);
|
|
14496
13281
|
}
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
return $2(v, v1._3, v1._2);
|
|
14503
|
-
}
|
|
14504
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13282
|
+
return throwException(error("absurd"))();
|
|
13283
|
+
}
|
|
13284
|
+
if (v.tag === "Op") {
|
|
13285
|
+
if (v1.tag === "Op") {
|
|
13286
|
+
return $Expr2("Op", v1._1);
|
|
14505
13287
|
}
|
|
14506
|
-
if (
|
|
14507
|
-
|
|
14508
|
-
return $Expr2("Float", v._1, v1._2);
|
|
14509
|
-
}
|
|
14510
|
-
if (v1.tag === "ListComp") {
|
|
14511
|
-
return $2(v, v1._3, v1._2);
|
|
14512
|
-
}
|
|
14513
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13288
|
+
if (v1.tag === "ListComp") {
|
|
13289
|
+
return $1(v, v1._3, v1._2);
|
|
14514
13290
|
}
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
return $2(v, v1._3, v1._2);
|
|
14521
|
-
}
|
|
14522
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13291
|
+
return throwException(error("absurd"))();
|
|
13292
|
+
}
|
|
13293
|
+
if (v.tag === "Int") {
|
|
13294
|
+
if (v1.tag === "Int") {
|
|
13295
|
+
return $Expr2("Int", v._1, v1._2);
|
|
14523
13296
|
}
|
|
14524
|
-
if (
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
13297
|
+
if (v1.tag === "ListComp") {
|
|
13298
|
+
return $1(v, v1._3, v1._2);
|
|
13299
|
+
}
|
|
13300
|
+
return throwException(error("absurd"))();
|
|
13301
|
+
}
|
|
13302
|
+
if (v.tag === "Float") {
|
|
13303
|
+
if (v1.tag === "Float") {
|
|
13304
|
+
return $Expr2("Float", v._1, v1._2);
|
|
13305
|
+
}
|
|
13306
|
+
if (v1.tag === "ListComp") {
|
|
13307
|
+
return $1(v, v1._3, v1._2);
|
|
13308
|
+
}
|
|
13309
|
+
return throwException(error("absurd"))();
|
|
13310
|
+
}
|
|
13311
|
+
if (v.tag === "Str") {
|
|
13312
|
+
if (v1.tag === "Str") {
|
|
13313
|
+
return $Expr2("Str", v._1, v1._2);
|
|
13314
|
+
}
|
|
13315
|
+
if (v1.tag === "ListComp") {
|
|
13316
|
+
return $1(v, v1._3, v1._2);
|
|
13317
|
+
}
|
|
13318
|
+
return throwException(error("absurd"))();
|
|
13319
|
+
}
|
|
13320
|
+
if (v.tag === "Constr") {
|
|
13321
|
+
if (v1.tag === "Constr") {
|
|
13322
|
+
return $Expr2(
|
|
13323
|
+
"Constr",
|
|
13324
|
+
v._1,
|
|
13325
|
+
v1._2,
|
|
13326
|
+
listMap((() => {
|
|
13327
|
+
const $2 = exprBwd(dictBoundedJoinSemilattice);
|
|
13328
|
+
return (v$1) => $2(v$1._1)(v$1._2);
|
|
13329
|
+
})())((() => {
|
|
13330
|
+
const go = (go$a0$copy) => (go$a1$copy) => (go$a2$copy) => {
|
|
13331
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
|
|
13332
|
+
while (go$c) {
|
|
13333
|
+
const v$1 = go$a0, v1$1 = go$a1, v2 = go$a2;
|
|
13334
|
+
if (v$1.tag === "Nil") {
|
|
13335
|
+
go$c = false;
|
|
13336
|
+
go$r = v2;
|
|
13337
|
+
continue;
|
|
14555
13338
|
}
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
|
|
14559
|
-
|
|
14560
|
-
while (go$1$c) {
|
|
14561
|
-
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
14562
|
-
if (v1$1.tag === "Nil") {
|
|
14563
|
-
go$1$c = false;
|
|
14564
|
-
go$1$r = v$1;
|
|
14565
|
-
continue;
|
|
14566
|
-
}
|
|
14567
|
-
if (v1$1.tag === "Cons") {
|
|
14568
|
-
go$1$a0 = $List("Cons", v1$1._1, v$1);
|
|
14569
|
-
go$1$a1 = v1$1._2;
|
|
14570
|
-
continue;
|
|
14571
|
-
}
|
|
14572
|
-
fail();
|
|
13339
|
+
if (v1$1.tag === "Nil") {
|
|
13340
|
+
go$c = false;
|
|
13341
|
+
go$r = v2;
|
|
13342
|
+
continue;
|
|
14573
13343
|
}
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
if (v._3._2.tag === "Nil") {
|
|
14582
|
-
if (v1.tag === "Paragraph") {
|
|
14583
|
-
if (v._2 === "Paragraph") {
|
|
14584
|
-
return $Expr2("Paragraph", paragraphElemsBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._1));
|
|
13344
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
13345
|
+
go$a0 = v$1._2;
|
|
13346
|
+
go$a1 = v1$1._2;
|
|
13347
|
+
go$a2 = $List("Cons", $Tuple(v$1._1, v1$1._1), v2);
|
|
13348
|
+
continue;
|
|
13349
|
+
}
|
|
13350
|
+
fail();
|
|
14585
13351
|
}
|
|
14586
|
-
return
|
|
14587
|
-
}
|
|
14588
|
-
|
|
14589
|
-
|
|
13352
|
+
return go$r;
|
|
13353
|
+
};
|
|
13354
|
+
const go$1 = (go$1$a0$copy) => (go$1$a1$copy) => {
|
|
13355
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
13356
|
+
while (go$1$c) {
|
|
13357
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
13358
|
+
if (v1$1.tag === "Nil") {
|
|
13359
|
+
go$1$c = false;
|
|
13360
|
+
go$1$r = v$1;
|
|
13361
|
+
continue;
|
|
13362
|
+
}
|
|
13363
|
+
if (v1$1.tag === "Cons") {
|
|
13364
|
+
go$1$a0 = $List("Cons", v1$1._1, v$1);
|
|
13365
|
+
go$1$a1 = v1$1._2;
|
|
13366
|
+
continue;
|
|
13367
|
+
}
|
|
13368
|
+
fail();
|
|
13369
|
+
}
|
|
13370
|
+
return go$1$r;
|
|
13371
|
+
};
|
|
13372
|
+
return go$1(Nil)(go(v._3)(v1._3)(Nil));
|
|
13373
|
+
})())
|
|
13374
|
+
);
|
|
13375
|
+
}
|
|
13376
|
+
if (v._3.tag === "Cons") {
|
|
13377
|
+
if (v._3._2.tag === "Nil") {
|
|
13378
|
+
if (v1.tag === "Paragraph") {
|
|
13379
|
+
if (v._2 === "Paragraph") {
|
|
13380
|
+
return $Expr2("Paragraph", paragraphElemsBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._1));
|
|
14590
13381
|
}
|
|
14591
|
-
return throwException(error("
|
|
14592
|
-
}
|
|
14593
|
-
if (v._3._2.tag === "Cons" && v._3._2._2.tag === "Nil" && v1.tag === "ListNonEmpty") {
|
|
14594
|
-
return $Expr2("ListNonEmpty", v._1, exprBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._2), desugarableListRestExpr.desugBwd(dictBoundedJoinSemilattice)(v._3._2._1)(v1._3));
|
|
13382
|
+
return throwException(error("absurd"))();
|
|
14595
13383
|
}
|
|
14596
13384
|
if (v1.tag === "ListComp") {
|
|
14597
|
-
return $
|
|
13385
|
+
return $1(v, v1._3, v1._2);
|
|
14598
13386
|
}
|
|
14599
|
-
return throwException(error("
|
|
13387
|
+
return throwException(error("absurd"))();
|
|
14600
13388
|
}
|
|
14601
|
-
if (v._3.tag === "Nil" && v1.tag === "
|
|
14602
|
-
return $Expr2("
|
|
13389
|
+
if (v._3._2.tag === "Cons" && v._3._2._2.tag === "Nil" && v1.tag === "ListNonEmpty") {
|
|
13390
|
+
return $Expr2("ListNonEmpty", v._1, exprBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._2), desugarableListRestExpr.desugBwd(dictBoundedJoinSemilattice)(v._3._2._1)(v1._3));
|
|
14603
13391
|
}
|
|
14604
13392
|
if (v1.tag === "ListComp") {
|
|
14605
|
-
return $
|
|
13393
|
+
return $1(v, v1._3, v1._2);
|
|
14606
13394
|
}
|
|
14607
|
-
return throwException(error("
|
|
13395
|
+
return throwException(error("absurd"))();
|
|
14608
13396
|
}
|
|
14609
|
-
if (v.tag === "
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
go$a1 = v1$1._2;
|
|
14632
|
-
go$a2 = $List(
|
|
14633
|
-
"Cons",
|
|
14634
|
-
$Tuple(
|
|
14635
|
-
desugarableDictEntryExpr.desugBwd(dictBoundedJoinSemilattice)(v$1._1._1)(v1$1._1._1),
|
|
14636
|
-
exprBwd(dictBoundedJoinSemilattice)(v$1._1._2)(v1$1._1._2)
|
|
14637
|
-
),
|
|
14638
|
-
v2
|
|
14639
|
-
);
|
|
14640
|
-
continue;
|
|
14641
|
-
}
|
|
14642
|
-
fail();
|
|
13397
|
+
if (v._3.tag === "Nil" && v1.tag === "ListEmpty") {
|
|
13398
|
+
return $Expr2("ListEmpty", v._1);
|
|
13399
|
+
}
|
|
13400
|
+
if (v1.tag === "ListComp") {
|
|
13401
|
+
return $1(v, v1._3, v1._2);
|
|
13402
|
+
}
|
|
13403
|
+
return throwException(error("absurd"))();
|
|
13404
|
+
}
|
|
13405
|
+
if (v.tag === "Dictionary") {
|
|
13406
|
+
if (v1.tag === "Dictionary") {
|
|
13407
|
+
return $Expr2(
|
|
13408
|
+
"Dictionary",
|
|
13409
|
+
v._1,
|
|
13410
|
+
(() => {
|
|
13411
|
+
const go = (go$a0$copy) => (go$a1$copy) => (go$a2$copy) => {
|
|
13412
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
|
|
13413
|
+
while (go$c) {
|
|
13414
|
+
const v$1 = go$a0, v1$1 = go$a1, v2 = go$a2;
|
|
13415
|
+
if (v$1.tag === "Nil") {
|
|
13416
|
+
go$c = false;
|
|
13417
|
+
go$r = v2;
|
|
13418
|
+
continue;
|
|
14643
13419
|
}
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
while (go$1$c) {
|
|
14649
|
-
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
14650
|
-
if (v1$1.tag === "Nil") {
|
|
14651
|
-
go$1$c = false;
|
|
14652
|
-
go$1$r = v$1;
|
|
14653
|
-
continue;
|
|
14654
|
-
}
|
|
14655
|
-
if (v1$1.tag === "Cons") {
|
|
14656
|
-
go$1$a0 = $List("Cons", v1$1._1, v$1);
|
|
14657
|
-
go$1$a1 = v1$1._2;
|
|
14658
|
-
continue;
|
|
14659
|
-
}
|
|
14660
|
-
fail();
|
|
13420
|
+
if (v1$1.tag === "Nil") {
|
|
13421
|
+
go$c = false;
|
|
13422
|
+
go$r = v2;
|
|
13423
|
+
continue;
|
|
14661
13424
|
}
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
13425
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
13426
|
+
go$a0 = v$1._2;
|
|
13427
|
+
go$a1 = v1$1._2;
|
|
13428
|
+
go$a2 = $List(
|
|
13429
|
+
"Cons",
|
|
13430
|
+
$Tuple(
|
|
13431
|
+
desugarableDictEntryExpr.desugBwd(dictBoundedJoinSemilattice)(v$1._1._1)(v1$1._1._1),
|
|
13432
|
+
exprBwd(dictBoundedJoinSemilattice)(v$1._1._2)(v1$1._1._2)
|
|
13433
|
+
),
|
|
13434
|
+
v2
|
|
13435
|
+
);
|
|
13436
|
+
continue;
|
|
13437
|
+
}
|
|
13438
|
+
fail();
|
|
13439
|
+
}
|
|
13440
|
+
return go$r;
|
|
13441
|
+
};
|
|
13442
|
+
const go$1 = (go$1$a0$copy) => (go$1$a1$copy) => {
|
|
13443
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
13444
|
+
while (go$1$c) {
|
|
13445
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
13446
|
+
if (v1$1.tag === "Nil") {
|
|
13447
|
+
go$1$c = false;
|
|
13448
|
+
go$1$r = v$1;
|
|
13449
|
+
continue;
|
|
13450
|
+
}
|
|
13451
|
+
if (v1$1.tag === "Cons") {
|
|
13452
|
+
go$1$a0 = $List("Cons", v1$1._1, v$1);
|
|
13453
|
+
go$1$a1 = v1$1._2;
|
|
13454
|
+
continue;
|
|
13455
|
+
}
|
|
13456
|
+
fail();
|
|
13457
|
+
}
|
|
13458
|
+
return go$1$r;
|
|
13459
|
+
};
|
|
13460
|
+
return go$1(Nil)(go(v._2)(v1._2)(Nil));
|
|
13461
|
+
})()
|
|
13462
|
+
);
|
|
14672
13463
|
}
|
|
14673
|
-
if (
|
|
14674
|
-
|
|
14675
|
-
return $Expr2("Matrix", v._1, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2), $Tuple(v1._3._1, v1._3._2), exprBwd(dictBoundedJoinSemilattice)(v._4)(v1._4));
|
|
14676
|
-
}
|
|
14677
|
-
if (v1.tag === "ListComp") {
|
|
14678
|
-
return $2(v, v1._3, v1._2);
|
|
14679
|
-
}
|
|
14680
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13464
|
+
if (v1.tag === "ListComp") {
|
|
13465
|
+
return $1(v, v1._3, v1._2);
|
|
14681
13466
|
}
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
return $2(v, v1._3, v1._2);
|
|
14688
|
-
}
|
|
14689
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13467
|
+
return throwException(error("absurd"))();
|
|
13468
|
+
}
|
|
13469
|
+
if (v.tag === "Matrix") {
|
|
13470
|
+
if (v1.tag === "Matrix") {
|
|
13471
|
+
return $Expr2("Matrix", v._1, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2), $Tuple(v1._3._1, v1._3._2), exprBwd(dictBoundedJoinSemilattice)(v._4)(v1._4));
|
|
14690
13472
|
}
|
|
14691
|
-
if (
|
|
14692
|
-
|
|
14693
|
-
return $Expr2("Project", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), v._2);
|
|
14694
|
-
}
|
|
14695
|
-
if (v1.tag === "ListComp") {
|
|
14696
|
-
return $2(v, v1._3, v1._2);
|
|
14697
|
-
}
|
|
14698
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13473
|
+
if (v1.tag === "ListComp") {
|
|
13474
|
+
return $1(v, v1._3, v1._2);
|
|
14699
13475
|
}
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
return $2(v, v1._3, v1._2);
|
|
14706
|
-
}
|
|
14707
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
13476
|
+
return throwException(error("absurd"))();
|
|
13477
|
+
}
|
|
13478
|
+
if (v.tag === "Lambda") {
|
|
13479
|
+
if (v1.tag === "Lambda") {
|
|
13480
|
+
return $Expr2("Lambda", toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)($Cont("ContElim", v._2))(toClausesStateFwd(v1._1))));
|
|
14708
13481
|
}
|
|
14709
|
-
if (
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
13482
|
+
if (v1.tag === "ListComp") {
|
|
13483
|
+
return $1(v, v1._3, v1._2);
|
|
13484
|
+
}
|
|
13485
|
+
return throwException(error("absurd"))();
|
|
13486
|
+
}
|
|
13487
|
+
if (v.tag === "DProject") {
|
|
13488
|
+
if (v1.tag === "Project") {
|
|
13489
|
+
return $Expr2("Project", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), v1._2);
|
|
13490
|
+
}
|
|
13491
|
+
if (v1.tag === "DProject") {
|
|
13492
|
+
return $Expr2("DProject", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2));
|
|
13493
|
+
}
|
|
13494
|
+
if (v1.tag === "ListComp") {
|
|
13495
|
+
return $1(v, v1._3, v1._2);
|
|
13496
|
+
}
|
|
13497
|
+
return throwException(error("absurd"))();
|
|
13498
|
+
}
|
|
13499
|
+
if (v.tag === "App") {
|
|
13500
|
+
if (v1.tag === "App") {
|
|
13501
|
+
return $Expr2("App", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2));
|
|
13502
|
+
}
|
|
13503
|
+
if (v._1.tag === "App") {
|
|
13504
|
+
if (v._1._1.tag === "Op") {
|
|
13505
|
+
if (v1.tag === "BinaryApp") {
|
|
13506
|
+
return $Expr2("BinaryApp", exprBwd(dictBoundedJoinSemilattice)(v._1._2)(v1._1), v1._2, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._3));
|
|
14728
13507
|
}
|
|
14729
13508
|
if (v1.tag === "ListComp") {
|
|
14730
13509
|
if (v1._3.tag === "Cons" && v1._3._1.tag === "ListCompGen") {
|
|
14731
|
-
return $
|
|
13510
|
+
return $0(v, v1._3._1, v1._3._2, v1._2);
|
|
14732
13511
|
}
|
|
14733
|
-
return $
|
|
13512
|
+
return $1(v, v1._3, v1._2);
|
|
14734
13513
|
}
|
|
14735
|
-
return throwException(error("
|
|
13514
|
+
return throwException(error("absurd"))();
|
|
14736
13515
|
}
|
|
14737
|
-
if (v._1.tag === "
|
|
14738
|
-
if (
|
|
14739
|
-
return $Expr2(
|
|
14740
|
-
"MatchAs",
|
|
14741
|
-
exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1),
|
|
14742
|
-
(() => {
|
|
14743
|
-
const $3 = toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)($Cont("ContElim", v._1._2))(toClausesStateFwd($NonEmpty(
|
|
14744
|
-
$Tuple($NonEmpty(v1._2._1._1, Nil), v1._2._1._2),
|
|
14745
|
-
listMap((x) => $Tuple($NonEmpty(x._1, Nil), x._2))(v1._2._2)
|
|
14746
|
-
))));
|
|
14747
|
-
return $NonEmpty($Tuple($3._1._1._1, $3._1._2), listMap((x) => $Tuple(x._1._1, x._2))($3._2));
|
|
14748
|
-
})()
|
|
14749
|
-
);
|
|
14750
|
-
}
|
|
14751
|
-
if (v._1._2.tag === "ElimConstr" && v1.tag === "IfElse") {
|
|
14752
|
-
return $Expr2(
|
|
14753
|
-
"IfElse",
|
|
14754
|
-
exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1),
|
|
14755
|
-
Object.hasOwn(v._1._2._1, "True") ? exprBwd(dictBoundedJoinSemilattice)((() => {
|
|
14756
|
-
const $3 = $$get(showString)(mapDictString)("True")(v._1._2._1);
|
|
14757
|
-
if ($3.tag === "ContExpr") {
|
|
14758
|
-
return $3._1;
|
|
14759
|
-
}
|
|
14760
|
-
return throwException(error("Expression expected"))();
|
|
14761
|
-
})())(v1._2) : $0(v1._2),
|
|
14762
|
-
Object.hasOwn(v._1._2._1, "False") ? exprBwd(dictBoundedJoinSemilattice)((() => {
|
|
14763
|
-
const $3 = $$get(showString)(mapDictString)("False")(v._1._2._1);
|
|
14764
|
-
if ($3.tag === "ContExpr") {
|
|
14765
|
-
return $3._1;
|
|
14766
|
-
}
|
|
14767
|
-
return throwException(error("Expression expected"))();
|
|
14768
|
-
})())(v1._3) : $0(v1._3)
|
|
14769
|
-
);
|
|
13516
|
+
if (v._1._1.tag === "Var" && v._1._1._1 === "range" && v1.tag === "ListEnum") {
|
|
13517
|
+
if (v._2.tag === "App" && v._2._1.tag === "App") {
|
|
13518
|
+
return $Expr2("ListEnum", exprBwd(dictBoundedJoinSemilattice)(v._1._2)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2._1._2)(v1._2));
|
|
14770
13519
|
}
|
|
13520
|
+
return throwException(error("absurd"))();
|
|
14771
13521
|
}
|
|
14772
13522
|
if (v1.tag === "ListComp") {
|
|
14773
|
-
|
|
13523
|
+
if (v1._3.tag === "Cons" && v1._3._1.tag === "ListCompGen") {
|
|
13524
|
+
return $0(v, v1._3._1, v1._3._2, v1._2);
|
|
13525
|
+
}
|
|
13526
|
+
return $1(v, v1._3, v1._2);
|
|
14774
13527
|
}
|
|
14775
|
-
return throwException(error("
|
|
14776
|
-
}
|
|
14777
|
-
if (v1.tag === "ListComp") {
|
|
14778
|
-
return $2(v, v1._3, v1._2);
|
|
13528
|
+
return throwException(error("absurd"))();
|
|
14779
13529
|
}
|
|
14780
|
-
if (v.tag === "
|
|
14781
|
-
if (v1.tag === "
|
|
14782
|
-
|
|
14783
|
-
|
|
13530
|
+
if (v._1.tag === "Lambda") {
|
|
13531
|
+
if (v1.tag === "MatchAs") {
|
|
13532
|
+
return $Expr2(
|
|
13533
|
+
"MatchAs",
|
|
13534
|
+
exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1),
|
|
13535
|
+
(() => {
|
|
13536
|
+
const $2 = toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)($Cont("ContElim", v._1._2))(toClausesStateFwd($NonEmpty(
|
|
13537
|
+
$Tuple($NonEmpty(v1._2._1._1, Nil), v1._2._1._2),
|
|
13538
|
+
listMap((x) => $Tuple($NonEmpty(x._1, Nil), x._2))(v1._2._2)
|
|
13539
|
+
))));
|
|
13540
|
+
return $NonEmpty($Tuple($2._1._1._1, $2._1._2), listMap((x) => $Tuple(x._1._1, x._2))($2._2));
|
|
13541
|
+
})()
|
|
13542
|
+
);
|
|
14784
13543
|
}
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
if (v1.tag === "LetRec") {
|
|
14789
|
-
return $Expr2("LetRec", recDefsBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2));
|
|
13544
|
+
if (v._1._2.tag === "ElimConstr" && v1.tag === "IfElse") {
|
|
13545
|
+
const v2 = ifElseBwd(dictBoundedJoinSemilattice)(v)($Tuple(v1._1, v1._2));
|
|
13546
|
+
return $Expr2("IfElse", v2._1, v2._2);
|
|
14790
13547
|
}
|
|
14791
|
-
return throwException(error("ExprBwd failed, s: " + show2(v1)))();
|
|
14792
13548
|
}
|
|
14793
|
-
if (
|
|
14794
|
-
return $
|
|
13549
|
+
if (v1.tag === "ListComp") {
|
|
13550
|
+
return $1(v, v1._3, v1._2);
|
|
13551
|
+
}
|
|
13552
|
+
return throwException(error("absurd"))();
|
|
13553
|
+
}
|
|
13554
|
+
if (v1.tag === "ListComp") {
|
|
13555
|
+
return $1(v, v1._3, v1._2);
|
|
13556
|
+
}
|
|
13557
|
+
if (v.tag === "Let") {
|
|
13558
|
+
if (v1.tag === "Let") {
|
|
13559
|
+
const v2 = varDefsBwd(dictBoundedJoinSemilattice)($Expr("Let", v._1, v._2))($Tuple(v1._1, v1._2));
|
|
13560
|
+
return $Expr2("Let", v2._1, v2._2);
|
|
13561
|
+
}
|
|
13562
|
+
return throwException(error("absurd"))();
|
|
13563
|
+
}
|
|
13564
|
+
if (v.tag === "LetRec") {
|
|
13565
|
+
if (v1.tag === "LetRec") {
|
|
13566
|
+
return $Expr2("LetRec", recDefsBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2));
|
|
14795
13567
|
}
|
|
14796
|
-
return throwException(error("
|
|
14797
|
-
}
|
|
13568
|
+
return throwException(error("absurd"))();
|
|
13569
|
+
}
|
|
13570
|
+
if (v.tag === "DocExpr" && v1.tag === "DocExpr") {
|
|
13571
|
+
return $Expr2("DocExpr", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2));
|
|
13572
|
+
}
|
|
13573
|
+
return throwException(error("absurd"))();
|
|
14798
13574
|
};
|
|
14799
13575
|
var clausesStateFwd = (dictBoundedLattice) => {
|
|
14800
13576
|
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
@@ -15105,9 +13881,9 @@ var vcommas = (v) => {
|
|
|
15105
13881
|
fail();
|
|
15106
13882
|
};
|
|
15107
13883
|
var getPrec = (x) => {
|
|
15108
|
-
const v = lookup4(x)(
|
|
13884
|
+
const v = lookup4(x)(opMap);
|
|
15109
13885
|
if (v.tag === "Just") {
|
|
15110
|
-
return v._1.
|
|
13886
|
+
return v._1._4;
|
|
15111
13887
|
}
|
|
15112
13888
|
if (v.tag === "Nothing") {
|
|
15113
13889
|
return -1;
|
|
@@ -15482,30 +14258,14 @@ var prettyListQualifier = (dictAnn) => ({
|
|
|
15482
14258
|
if (v._1.tag === "ListCompDecl") {
|
|
15483
14259
|
return $Doc(
|
|
15484
14260
|
"Concat",
|
|
15485
|
-
$Doc("Text", "
|
|
14261
|
+
$Doc("Text", "def"),
|
|
15486
14262
|
$Doc(
|
|
15487
14263
|
"Concat",
|
|
15488
14264
|
$Doc("Text", " "),
|
|
15489
14265
|
$Doc(
|
|
15490
14266
|
"Concat",
|
|
15491
14267
|
prettyPattern.pretty(v._1._1._1),
|
|
15492
|
-
$Doc(
|
|
15493
|
-
"Concat",
|
|
15494
|
-
$Doc("Text", " "),
|
|
15495
|
-
$Doc(
|
|
15496
|
-
"Concat",
|
|
15497
|
-
$Doc("Text", "in"),
|
|
15498
|
-
$Doc(
|
|
15499
|
-
"Concat",
|
|
15500
|
-
$Doc("Text", " "),
|
|
15501
|
-
$Doc(
|
|
15502
|
-
"Concat",
|
|
15503
|
-
$Doc("Text", "["),
|
|
15504
|
-
$Doc("Concat", prettyExpr1(dictAnn).pretty(v._1._1._2), $Doc("Text", "]"))
|
|
15505
|
-
)
|
|
15506
|
-
)
|
|
15507
|
-
)
|
|
15508
|
-
)
|
|
14268
|
+
$Doc("Concat", $Doc("Text", ":"), $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._1._1._2)))
|
|
15509
14269
|
)
|
|
15510
14270
|
)
|
|
15511
14271
|
);
|
|
@@ -15740,63 +14500,64 @@ var prettyExpr1 = (dictAnn) => {
|
|
|
15740
14500
|
);
|
|
15741
14501
|
}
|
|
15742
14502
|
if (v.tag === "IfElse") {
|
|
15743
|
-
|
|
14503
|
+
const prettyClause1 = (w) => (v1) => $Doc(
|
|
15744
14504
|
"Concat",
|
|
15745
|
-
$Doc("Text",
|
|
14505
|
+
$Doc("Text", w),
|
|
15746
14506
|
$Doc(
|
|
15747
14507
|
"Concat",
|
|
15748
14508
|
$Doc("Text", " "),
|
|
15749
14509
|
$Doc(
|
|
15750
14510
|
"Concat",
|
|
15751
|
-
expr(prettyExpr1(dictAnn).pretty(
|
|
14511
|
+
expr(prettyExpr1(dictAnn).pretty(v1._1)),
|
|
15752
14512
|
(() => {
|
|
15753
|
-
const $1 = prettyExpr1(dictAnn).pretty(
|
|
14513
|
+
const $1 = prettyExpr1(dictAnn).pretty(v1._2);
|
|
15754
14514
|
return $Doc(
|
|
15755
|
-
"
|
|
14515
|
+
"StmtOrExpr",
|
|
15756
14516
|
$Doc(
|
|
15757
|
-
"
|
|
15758
|
-
$Doc(
|
|
15759
|
-
"Concat",
|
|
15760
|
-
$Doc("Text", ":"),
|
|
15761
|
-
$Doc(
|
|
15762
|
-
"InlOrMul",
|
|
15763
|
-
$Doc("Concat", $Doc("Text", " "), $1),
|
|
15764
|
-
$Doc("Indent", $Doc("Concat", Line, $1))
|
|
15765
|
-
)
|
|
15766
|
-
),
|
|
14517
|
+
"Concat",
|
|
14518
|
+
$Doc("Text", ":"),
|
|
15767
14519
|
$Doc(
|
|
15768
|
-
"
|
|
15769
|
-
$Doc("Text", "
|
|
15770
|
-
$Doc("
|
|
14520
|
+
"InlOrMul",
|
|
14521
|
+
$Doc("Concat", $Doc("Text", " "), $1),
|
|
14522
|
+
$Doc("Indent", $Doc("Concat", Line, $1))
|
|
15771
14523
|
)
|
|
15772
14524
|
),
|
|
15773
14525
|
$Doc(
|
|
15774
14526
|
"Concat",
|
|
15775
|
-
|
|
14527
|
+
$Doc("Text", ":"),
|
|
14528
|
+
$Doc("Concat", $Doc("Text", " "), $Doc("Concat", $1, $Doc("Text", ";")))
|
|
14529
|
+
)
|
|
14530
|
+
);
|
|
14531
|
+
})()
|
|
14532
|
+
)
|
|
14533
|
+
)
|
|
14534
|
+
);
|
|
14535
|
+
return $Doc(
|
|
14536
|
+
"Concat",
|
|
14537
|
+
vsep($List("Cons", prettyClause1("if")(v._1._1), listMap(prettyClause1("elif"))(v._1._2))),
|
|
14538
|
+
$Doc(
|
|
14539
|
+
"Concat",
|
|
14540
|
+
Line,
|
|
14541
|
+
$Doc(
|
|
14542
|
+
"Concat",
|
|
14543
|
+
$Doc("Text", "else"),
|
|
14544
|
+
(() => {
|
|
14545
|
+
const $1 = prettyExpr1(dictAnn).pretty(v._2);
|
|
14546
|
+
return $Doc(
|
|
14547
|
+
"StmtOrExpr",
|
|
14548
|
+
$Doc(
|
|
14549
|
+
"Concat",
|
|
14550
|
+
$Doc("Text", ":"),
|
|
15776
14551
|
$Doc(
|
|
15777
|
-
"
|
|
15778
|
-
$Doc("Text", "
|
|
15779
|
-
((
|
|
15780
|
-
const $2 = prettyExpr1(dictAnn).pretty(v._3);
|
|
15781
|
-
return $Doc(
|
|
15782
|
-
"StmtOrExpr",
|
|
15783
|
-
$Doc(
|
|
15784
|
-
"Concat",
|
|
15785
|
-
$Doc("Text", ":"),
|
|
15786
|
-
$Doc(
|
|
15787
|
-
"InlOrMul",
|
|
15788
|
-
$Doc("Concat", $Doc("Text", " "), $2),
|
|
15789
|
-
$Doc("Indent", $Doc("Concat", Line, $2))
|
|
15790
|
-
)
|
|
15791
|
-
),
|
|
15792
|
-
$Doc(
|
|
15793
|
-
"Concat",
|
|
15794
|
-
$Doc("Text", ":"),
|
|
15795
|
-
$Doc("Concat", $Doc("Text", " "), $Doc("Concat", $2, $Doc("Text", ";")))
|
|
15796
|
-
)
|
|
15797
|
-
);
|
|
15798
|
-
})()
|
|
14552
|
+
"InlOrMul",
|
|
14553
|
+
$Doc("Concat", $Doc("Text", " "), $1),
|
|
14554
|
+
$Doc("Indent", $Doc("Concat", Line, $1))
|
|
15799
14555
|
)
|
|
14556
|
+
),
|
|
14557
|
+
$Doc(
|
|
14558
|
+
"Concat",
|
|
14559
|
+
$Doc("Text", ":"),
|
|
14560
|
+
$Doc("Concat", $Doc("Text", " "), $Doc("Concat", $1, $Doc("Text", ";")))
|
|
15800
14561
|
)
|
|
15801
14562
|
);
|
|
15802
14563
|
})()
|
|
@@ -16043,9 +14804,10 @@ var binaryApp = (dictAnn) => (v) => (v1) => {
|
|
|
16043
14804
|
if (v1.tag === "BinaryApp") {
|
|
16044
14805
|
const v2 = getPrec(v1._2);
|
|
16045
14806
|
if (v2 === -1) {
|
|
14807
|
+
const customPrec = getPrec("|x|");
|
|
16046
14808
|
return $Doc(
|
|
16047
14809
|
"Concat",
|
|
16048
|
-
binaryApp(dictAnn)(
|
|
14810
|
+
binaryApp(dictAnn)(customPrec)(v1._1),
|
|
16049
14811
|
$Doc(
|
|
16050
14812
|
"Concat",
|
|
16051
14813
|
$Doc("Text", " "),
|
|
@@ -16055,7 +14817,7 @@ var binaryApp = (dictAnn) => (v) => (v1) => {
|
|
|
16055
14817
|
$Doc(
|
|
16056
14818
|
"Concat",
|
|
16057
14819
|
$Doc("Text", v1._2),
|
|
16058
|
-
$Doc("Concat", $Doc("Text", "|"), $Doc("Concat", $Doc("Text", " "), binaryApp(dictAnn)(
|
|
14820
|
+
$Doc("Concat", $Doc("Text", "|"), $Doc("Concat", $Doc("Text", " "), binaryApp(dictAnn)(customPrec)(v1._3)))
|
|
16059
14821
|
)
|
|
16060
14822
|
)
|
|
16061
14823
|
)
|
|
@@ -16773,6 +15535,10 @@ var traversableBaseVal = {
|
|
|
16773
15535
|
Foldable1: () => foldableBaseVal
|
|
16774
15536
|
};
|
|
16775
15537
|
var annUnit = { Highlightable0: () => highlightableUnit, BoundedLattice1: () => boundedLattice };
|
|
15538
|
+
var val = (dictMonadWithGraphAlloc) => {
|
|
15539
|
+
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
|
15540
|
+
return (doc_opt) => $$new((a) => Val(a)(doc_opt));
|
|
15541
|
+
};
|
|
16776
15542
|
var reaches = (\u03C1) => (xs) => {
|
|
16777
15543
|
const dom_\u03C1 = mapObjectString.keys(\u03C1);
|
|
16778
15544
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
|
@@ -16806,25 +15572,23 @@ var reaches = (\u03C1) => (xs) => {
|
|
|
16806
15572
|
return go(toUnfoldable13(xs))(setSet1.empty);
|
|
16807
15573
|
};
|
|
16808
15574
|
var matrixPut = (i) => (j) => (\u03B4v) => (v) => {
|
|
16809
|
-
const vs_i = unsafeArrayArray.unsafeIndex(v._1)(i
|
|
15575
|
+
const vs_i = unsafeArrayArray.unsafeIndex(v._1)(i);
|
|
16810
15576
|
return $Tuple(
|
|
16811
15577
|
definitely("index within bounds")(_updateAt(
|
|
16812
15578
|
Just,
|
|
16813
15579
|
Nothing,
|
|
16814
|
-
i
|
|
16815
|
-
definitely("index within bounds")(_updateAt(Just, Nothing, j
|
|
15580
|
+
i,
|
|
15581
|
+
definitely("index within bounds")(_updateAt(Just, Nothing, j, \u03B4v(unsafeArrayArray.unsafeIndex(vs_i)(j)), vs_i)),
|
|
16816
15582
|
v._1
|
|
16817
15583
|
)),
|
|
16818
15584
|
$Tuple(v._2._1, v._2._2)
|
|
16819
15585
|
);
|
|
16820
15586
|
};
|
|
16821
15587
|
var matrixGet = (i) => (j) => (v) => definitely("index out of bounds!")((() => {
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
if ($2 >= 0 && $2 < $1.length) {
|
|
16827
|
-
return $Maybe("Just", $1[$2]);
|
|
15588
|
+
if (i >= 0 && i < v._1.length) {
|
|
15589
|
+
const $0 = v._1[i];
|
|
15590
|
+
if (j >= 0 && j < $0.length) {
|
|
15591
|
+
return $Maybe("Just", $0[j]);
|
|
16828
15592
|
}
|
|
16829
15593
|
}
|
|
16830
15594
|
return Nothing;
|
|
@@ -16862,11 +15626,10 @@ var unary = (dictBoundedJoinSemilattice) => {
|
|
|
16862
15626
|
$ForeignOp$p({
|
|
16863
15627
|
arity: 1,
|
|
16864
15628
|
op: (dictMonadWithGraphAlloc) => {
|
|
16865
|
-
const
|
|
16866
|
-
return (dictMonadError) => (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
15629
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
15630
|
+
return (dictMonadError) => (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (doc_opt) => (v) => {
|
|
16867
15631
|
if (v.tag === "Cons" && v._2.tag === "Nil") {
|
|
16868
|
-
|
|
16869
|
-
return $$new((a) => Val(a)($0))($$$Map("Node", 1, 1, v._1._1, void 0, Leaf2, Leaf2))(f.o.pack(f.fwd(f.i.unpack(v._1._3))));
|
|
15632
|
+
return val2(doc_opt)($$$Map("Node", 1, 1, v._1._1, void 0, Leaf2, Leaf2))(f.o.pack(f.fwd(f.i.unpack(v._1._3))));
|
|
16870
15633
|
}
|
|
16871
15634
|
fail();
|
|
16872
15635
|
};
|
|
@@ -17011,12 +15774,12 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
|
17011
15774
|
$ForeignOp$p({
|
|
17012
15775
|
arity: 2,
|
|
17013
15776
|
op: (dictMonadWithGraphAlloc) => {
|
|
17014
|
-
const
|
|
17015
|
-
return (dictMonadError) => (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
15777
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
15778
|
+
return (dictMonadError) => (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (doc_opt) => (v) => {
|
|
17016
15779
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
|
17017
15780
|
const $0 = f.i.unpack(v._1._3);
|
|
17018
15781
|
const $1 = f.i.unpack(v._2._1._3);
|
|
17019
|
-
return
|
|
15782
|
+
return val2(doc_opt)((() => {
|
|
17020
15783
|
if (dictIsZero.isZero($0)) {
|
|
17021
15784
|
return $$$Map("Node", 1, 1, v._1._1, void 0, Leaf2, Leaf2);
|
|
17022
15785
|
}
|
|
@@ -17061,10 +15824,10 @@ var binary = (dictBoundedJoinSemilattice) => {
|
|
|
17061
15824
|
$ForeignOp$p({
|
|
17062
15825
|
arity: 2,
|
|
17063
15826
|
op: (dictMonadWithGraphAlloc) => {
|
|
17064
|
-
const
|
|
17065
|
-
return (dictMonadError) => (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
15827
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
15828
|
+
return (dictMonadError) => (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (doc_opt) => (v) => {
|
|
17066
15829
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
|
17067
|
-
return
|
|
15830
|
+
return val2(doc_opt)(insert(ordVertex)(v._2._1._1)()($$$Map(
|
|
17068
15831
|
"Node",
|
|
17069
15832
|
1,
|
|
17070
15833
|
1,
|
|
@@ -17149,7 +15912,7 @@ var fromFoldable10 = /* @__PURE__ */ (() => {
|
|
|
17149
15912
|
return go$1(x, Nil);
|
|
17150
15913
|
})());
|
|
17151
15914
|
})();
|
|
17152
|
-
var
|
|
15915
|
+
var show2 = /* @__PURE__ */ (() => showSet(showString).show)();
|
|
17153
15916
|
var toUnfoldable6 = (x) => {
|
|
17154
15917
|
const go = (m$p, z$p) => {
|
|
17155
15918
|
if (m$p.tag === "Leaf") {
|
|
@@ -17340,12 +16103,12 @@ var match = (dictMonadWithGraphAlloc) => {
|
|
|
17340
16103
|
const $2 = v._3._1;
|
|
17341
16104
|
const $3 = v._1;
|
|
17342
16105
|
const $4 = v1._2;
|
|
17343
|
-
return Bind1.bind(check(MonadThrow0)(unsafeDifference(ordString.compare, $1, fromFoldable10(mapObjectString.keys($2))).tag === "Leaf")("Pattern mismatch: found " +
|
|
16106
|
+
return Bind1.bind(check(MonadThrow0)(unsafeDifference(ordString.compare, $1, fromFoldable10(mapObjectString.keys($2))).tag === "Leaf")("Pattern mismatch: found " + show2(mapObjectString.keys($2)) + ", expected " + show2($1)))(() => Bind1.bind(matchMany(dictMonadWithGraphAlloc)(listMap((k) => $$get(showString)(mapObjectString)(k)($2)._2)(toUnfoldable6($1)))($4))((v2) => $0.pure($Tuple(
|
|
17344
16107
|
v2._1,
|
|
17345
16108
|
$Tuple(v2._2._1, insert(ordVertex)($3)()(v2._2._2))
|
|
17346
16109
|
))));
|
|
17347
16110
|
}
|
|
17348
|
-
return MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected " +
|
|
16111
|
+
return MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected " + show2(v1._1)));
|
|
17349
16112
|
}
|
|
17350
16113
|
fail();
|
|
17351
16114
|
};
|
|
@@ -17353,10 +16116,10 @@ var match = (dictMonadWithGraphAlloc) => {
|
|
|
17353
16116
|
var closeDefs = (dictMonadWithGraphAlloc) => {
|
|
17354
16117
|
const Monad0 = dictMonadWithGraphAlloc.MonadWithGraph2().Monad0();
|
|
17355
16118
|
const traverse2$1 = traversableDict.traverse(Monad0.Applicative0());
|
|
17356
|
-
const
|
|
16119
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
17357
16120
|
return (\u03B3) => (\u03C1) => (\u03B1s) => Monad0.Bind1().Apply0().Functor0().map(Env)(traverse2$1((\u03C3) => {
|
|
17358
16121
|
const \u03C1$p = forDefs(\u03C1)(\u03C3);
|
|
17359
|
-
return
|
|
16122
|
+
return val2(Nothing)(\u03B1s)($BaseVal(
|
|
17360
16123
|
"Fun",
|
|
17361
16124
|
$Fun(
|
|
17362
16125
|
"Closure",
|
|
@@ -17398,7 +16161,7 @@ var evalVal = (dictMonadWithGraphAlloc) => {
|
|
|
17398
16161
|
if (v1.tag === "Dictionary") {
|
|
17399
16162
|
const $1 = v1._1;
|
|
17400
16163
|
return Bind1.bind($0.map(unzip3)(traverse3(traverse4((() => {
|
|
17401
|
-
const $2 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(v);
|
|
16164
|
+
const $2 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(v);
|
|
17402
16165
|
return (a) => $2(a)(v2);
|
|
17403
16166
|
})()))(v1._2)))((v3) => {
|
|
17404
16167
|
const v4 = unzip(listMap((v$1) => $Tuple(v$1._3.tag === "Str" ? v$1._3._1 : typeError(v$1._3)("Str"), v$1._1))(v3._1));
|
|
@@ -17525,7 +16288,7 @@ var evalVal = (dictMonadWithGraphAlloc) => {
|
|
|
17525
16288
|
};
|
|
17526
16289
|
return go(0)($2);
|
|
17527
16290
|
})()))(() => Bind1.bind(traverse3((() => {
|
|
17528
|
-
const $4 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(v);
|
|
16291
|
+
const $4 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(v);
|
|
17529
16292
|
return (a) => $4(a)(v2);
|
|
17530
16293
|
})())($2))((vs) => Applicative0.pure($Maybe("Just", $Tuple($3, $BaseVal("Constr", $1, vs))))));
|
|
17531
16294
|
}
|
|
@@ -17534,7 +16297,7 @@ var evalVal = (dictMonadWithGraphAlloc) => {
|
|
|
17534
16297
|
const $2 = v1._3._1;
|
|
17535
16298
|
const $3 = v1._3._2;
|
|
17536
16299
|
const $4 = v1._1;
|
|
17537
|
-
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(v)(v1._4)(v2))((v3) => {
|
|
16300
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(v)(v1._4)(v2))((v3) => {
|
|
17538
16301
|
const v5 = intPair.unpack(v3._3);
|
|
17539
16302
|
const $5 = v5._1._1;
|
|
17540
16303
|
const $6 = v5._2._1;
|
|
@@ -17543,9 +16306,9 @@ var evalVal = (dictMonadWithGraphAlloc) => {
|
|
|
17543
16306
|
return Bind1.bind(check2(greaterThanOrEq($Tuple($5, $6))($Tuple(1, 1)))("array must be at least (" + show3($Tuple(1, 1)) + "); got (" + show3($Tuple(
|
|
17544
16307
|
$5,
|
|
17545
16308
|
$6
|
|
17546
|
-
)) + ")"))(() => Bind1.bind(sequence1(arrayBind(rangeImpl(
|
|
17547
|
-
sequence1(arrayBind(rangeImpl(
|
|
17548
|
-
$$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(unionWith((v$1) => identity13)(v)(disjointUnion2((() => {
|
|
16309
|
+
)) + ")"))(() => Bind1.bind(sequence1(arrayBind(rangeImpl(0, $5 - 1 | 0))((i) => [
|
|
16310
|
+
sequence1(arrayBind(rangeImpl(0, $6 - 1 | 0))((j) => [
|
|
16311
|
+
$$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(unionWith((v$1) => identity13)(v)(disjointUnion2((() => {
|
|
17549
16312
|
const $9 = {};
|
|
17550
16313
|
$9[$2] = $Val($7, Nothing, $BaseVal("Int", i));
|
|
17551
16314
|
return $9;
|
|
@@ -17589,17 +16352,17 @@ var evalVal = (dictMonadWithGraphAlloc) => {
|
|
|
17589
16352
|
};
|
|
17590
16353
|
};
|
|
17591
16354
|
var $$eval = (dictMonadWithGraphAlloc) => {
|
|
17592
|
-
const
|
|
16355
|
+
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
|
17593
16356
|
const MonadError1 = dictMonadWithGraphAlloc.MonadError1();
|
|
17594
16357
|
const withMsg2 = withMsg(MonadError1);
|
|
17595
16358
|
const MonadThrow0 = MonadError1.MonadThrow0();
|
|
17596
16359
|
const match1 = match(dictMonadWithGraphAlloc);
|
|
17597
16360
|
const closeDefs1 = closeDefs(dictMonadWithGraphAlloc);
|
|
17598
|
-
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
|
17599
16361
|
return (dictMonadReader) => (dictMonadAff) => {
|
|
17600
16362
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
|
17601
|
-
const
|
|
17602
|
-
|
|
16363
|
+
const Bind1 = Monad0.Bind1();
|
|
16364
|
+
const traceWhen2 = traceWhen(Monad0.Applicative0());
|
|
16365
|
+
return (dictLoadFile) => (doc_opt) => (\u03B3) => (e0) => (\u03B1s) => {
|
|
17603
16366
|
const funName = (funName$a0$copy) => {
|
|
17604
16367
|
let funName$a0 = funName$a0$copy, funName$c = true, funName$r;
|
|
17605
16368
|
while (funName$c) {
|
|
@@ -17623,35 +16386,47 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
|
17623
16386
|
}
|
|
17624
16387
|
return funName$r;
|
|
17625
16388
|
};
|
|
17626
|
-
return
|
|
16389
|
+
return Bind1.bind(evalVal(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(\u03B3)(e0)(\u03B1s))((\u03B1u_opt) => {
|
|
17627
16390
|
if (\u03B1u_opt.tag === "Just") {
|
|
17628
|
-
return
|
|
16391
|
+
return $$new((a) => Val(a)(doc_opt))(insert(ordVertex)(\u03B1u_opt._1._1)()(\u03B1s))(\u03B1u_opt._1._2);
|
|
17629
16392
|
}
|
|
17630
16393
|
if (\u03B1u_opt.tag === "Nothing") {
|
|
17631
16394
|
if (e0.tag === "Var") {
|
|
17632
|
-
|
|
16395
|
+
const $0 = e0._1;
|
|
16396
|
+
return Bind1.bind(traceWhen2((() => {
|
|
16397
|
+
if (doc_opt.tag === "Nothing") {
|
|
16398
|
+
return false;
|
|
16399
|
+
}
|
|
16400
|
+
if (doc_opt.tag === "Just") {
|
|
16401
|
+
return true;
|
|
16402
|
+
}
|
|
16403
|
+
fail();
|
|
16404
|
+
})())("Discarding doc (variable " + $0 + ")"))(() => withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)($0)(\u03B3)));
|
|
17633
16405
|
}
|
|
17634
16406
|
if (e0.tag === "Op") {
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
return $0.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(\u03B3)(e0._1)(\u03B1s))((v) => {
|
|
17640
|
-
if (v._3.tag === "Dictionary") {
|
|
17641
|
-
return withMsg2("Dict lookup")(orElse(MonadThrow0)('Key "' + $1 + '" not found')((() => {
|
|
17642
|
-
const $2 = _lookup(Nothing, Just, $1, v._3._1);
|
|
17643
|
-
if ($2.tag === "Just") {
|
|
17644
|
-
return $Maybe("Just", $2._1._2);
|
|
17645
|
-
}
|
|
17646
|
-
return Nothing;
|
|
17647
|
-
})()));
|
|
16407
|
+
const $0 = e0._1;
|
|
16408
|
+
return Bind1.bind(traceWhen2((() => {
|
|
16409
|
+
if (doc_opt.tag === "Nothing") {
|
|
16410
|
+
return false;
|
|
17648
16411
|
}
|
|
17649
|
-
|
|
17650
|
-
|
|
16412
|
+
if (doc_opt.tag === "Just") {
|
|
16413
|
+
return true;
|
|
16414
|
+
}
|
|
16415
|
+
fail();
|
|
16416
|
+
})())("Discarding doc (operator " + $0 + ")"))(() => withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)($0)(\u03B3)));
|
|
17651
16417
|
}
|
|
17652
16418
|
if (e0.tag === "DProject") {
|
|
16419
|
+
const $0 = e0._1;
|
|
17653
16420
|
const $1 = e0._2;
|
|
17654
|
-
return
|
|
16421
|
+
return Bind1.bind(traceWhen2((() => {
|
|
16422
|
+
if (doc_opt.tag === "Nothing") {
|
|
16423
|
+
return false;
|
|
16424
|
+
}
|
|
16425
|
+
if (doc_opt.tag === "Just") {
|
|
16426
|
+
return true;
|
|
16427
|
+
}
|
|
16428
|
+
fail();
|
|
16429
|
+
})())("Discarding doc (projection)"))(() => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(\u03B3)($0)(\u03B1s))((v) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(\u03B3)($1)(\u03B1s))((v$p) => {
|
|
17655
16430
|
if (v._3.tag === "Dictionary") {
|
|
17656
16431
|
if (v$p._3.tag === "Str") {
|
|
17657
16432
|
return withMsg2("Dict lookup")(orElse(MonadThrow0)('Key "' + v$p._3._1 + '" not found')((() => {
|
|
@@ -17665,45 +16440,45 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
|
17665
16440
|
return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v$p))._1 + ", expected string"));
|
|
17666
16441
|
}
|
|
17667
16442
|
return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected dict"));
|
|
17668
|
-
}));
|
|
16443
|
+
})));
|
|
17669
16444
|
}
|
|
17670
16445
|
if (e0.tag === "App") {
|
|
17671
|
-
const $
|
|
17672
|
-
const $
|
|
17673
|
-
return
|
|
16446
|
+
const $0 = e0._1;
|
|
16447
|
+
const $1 = e0._2;
|
|
16448
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(\u03B3)($0)(\u03B1s))((v) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(\u03B3)($1)(\u03B1s))((v$p) => withMsg2("In " + funName($0))(apply2(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(doc_opt)(v)(v$p))));
|
|
17674
16449
|
}
|
|
17675
16450
|
if (e0.tag === "Let") {
|
|
17676
|
-
const $
|
|
17677
|
-
const $
|
|
17678
|
-
return
|
|
16451
|
+
const $0 = e0._2;
|
|
16452
|
+
const $1 = e0._1._1;
|
|
16453
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(\u03B3)(e0._1._2)(\u03B1s))((v) => Bind1.bind(withMsg2("In variable def")(match1(v)($1)))((v1) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(doc_opt)(unionWith((v$1) => identity13)(\u03B3)(v1._1))($0)(v1._2._2)));
|
|
17679
16454
|
}
|
|
17680
16455
|
if (e0.tag === "LetRec") {
|
|
17681
|
-
const $
|
|
17682
|
-
const $
|
|
17683
|
-
return
|
|
16456
|
+
const $0 = e0._2;
|
|
16457
|
+
const $1 = e0._1._1;
|
|
16458
|
+
return Bind1.bind(closeDefs1(\u03B3)(e0._1._2)(insert(ordVertex)($1)()(\u03B1s)))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(doc_opt)(unionWith((v) => identity13)(\u03B3)(\u03B3$p))($0)(insert(ordVertex)($1)()(\u03B1s)));
|
|
17684
16459
|
}
|
|
17685
16460
|
if (e0.tag === "DocExpr") {
|
|
17686
|
-
const $
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
const $3 = \u03B1u_opt$p._1._2;
|
|
17691
|
-
const $4 = \u03B1u_opt$p._1._1;
|
|
17692
|
-
return $0.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(\u03B3)($1)(\u03B1s))((v) => $$new((a) => Val(a)($Maybe("Just", v)))(insert(ordVertex)($4)()(\u03B1s))($3));
|
|
16461
|
+
const $0 = e0._2;
|
|
16462
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(Nothing)(\u03B3)(e0._1)(\u03B1s))((v) => Bind1.bind(traceWhen2((() => {
|
|
16463
|
+
if (doc_opt.tag === "Nothing") {
|
|
16464
|
+
return false;
|
|
17693
16465
|
}
|
|
17694
|
-
if (
|
|
17695
|
-
return
|
|
17696
|
-
const $3 = v._3;
|
|
17697
|
-
const $4 = v._1;
|
|
17698
|
-
return $0.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(\u03B3)($1)(\u03B1s))((v1) => Monad0.Applicative0().pure($Val(
|
|
17699
|
-
$4,
|
|
17700
|
-
$Maybe("Just", v1),
|
|
17701
|
-
$3
|
|
17702
|
-
)));
|
|
17703
|
-
});
|
|
16466
|
+
if (doc_opt.tag === "Just") {
|
|
16467
|
+
return true;
|
|
17704
16468
|
}
|
|
17705
16469
|
fail();
|
|
17706
|
-
})
|
|
16470
|
+
})())("Outer doc trumps inner doc"))(() => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)($Maybe(
|
|
16471
|
+
"Just",
|
|
16472
|
+
(() => {
|
|
16473
|
+
if (doc_opt.tag === "Nothing") {
|
|
16474
|
+
return v;
|
|
16475
|
+
}
|
|
16476
|
+
if (doc_opt.tag === "Just") {
|
|
16477
|
+
return doc_opt._1;
|
|
16478
|
+
}
|
|
16479
|
+
fail();
|
|
16480
|
+
})()
|
|
16481
|
+
))(\u03B3)($0)(\u03B1s)));
|
|
17707
16482
|
}
|
|
17708
16483
|
return throwException(error("absurd"))();
|
|
17709
16484
|
}
|
|
@@ -17715,23 +16490,23 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
|
17715
16490
|
var apply2 = (dictMonadWithGraphAlloc) => {
|
|
17716
16491
|
const closeDefs1 = closeDefs(dictMonadWithGraphAlloc);
|
|
17717
16492
|
const match1 = match(dictMonadWithGraphAlloc);
|
|
17718
|
-
const
|
|
16493
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
17719
16494
|
const MonadError1 = dictMonadWithGraphAlloc.MonadError1();
|
|
17720
16495
|
const MonadThrow0 = MonadError1.MonadThrow0();
|
|
17721
16496
|
return (dictMonadReader) => (dictMonadAff) => {
|
|
17722
16497
|
const Bind1 = dictMonadAff.MonadEffect0().Monad0().Bind1();
|
|
17723
|
-
return (dictLoadFile) => (v) => (v1) => {
|
|
17724
|
-
const $0 = (
|
|
17725
|
-
if (
|
|
17726
|
-
if (
|
|
17727
|
-
const $1 =
|
|
17728
|
-
const $2 =
|
|
17729
|
-
const $3 =
|
|
17730
|
-
return Bind1.bind(closeDefs1($2)(
|
|
16498
|
+
return (dictLoadFile) => (v) => (v1) => (v2) => {
|
|
16499
|
+
const $0 = (v3) => MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v3))._1 + ", expected function"));
|
|
16500
|
+
if (v1._3.tag === "Fun") {
|
|
16501
|
+
if (v1._3._1.tag === "Closure") {
|
|
16502
|
+
const $1 = v1._1;
|
|
16503
|
+
const $2 = v1._3._1._1;
|
|
16504
|
+
const $3 = v1._3._1._3;
|
|
16505
|
+
return Bind1.bind(closeDefs1($2)(v1._3._1._2)($$$Map("Node", 1, 1, $1, void 0, Leaf2, Leaf2)))((\u03B32) => Bind1.bind(match1(v2)($3))((v4) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictMonadAff)(dictLoadFile)(v)(unionWith((v$1) => identity13)(unionWith((v$1) => identity13)($2)(\u03B32))(v4._1))(v4._2._1.tag === "ContExpr" ? v4._2._1._1 : throwException(error("Expression expected"))())(insert(ordVertex)($1)()(v4._2._2))));
|
|
17731
16506
|
}
|
|
17732
|
-
if (
|
|
17733
|
-
const $1 =
|
|
17734
|
-
const vs$p = foldableList.foldr(Cons)($List("Cons",
|
|
16507
|
+
if (v1._3._1.tag === "Foreign") {
|
|
16508
|
+
const $1 = v1._3._1._1._2;
|
|
16509
|
+
const vs$p = foldableList.foldr(Cons)($List("Cons", v2, Nil))(v1._3._1._2);
|
|
17735
16510
|
if ((() => {
|
|
17736
16511
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
|
17737
16512
|
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
@@ -17753,16 +16528,16 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
|
17753
16528
|
};
|
|
17754
16529
|
return $1._1.arity > go(0)(vs$p);
|
|
17755
16530
|
})()) {
|
|
17756
|
-
return
|
|
16531
|
+
return val2(v)($$$Map("Node", 1, 1, v1._1, void 0, Leaf2, Leaf2))($BaseVal(
|
|
17757
16532
|
"Fun",
|
|
17758
|
-
$Fun("Foreign", $Tuple(
|
|
16533
|
+
$Fun("Foreign", $Tuple(v1._3._1._1._1, $1), vs$p)
|
|
17759
16534
|
));
|
|
17760
16535
|
}
|
|
17761
|
-
return $1._1.op(dictMonadWithGraphAlloc)(MonadError1)(dictMonadAff)(dictMonadReader)(dictLoadFile)(vs$p);
|
|
16536
|
+
return $1._1.op(dictMonadWithGraphAlloc)(MonadError1)(dictMonadAff)(dictMonadReader)(dictLoadFile)(v)(vs$p);
|
|
17762
16537
|
}
|
|
17763
|
-
if (
|
|
17764
|
-
const $1 =
|
|
17765
|
-
const n = defined(arity(monadThrowExceptT(monadIdentity))(
|
|
16538
|
+
if (v1._3._1.tag === "PartialConstr") {
|
|
16539
|
+
const $1 = v1._1;
|
|
16540
|
+
const n = defined(arity(monadThrowExceptT(monadIdentity))(v1._3._1._1));
|
|
17766
16541
|
const v$p = (() => {
|
|
17767
16542
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
|
17768
16543
|
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
@@ -17782,18 +16557,18 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
|
17782
16557
|
}
|
|
17783
16558
|
return go$r;
|
|
17784
16559
|
};
|
|
17785
|
-
return go(0)(
|
|
16560
|
+
return go(0)(v1._3._1._2) < (n - 1 | 0);
|
|
17786
16561
|
})() ? $BaseVal(
|
|
17787
16562
|
"Fun",
|
|
17788
16563
|
$Fun(
|
|
17789
16564
|
"PartialConstr",
|
|
17790
|
-
|
|
17791
|
-
foldableList.foldr(Cons)($List("Cons",
|
|
16565
|
+
v1._3._1._1,
|
|
16566
|
+
foldableList.foldr(Cons)($List("Cons", v2, Nil))(v1._3._1._2)
|
|
17792
16567
|
)
|
|
17793
16568
|
) : $BaseVal(
|
|
17794
16569
|
"Constr",
|
|
17795
|
-
|
|
17796
|
-
foldableList.foldr(Cons)($List("Cons",
|
|
16570
|
+
v1._3._1._1,
|
|
16571
|
+
foldableList.foldr(Cons)($List("Cons", v2, Nil))(v1._3._1._2)
|
|
17797
16572
|
);
|
|
17798
16573
|
return Bind1.bind(check(MonadThrow0)((() => {
|
|
17799
16574
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
|
@@ -17814,8 +16589,8 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
|
17814
16589
|
}
|
|
17815
16590
|
return go$r;
|
|
17816
16591
|
};
|
|
17817
|
-
return go(0)(
|
|
17818
|
-
})())("Too many arguments to " + showCtr(
|
|
16592
|
+
return go(0)(v1._3._1._2) < n;
|
|
16593
|
+
})())("Too many arguments to " + showCtr(v1._3._1._1)))(() => val2(v)($$$Map(
|
|
17819
16594
|
"Node",
|
|
17820
16595
|
1,
|
|
17821
16596
|
1,
|
|
@@ -17826,7 +16601,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
|
17826
16601
|
))(v$p));
|
|
17827
16602
|
}
|
|
17828
16603
|
}
|
|
17829
|
-
return $0(
|
|
16604
|
+
return $0(v2);
|
|
17830
16605
|
};
|
|
17831
16606
|
};
|
|
17832
16607
|
};
|
|
@@ -17851,7 +16626,7 @@ var eval_module = (dictMonadWithGraphAlloc) => {
|
|
|
17851
16626
|
if (v1._1.tag === "Left") {
|
|
17852
16627
|
const $1 = v1._2;
|
|
17853
16628
|
const $2 = v1._1._1._1;
|
|
17854
|
-
return $0.bind(eval4(unionWith((v$1) => identity13)(\u03B3)(v))(v1._1._1._2)(v2))((v3) => $0.bind(match1(v3)($2))((v4) => go(unionWith((v$1) => identity13)(v)(v4._1))($1)(v4._2._2)));
|
|
16629
|
+
return $0.bind(eval4(Nothing)(unionWith((v$1) => identity13)(\u03B3)(v))(v1._1._1._2)(v2))((v3) => $0.bind(match1(v3)($2))((v4) => go(unionWith((v$1) => identity13)(v)(v4._1))($1)(v4._2._2)));
|
|
17855
16630
|
}
|
|
17856
16631
|
if (v1._1.tag === "Right") {
|
|
17857
16632
|
const $1 = v1._2;
|
|
@@ -17987,7 +16762,7 @@ var graphEval = (dictMonadAff) => {
|
|
|
17987
16762
|
const $3 = v["\u03B3"];
|
|
17988
16763
|
const $4 = spyFunWhen(false)("fwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(fwdSlice2);
|
|
17989
16764
|
const $5 = spyFunWhen(false)("bwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(bwdSlice2);
|
|
17990
|
-
return Monad0.Bind1().bind(runAllocT(Monad0)(bindStateT2.bind(alloc2(e))((e\u03B1) => bindStateT2.bind(runWithGraphT_spy2(eval1($3)(e\u03B1)(mempty3))(verticesEnvExprVertex.vertices($EnvExpr(
|
|
16765
|
+
return Monad0.Bind1().bind(runAllocT(Monad0)(bindStateT2.bind(alloc2(e))((e\u03B1) => bindStateT2.bind(runWithGraphT_spy2(eval1(Nothing)($3)(e\u03B1)(mempty3))(verticesEnvExprVertex.vertices($EnvExpr(
|
|
17991
16766
|
$3,
|
|
17992
16767
|
e\u03B1
|
|
17993
16768
|
))))((v1) => {
|
|
@@ -19298,7 +18073,7 @@ var stringChar = /* @__PURE__ */ withErrorMessage((state1, more, lift12, $$throw
|
|
|
19298
18073
|
$$throw2,
|
|
19299
18074
|
(state2, a) => more((v2) => done(state2, $Maybe("Just", a)))
|
|
19300
18075
|
)))("string character");
|
|
19301
|
-
var opChars = [":", "!", "#", "$", "%", "&", "*", "+", ".", "/", "<", "=", ">", "?", "
|
|
18076
|
+
var opChars = [":", "!", "#", "$", "%", "&", "*", "+", ".", "/", "<", "=", ">", "?", "\\", "^", "|", "-", "~"];
|
|
19302
18077
|
var lexeme = (v) => (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => v(
|
|
19303
18078
|
state1,
|
|
19304
18079
|
more,
|
|
@@ -19413,7 +18188,7 @@ var reserved = (expected) => {
|
|
|
19413
18188
|
));
|
|
19414
18189
|
};
|
|
19415
18190
|
})())((() => {
|
|
19416
|
-
const $02 =
|
|
18191
|
+
const $02 = withErrorMessage(satisfy((v) => v === "_"))("'_'");
|
|
19417
18192
|
return (v2, $1, $2, $3, $4) => {
|
|
19418
18193
|
const $5 = v2._1;
|
|
19419
18194
|
const $6 = v2._2;
|
|
@@ -19473,7 +18248,7 @@ var variable = /* @__PURE__ */ unreserved(/* @__PURE__ */ identifier(/* @__PURE_
|
|
|
19473
18248
|
));
|
|
19474
18249
|
};
|
|
19475
18250
|
})())(/* @__PURE__ */ (() => {
|
|
19476
|
-
const $0 =
|
|
18251
|
+
const $0 = withErrorMessage(satisfy((v) => v === "_"))("'_'");
|
|
19477
18252
|
return (v2, $1, $2, $3, $4) => {
|
|
19478
18253
|
const $5 = v2._1;
|
|
19479
18254
|
const $6 = v2._2;
|
|
@@ -19500,7 +18275,7 @@ var delim = (dictParseable) => (a) => {
|
|
|
19500
18275
|
};
|
|
19501
18276
|
var parens = /* @__PURE__ */ between(/* @__PURE__ */ delim(parseableChar)("("))(/* @__PURE__ */ delim(parseableChar)(")"));
|
|
19502
18277
|
var trailingCommas = (p) => sepEndBy(p)(delim(parseableChar)(","));
|
|
19503
|
-
var fields = (key) => (
|
|
18278
|
+
var fields = (key) => (val2) => trailingCommas((state1, more, lift12, $$throw2, done) => more((v1) => key(
|
|
19504
18279
|
state1,
|
|
19505
18280
|
more,
|
|
19506
18281
|
lift12,
|
|
@@ -19515,7 +18290,7 @@ var fields = (key) => (val) => trailingCommas((state1, more, lift12, $$throw2, d
|
|
|
19515
18290
|
$$throw2,
|
|
19516
18291
|
(state2$1, a$1) => more((v2$1) => {
|
|
19517
18292
|
const $2 = $1._3 && !state2$1._3 ? $ParseState(state2$1._1, state2$1._2, true) : state2$1;
|
|
19518
|
-
return more((v1$2) =>
|
|
18293
|
+
return more((v1$2) => val2(
|
|
19519
18294
|
$2,
|
|
19520
18295
|
more,
|
|
19521
18296
|
lift12,
|
|
@@ -19549,7 +18324,7 @@ var context = (s) => (p) => (state1, more, lift12, $$throw2, done) => more((v1)
|
|
|
19549
18324
|
})
|
|
19550
18325
|
));
|
|
19551
18326
|
var constructor = /* @__PURE__ */ unreserved(/* @__PURE__ */ identifier(upper2)(/* @__PURE__ */ (() => {
|
|
19552
|
-
const $0 =
|
|
18327
|
+
const $0 = withErrorMessage(satisfy((v) => v === "_"))("'_'");
|
|
19553
18328
|
return (v2, $1, $2, $3, $4) => {
|
|
19554
18329
|
const $5 = v2._1;
|
|
19555
18330
|
const $6 = v2._2;
|
|
@@ -20299,7 +19074,24 @@ var pattern$lazy = /* @__PURE__ */ binding(() => lazyParserT.defer((v) => foldlA
|
|
|
20299
19074
|
[$Operator("Infix", pConsOp, AssocRight)]
|
|
20300
19075
|
])));
|
|
20301
19076
|
var pattern = /* @__PURE__ */ pattern$lazy();
|
|
20302
|
-
var
|
|
19077
|
+
var infixSymbol = (op) => (state1, more, lift12, $$throw2, done) => more((v1) => reservedOperator(op)(
|
|
19078
|
+
state1,
|
|
19079
|
+
more,
|
|
19080
|
+
lift12,
|
|
19081
|
+
$$throw2,
|
|
19082
|
+
(state2, a) => more((v2) => done(state1._3 && !state2._3 ? $ParseState(state2._1, state2._2, true) : state2, (e) => (e$p) => $Expr2("BinaryApp", e, op, e$p)))
|
|
19083
|
+
));
|
|
19084
|
+
var infixIdent = (op) => {
|
|
19085
|
+
const $0 = reserved(op);
|
|
19086
|
+
return (state1, more, lift12, $$throw2, done) => more((v1) => $0(
|
|
19087
|
+
state1,
|
|
19088
|
+
more,
|
|
19089
|
+
lift12,
|
|
19090
|
+
$$throw2,
|
|
19091
|
+
(state2, a) => more((v2) => done(state1._3 && !state2._3 ? $ParseState(state2._1, state2._2, true) : state2, (e) => (e$p) => $Expr2("BinaryApp", e, op, e$p)))
|
|
19092
|
+
));
|
|
19093
|
+
};
|
|
19094
|
+
var infixCustom = /* @__PURE__ */ (() => {
|
|
20303
19095
|
const $0 = delim(parseableChar)("|");
|
|
20304
19096
|
return (state1, more, lift12, $$throw2, done) => more((v1) => {
|
|
20305
19097
|
const $1 = state1._3;
|
|
@@ -20399,38 +19191,35 @@ var consOp = (state1, more, lift12, $$throw2, done) => more((v1) => reservedOper
|
|
|
20399
19191
|
(e) => (e$p) => $Expr2("Constr", void 0, ":", $List("Cons", e, $List("Cons", e$p, Nil)))
|
|
20400
19192
|
))
|
|
20401
19193
|
));
|
|
20402
|
-
var
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
)
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
|
|
20420
|
-
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
],
|
|
20432
|
-
[/* @__PURE__ */ $Operator("Infix", infixFn, AssocLeft)]
|
|
20433
|
-
];
|
|
19194
|
+
var opTable = /* @__PURE__ */ arrayMap(/* @__PURE__ */ arrayMap((v) => $Operator(
|
|
19195
|
+
"Infix",
|
|
19196
|
+
(() => {
|
|
19197
|
+
if (v._1 === "Symbol") {
|
|
19198
|
+
return infixSymbol(v._2);
|
|
19199
|
+
}
|
|
19200
|
+
if (v._1 === "Ident") {
|
|
19201
|
+
return infixIdent(v._2);
|
|
19202
|
+
}
|
|
19203
|
+
if (v._1 === "ConsOp") {
|
|
19204
|
+
return consOp;
|
|
19205
|
+
}
|
|
19206
|
+
if (v._1 === "Custom") {
|
|
19207
|
+
return infixCustom;
|
|
19208
|
+
}
|
|
19209
|
+
fail();
|
|
19210
|
+
})(),
|
|
19211
|
+
v._3
|
|
19212
|
+
)))(/* @__PURE__ */ sortBy((x) => (y) => ordInt.compare((() => {
|
|
19213
|
+
if (0 < x.length) {
|
|
19214
|
+
return -x[0]._4;
|
|
19215
|
+
}
|
|
19216
|
+
fail();
|
|
19217
|
+
})())((() => {
|
|
19218
|
+
if (0 < y.length) {
|
|
19219
|
+
return -y[0]._4;
|
|
19220
|
+
}
|
|
19221
|
+
fail();
|
|
19222
|
+
})()))(/* @__PURE__ */ groupBy((a) => (b) => a._4 === b._4)(opDefs)));
|
|
20434
19223
|
var varDefs$lazy = /* @__PURE__ */ binding(() => many1((() => {
|
|
20435
19224
|
const $0 = reserved("def");
|
|
20436
19225
|
const $1 = delim(parseableChar)(":");
|
|
@@ -21133,7 +19922,48 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21133
19922
|
})
|
|
21134
19923
|
));
|
|
21135
19924
|
})()),
|
|
21136
|
-
(() => {
|
|
19925
|
+
context("listCompDecl")((() => {
|
|
19926
|
+
const $43 = reserved("def");
|
|
19927
|
+
return (state1$2, more$2, lift1$2, throw$2, done$2) => more$2((v1$2) => $43(
|
|
19928
|
+
state1$2,
|
|
19929
|
+
more$2,
|
|
19930
|
+
lift1$2,
|
|
19931
|
+
throw$2,
|
|
19932
|
+
(state2$2, a$2) => more$2((v2$2) => {
|
|
19933
|
+
const $52 = state1$2._3 && !state2$2._3 ? $ParseState(state2$2._1, state2$2._2, true) : state2$2;
|
|
19934
|
+
return more$2((v1$3) => pattern(
|
|
19935
|
+
$52,
|
|
19936
|
+
more$2,
|
|
19937
|
+
lift1$2,
|
|
19938
|
+
throw$2,
|
|
19939
|
+
(state2$3, a$3) => more$2((v2$3) => {
|
|
19940
|
+
const $62 = delim(parseableChar)(":");
|
|
19941
|
+
const $72 = $52._3 && !state2$3._3 ? $ParseState(state2$3._1, state2$3._2, true) : state2$3;
|
|
19942
|
+
return more$2((v1$4) => $62(
|
|
19943
|
+
$72,
|
|
19944
|
+
more$2,
|
|
19945
|
+
lift1$2,
|
|
19946
|
+
throw$2,
|
|
19947
|
+
(state2$4, a$4) => more$2((v2$4) => {
|
|
19948
|
+
const $8 = $72._3 && !state2$4._3 ? $ParseState(state2$4._1, state2$4._2, true) : state2$4;
|
|
19949
|
+
return more$2((v1$5) => opTree$lazy()(
|
|
19950
|
+
$8,
|
|
19951
|
+
more$2,
|
|
19952
|
+
lift1$2,
|
|
19953
|
+
throw$2,
|
|
19954
|
+
(state2$5, a$5) => more$2((v2$5) => done$2(
|
|
19955
|
+
$8._3 && !state2$5._3 ? $ParseState(state2$5._1, state2$5._2, true) : state2$5,
|
|
19956
|
+
$Qualifier("ListCompDecl", $VarDef2(a$3, a$5))
|
|
19957
|
+
))
|
|
19958
|
+
));
|
|
19959
|
+
})
|
|
19960
|
+
));
|
|
19961
|
+
})
|
|
19962
|
+
));
|
|
19963
|
+
})
|
|
19964
|
+
));
|
|
19965
|
+
})()),
|
|
19966
|
+
context("listCompGen")((() => {
|
|
21137
19967
|
const $43 = reserved("for");
|
|
21138
19968
|
return (state1$2, more$2, lift1$2, throw$2, done$2) => more$2((v1$2) => $43(
|
|
21139
19969
|
state1$2,
|
|
@@ -21155,59 +19985,25 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21155
19985
|
more$2,
|
|
21156
19986
|
lift1$2,
|
|
21157
19987
|
throw$2,
|
|
21158
|
-
(state2$4, a$4) => more$2((v2$4) =>
|
|
21159
|
-
|
|
21160
|
-
|
|
21161
|
-
|
|
21162
|
-
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
(v2$5, $14) => $11($ParseState(v2$5._1, v2$5._2, $13), $14),
|
|
21168
|
-
(state2$5, a$5) => $9((v2$5) => {
|
|
21169
|
-
const $14 = v1$5._3 && !state2$5._3 ? $ParseState(state2$5._1, state2$5._2, true) : state2$5;
|
|
21170
|
-
return $9((v1$7) => opTree$lazy()(
|
|
21171
|
-
$14,
|
|
21172
|
-
$9,
|
|
21173
|
-
$10,
|
|
21174
|
-
(v2$6, $15) => $11($ParseState(v2$6._1, v2$6._2, $13), $15),
|
|
21175
|
-
(state2$6, a$6) => $9((v2$6) => {
|
|
21176
|
-
const $15 = delim(parseableChar)("]");
|
|
21177
|
-
const $16 = $14._3 && !state2$6._3 ? $ParseState(state2$6._1, state2$6._2, true) : state2$6;
|
|
21178
|
-
return $9((v1$8) => $15(
|
|
21179
|
-
$16,
|
|
21180
|
-
$9,
|
|
21181
|
-
$10,
|
|
21182
|
-
(v2$7, $17) => $11($ParseState(v2$7._1, v2$7._2, $13), $17),
|
|
21183
|
-
(state2$7, a$7) => $9((v2$7) => $12(
|
|
21184
|
-
$16._3 && !state2$7._3 ? $ParseState(state2$7._1, state2$7._2, true) : state2$7,
|
|
21185
|
-
$Qualifier("ListCompDecl", $VarDef2(a$3, a$6))
|
|
21186
|
-
))
|
|
21187
|
-
));
|
|
21188
|
-
})
|
|
21189
|
-
));
|
|
21190
|
-
})
|
|
21191
|
-
));
|
|
21192
|
-
};
|
|
21193
|
-
})()),
|
|
21194
|
-
context("listCompGen")((state1$3, more$3, lift1$3, throw$3, done$3) => more$3((v1$5) => opTree$lazy()(
|
|
21195
|
-
state1$3,
|
|
21196
|
-
more$3,
|
|
21197
|
-
lift1$3,
|
|
21198
|
-
throw$3,
|
|
21199
|
-
(state2$5, a$5) => more$3((v2$5) => done$3(
|
|
21200
|
-
state1$3._3 && !state2$5._3 ? $ParseState(state2$5._1, state2$5._2, true) : state2$5,
|
|
19988
|
+
(state2$4, a$4) => more$2((v2$4) => {
|
|
19989
|
+
const $8 = $72._3 && !state2$4._3 ? $ParseState(state2$4._1, state2$4._2, true) : state2$4;
|
|
19990
|
+
return more$2((v1$5) => opTree$lazy()(
|
|
19991
|
+
$8,
|
|
19992
|
+
more$2,
|
|
19993
|
+
lift1$2,
|
|
19994
|
+
throw$2,
|
|
19995
|
+
(state2$5, a$5) => more$2((v2$5) => done$2(
|
|
19996
|
+
$8._3 && !state2$5._3 ? $ParseState(state2$5._1, state2$5._2, true) : state2$5,
|
|
21201
19997
|
$Qualifier("ListCompGen", a$3, a$5)
|
|
21202
19998
|
))
|
|
21203
|
-
))
|
|
21204
|
-
|
|
19999
|
+
));
|
|
20000
|
+
})
|
|
21205
20001
|
));
|
|
21206
20002
|
})
|
|
21207
20003
|
));
|
|
21208
20004
|
})
|
|
21209
20005
|
));
|
|
21210
|
-
})()
|
|
20006
|
+
})())
|
|
21211
20007
|
]));
|
|
21212
20008
|
return (state1$2, more$2, lift1$2, throw$2, done$2) => more$2((v1$2) => $42(
|
|
21213
20009
|
state1$2,
|
|
@@ -21361,26 +20157,31 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21361
20157
|
lift12,
|
|
21362
20158
|
$$throw2,
|
|
21363
20159
|
(state2, a) => more((v2) => choice3([
|
|
21364
|
-
(
|
|
21365
|
-
|
|
21366
|
-
more$1,
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
const $132 = close(parseableChar)(")");
|
|
21371
|
-
const $142 = state1$1._3 && !state2$1._3 ? $ParseState(state2$1._1, state2$1._2, true) : state2$1;
|
|
21372
|
-
return more$1((v1$2) => $132(
|
|
21373
|
-
$142,
|
|
20160
|
+
(() => {
|
|
20161
|
+
const $132 = close(parseableChar)(")");
|
|
20162
|
+
return (state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$1) => {
|
|
20163
|
+
const $142 = state1$1._3;
|
|
20164
|
+
return more$1((v2$1) => more$1((v1$2) => operator(
|
|
20165
|
+
state1$1,
|
|
21374
20166
|
more$1,
|
|
21375
20167
|
lift1$1,
|
|
21376
|
-
throw$1,
|
|
21377
|
-
(state2$
|
|
21378
|
-
$
|
|
21379
|
-
$
|
|
21380
|
-
|
|
21381
|
-
|
|
21382
|
-
|
|
21383
|
-
|
|
20168
|
+
(v2$2, $15) => throw$1($ParseState(v2$2._1, v2$2._2, $142), $15),
|
|
20169
|
+
(state2$1, a$1) => more$1((v2$2) => more$1((v3) => {
|
|
20170
|
+
const state2$p = state1$1._3 && !state2$1._3 ? $ParseState(state2$1._1, state2$1._2, true) : state2$1;
|
|
20171
|
+
return $132(
|
|
20172
|
+
state2$p,
|
|
20173
|
+
more$1,
|
|
20174
|
+
lift1$1,
|
|
20175
|
+
(v2$3, $15) => throw$1($ParseState(v2$3._1, v2$3._2, $142), $15),
|
|
20176
|
+
(state3, a$2) => more$1((v4) => {
|
|
20177
|
+
const $15 = state2$p._3 && !state3._3 ? $ParseState(state3._1, state3._2, true) : state3;
|
|
20178
|
+
return more$1((v2$3) => done$1(state1$1._3 && !$15._3 ? $ParseState($15._1, $15._2, true) : $15, $Expr2("Op", a$1)));
|
|
20179
|
+
})
|
|
20180
|
+
);
|
|
20181
|
+
}))
|
|
20182
|
+
)));
|
|
20183
|
+
});
|
|
20184
|
+
})(),
|
|
21384
20185
|
(state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$1) => opTree$lazy()(
|
|
21385
20186
|
state1$1,
|
|
21386
20187
|
more$1,
|
|
@@ -21758,7 +20559,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21758
20559
|
$$throw2,
|
|
21759
20560
|
(state2, a) => more((v2) => chain(a)(state1._3 && !state2._3 ? $ParseState(state2._1, state2._2, true) : state2, more, lift12, $$throw2, done))
|
|
21760
20561
|
));
|
|
21761
|
-
})()))(
|
|
20562
|
+
})()))(opTable);
|
|
21762
20563
|
})());
|
|
21763
20564
|
return (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => $0(
|
|
21764
20565
|
state1,
|
|
@@ -21781,6 +20582,23 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21781
20582
|
return context("expr")((() => {
|
|
21782
20583
|
const $0 = reserved("case");
|
|
21783
20584
|
const $1 = reserved("match");
|
|
20585
|
+
const clause = (state1, more, lift12, $$throw2, done) => more((v1) => opTree(
|
|
20586
|
+
state1,
|
|
20587
|
+
more,
|
|
20588
|
+
lift12,
|
|
20589
|
+
$$throw2,
|
|
20590
|
+
(state2, a) => more((v2) => {
|
|
20591
|
+
const $22 = block(expr$lazy());
|
|
20592
|
+
const $32 = state1._3 && !state2._3 ? $ParseState(state2._1, state2._2, true) : state2;
|
|
20593
|
+
return more((v1$1) => $22(
|
|
20594
|
+
$32,
|
|
20595
|
+
more,
|
|
20596
|
+
lift12,
|
|
20597
|
+
$$throw2,
|
|
20598
|
+
(state2$1, a$1) => more((v2$1) => done($32._3 && !state2$1._3 ? $ParseState(state2$1._1, state2$1._2, true) : state2$1, $Tuple(a, a$1)))
|
|
20599
|
+
));
|
|
20600
|
+
})
|
|
20601
|
+
));
|
|
21784
20602
|
const $2 = reserved("if");
|
|
21785
20603
|
const $3 = context("def")((() => {
|
|
21786
20604
|
const $32 = context("funDef")(withPos((state1, more, lift12, $$throw2, done) => more((v1) => recDefs$lazy()(
|
|
@@ -21879,13 +20697,31 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21879
20697
|
$5,
|
|
21880
20698
|
$6,
|
|
21881
20699
|
$15,
|
|
21882
|
-
(state2, a) => $5((v2$1) => $5((v1$1) =>
|
|
20700
|
+
(state2, a) => $5((v2$1) => $5((v1$1) => clause(
|
|
21883
20701
|
state2,
|
|
21884
20702
|
$5,
|
|
21885
20703
|
$6,
|
|
21886
20704
|
$15,
|
|
21887
20705
|
(state2$1, a$1) => $5((v2$2) => {
|
|
21888
|
-
const $16 =
|
|
20706
|
+
const $16 = manyRec2(align((() => {
|
|
20707
|
+
const $162 = reserved("elif");
|
|
20708
|
+
return (state1, more, lift12, $$throw2, done) => more((v2$3) => more((v1$2) => $162(
|
|
20709
|
+
state1,
|
|
20710
|
+
more,
|
|
20711
|
+
lift12,
|
|
20712
|
+
$$throw2,
|
|
20713
|
+
(state2$2, a$2) => more((v2$4) => more((v3$2) => {
|
|
20714
|
+
const state2$p = state1._3 && !state2$2._3 ? $ParseState(state2$2._1, state2$2._2, true) : state2$2;
|
|
20715
|
+
return clause(
|
|
20716
|
+
state2$p,
|
|
20717
|
+
more,
|
|
20718
|
+
lift12,
|
|
20719
|
+
$$throw2,
|
|
20720
|
+
(state3, a$3) => more((v4$1) => done(state2$p._3 && !state3._3 ? $ParseState(state3._1, state3._2, true) : state3, a$3))
|
|
20721
|
+
);
|
|
20722
|
+
}))
|
|
20723
|
+
)));
|
|
20724
|
+
})()));
|
|
21889
20725
|
const $17 = state2._3 && !state2$1._3 ? $ParseState(state2$1._1, state2$1._2, true) : state2$1;
|
|
21890
20726
|
return $5((v1$2) => $16(
|
|
21891
20727
|
$17,
|
|
@@ -21893,27 +20729,36 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
|
|
|
21893
20729
|
$6,
|
|
21894
20730
|
$15,
|
|
21895
20731
|
(state2$2, a$2) => $5((v2$3) => {
|
|
21896
|
-
const $18 = align(
|
|
20732
|
+
const $18 = align((() => {
|
|
20733
|
+
const $182 = reserved("else");
|
|
20734
|
+
const $192 = block(expr$lazy());
|
|
20735
|
+
return (state1, more, lift12, $$throw2, done) => more((v2$4) => more((v1$3) => $182(
|
|
20736
|
+
state1,
|
|
20737
|
+
more,
|
|
20738
|
+
lift12,
|
|
20739
|
+
$$throw2,
|
|
20740
|
+
(state2$3, a$3) => more((v2$5) => more((v3$2) => {
|
|
20741
|
+
const state2$p = state1._3 && !state2$3._3 ? $ParseState(state2$3._1, state2$3._2, true) : state2$3;
|
|
20742
|
+
return $192(
|
|
20743
|
+
state2$p,
|
|
20744
|
+
more,
|
|
20745
|
+
lift12,
|
|
20746
|
+
$$throw2,
|
|
20747
|
+
(state3, a$4) => more((v4$1) => done(state2$p._3 && !state3._3 ? $ParseState(state3._1, state3._2, true) : state3, a$4))
|
|
20748
|
+
);
|
|
20749
|
+
}))
|
|
20750
|
+
)));
|
|
20751
|
+
})());
|
|
21897
20752
|
const $19 = $17._3 && !state2$2._3 ? $ParseState(state2$2._1, state2$2._2, true) : state2$2;
|
|
21898
20753
|
return $5((v1$3) => $18(
|
|
21899
20754
|
$19,
|
|
21900
20755
|
$5,
|
|
21901
20756
|
$6,
|
|
21902
20757
|
$15,
|
|
21903
|
-
(state2$3, a$3) => $5((v2$4) =>
|
|
21904
|
-
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
$21,
|
|
21908
|
-
$5,
|
|
21909
|
-
$6,
|
|
21910
|
-
$15,
|
|
21911
|
-
(state2$4, a$4) => $5((v2$5) => $8(
|
|
21912
|
-
$21._3 && !state2$4._3 ? $ParseState(state2$4._1, state2$4._2, true) : state2$4,
|
|
21913
|
-
$Expr2("IfElse", a$1, a$2, a$4)
|
|
21914
|
-
))
|
|
21915
|
-
));
|
|
21916
|
-
})
|
|
20758
|
+
(state2$3, a$3) => $5((v2$4) => $8(
|
|
20759
|
+
$19._3 && !state2$3._3 ? $ParseState(state2$3._1, state2$3._2, true) : state2$3,
|
|
20760
|
+
$Expr2("IfElse", nonEmptyListNonEmptyList.nonEmpty($List("Cons", a$1, a$2)), a$3)
|
|
20761
|
+
))
|
|
21917
20762
|
));
|
|
21918
20763
|
})
|
|
21919
20764
|
));
|
|
@@ -25739,28 +24584,28 @@ var split3 = /* @__PURE__ */ $Tuple(
|
|
|
25739
24584
|
/* @__PURE__ */ $ForeignOp$p({
|
|
25740
24585
|
arity: 2,
|
|
25741
24586
|
op: (dictMonadWithGraphAlloc) => {
|
|
25742
|
-
const
|
|
24587
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
25743
24588
|
return (dictMonadError) => {
|
|
25744
24589
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
25745
24590
|
return (dictMonadAff) => {
|
|
25746
24591
|
const $0 = dictMonadAff.MonadEffect0().Monad0().Bind1();
|
|
25747
|
-
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
25748
|
-
if (
|
|
25749
|
-
const $1 =
|
|
25750
|
-
const $2 =
|
|
25751
|
-
const \u03B1s = insert(ordVertex)(
|
|
24592
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24593
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Int" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Str" && v1._2._2.tag === "Nil") {
|
|
24594
|
+
const $1 = v1._1._3._1;
|
|
24595
|
+
const $2 = v1._2._1._3._1;
|
|
24596
|
+
const \u03B1s = insert(ordVertex)(v1._2._1._1)()($$$Map(
|
|
25752
24597
|
"Node",
|
|
25753
24598
|
1,
|
|
25754
24599
|
1,
|
|
25755
|
-
|
|
24600
|
+
v1._1._1,
|
|
25756
24601
|
void 0,
|
|
25757
24602
|
Leaf2,
|
|
25758
24603
|
Leaf2
|
|
25759
24604
|
));
|
|
25760
|
-
return $0.bind(
|
|
24605
|
+
return $0.bind(val2(Nothing)(\u03B1s)($BaseVal("Str", take3($1)($2))))((before) => $0.bind(val2(Nothing)(\u03B1s)($BaseVal(
|
|
25761
24606
|
"Str",
|
|
25762
24607
|
drop2(length2(take3($1)($2)))($2)
|
|
25763
|
-
)))((after) =>
|
|
24608
|
+
)))((after) => val2(v)(\u03B1s)($BaseVal("Constr", "Pair", $List("Cons", before, $List("Cons", after, Nil))))));
|
|
25764
24609
|
}
|
|
25765
24610
|
return $$throw2("Int and string expected");
|
|
25766
24611
|
};
|
|
@@ -25774,41 +24619,41 @@ var search2 = /* @__PURE__ */ $Tuple(
|
|
|
25774
24619
|
/* @__PURE__ */ $ForeignOp$p({
|
|
25775
24620
|
arity: 2,
|
|
25776
24621
|
op: (dictMonadWithGraphAlloc) => {
|
|
25777
|
-
const
|
|
24622
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
25778
24623
|
return (dictMonadError) => {
|
|
25779
24624
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
25780
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
25781
|
-
if (
|
|
25782
|
-
const $0 =
|
|
25783
|
-
const
|
|
25784
|
-
if (
|
|
25785
|
-
return $$throw2("
|
|
24625
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24626
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Str" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Str" && v1._2._2.tag === "Nil") {
|
|
24627
|
+
const $0 = v1._2._1._3._1;
|
|
24628
|
+
const v2 = regex(v1._1._3._1)(noFlags);
|
|
24629
|
+
if (v2.tag === "Left") {
|
|
24630
|
+
return $$throw2("Regex expected: " + v2._1);
|
|
25786
24631
|
}
|
|
25787
|
-
if (
|
|
25788
|
-
const \u03B1s = insert(ordVertex)(
|
|
24632
|
+
if (v2.tag === "Right") {
|
|
24633
|
+
const \u03B1s = insert(ordVertex)(v1._2._1._1)()($$$Map(
|
|
25789
24634
|
"Node",
|
|
25790
24635
|
1,
|
|
25791
24636
|
1,
|
|
25792
|
-
|
|
24637
|
+
v1._1._1,
|
|
25793
24638
|
void 0,
|
|
25794
24639
|
Leaf2,
|
|
25795
24640
|
Leaf2
|
|
25796
24641
|
));
|
|
25797
|
-
const
|
|
25798
|
-
if (
|
|
25799
|
-
return
|
|
24642
|
+
const v3 = search(v2._1)($0);
|
|
24643
|
+
if (v3.tag === "Nothing") {
|
|
24644
|
+
return val2(v)(\u03B1s)($BaseVal("Constr", "None", Nil));
|
|
25800
24645
|
}
|
|
25801
|
-
if (
|
|
25802
|
-
return dictMonadAff.MonadEffect0().Monad0().Bind1().bind(
|
|
24646
|
+
if (v3.tag === "Just") {
|
|
24647
|
+
return dictMonadAff.MonadEffect0().Monad0().Bind1().bind(val2(Nothing)(\u03B1s)($BaseVal("Int", v3._1)))((v4) => val2(v)(\u03B1s)($BaseVal(
|
|
25803
24648
|
"Constr",
|
|
25804
24649
|
"Some",
|
|
25805
|
-
$List("Cons",
|
|
24650
|
+
$List("Cons", v4, Nil)
|
|
25806
24651
|
)));
|
|
25807
24652
|
}
|
|
25808
24653
|
}
|
|
25809
24654
|
fail();
|
|
25810
24655
|
}
|
|
25811
|
-
return $$throw2("
|
|
24656
|
+
return $$throw2("Two strings expected");
|
|
25812
24657
|
};
|
|
25813
24658
|
};
|
|
25814
24659
|
}
|
|
@@ -25830,15 +24675,15 @@ var matrixUpdate = /* @__PURE__ */ $Tuple(
|
|
|
25830
24675
|
/* @__PURE__ */ $ForeignOp$p({
|
|
25831
24676
|
arity: 3,
|
|
25832
24677
|
op: (dictMonadWithGraphAlloc) => {
|
|
25833
|
-
const
|
|
24678
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
25834
24679
|
return (dictMonadError) => {
|
|
25835
24680
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
25836
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
25837
|
-
if (
|
|
25838
|
-
const $0 =
|
|
25839
|
-
return
|
|
24681
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24682
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Matrix" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Constr" && v1._2._1._3._2.tag === "Cons" && v1._2._1._3._2._1._3.tag === "Int" && v1._2._1._3._2._2.tag === "Cons" && v1._2._1._3._2._2._1._3.tag === "Int" && v1._2._1._3._2._2._2.tag === "Nil" && v1._2._2.tag === "Cons" && v1._2._2._2.tag === "Nil" && v1._2._1._3._1 === "Pair") {
|
|
24683
|
+
const $0 = v1._2._2._1;
|
|
24684
|
+
return val2(v)($$$Map("Node", 1, 1, v1._1._1, void 0, Leaf2, Leaf2))($BaseVal(
|
|
25840
24685
|
"Matrix",
|
|
25841
|
-
matrixPut(
|
|
24686
|
+
matrixPut(v1._2._1._3._2._1._3._1)(v1._2._1._3._2._2._1._3._1)((v$1) => $0)(v1._1._3._1)
|
|
25842
24687
|
));
|
|
25843
24688
|
}
|
|
25844
24689
|
return $$throw2("Matrix, pair of integers and value expected");
|
|
@@ -25853,9 +24698,9 @@ var matrixLookup = /* @__PURE__ */ $Tuple(
|
|
|
25853
24698
|
arity: 2,
|
|
25854
24699
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
|
25855
24700
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
25856
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
25857
|
-
if (
|
|
25858
|
-
return dictMonadAff.MonadEffect0().Monad0().Applicative0().pure(matrixGet(
|
|
24701
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24702
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Matrix" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Constr" && v1._2._1._3._2.tag === "Cons" && v1._2._1._3._2._1._3.tag === "Int" && v1._2._1._3._2._2.tag === "Cons" && v1._2._1._3._2._2._1._3.tag === "Int" && v1._2._1._3._2._2._2.tag === "Nil" && v1._2._2.tag === "Nil" && v1._2._1._3._1 === "Pair") {
|
|
24703
|
+
return dictMonadAff.MonadEffect0().Monad0().Applicative0().pure(matrixGet(v1._2._1._3._2._1._3._1)(v1._2._1._3._2._2._1._3._1)(v1._1._3._1));
|
|
25859
24704
|
}
|
|
25860
24705
|
return $$throw2("Matrix and pair of integers expected");
|
|
25861
24706
|
};
|
|
@@ -25878,18 +24723,18 @@ var insert3 = /* @__PURE__ */ $Tuple(
|
|
|
25878
24723
|
/* @__PURE__ */ $ForeignOp$p({
|
|
25879
24724
|
arity: 3,
|
|
25880
24725
|
op: (dictMonadWithGraphAlloc) => {
|
|
25881
|
-
const
|
|
24726
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
25882
24727
|
return (dictMonadError) => {
|
|
25883
24728
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
25884
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
25885
|
-
if (
|
|
25886
|
-
const $0 =
|
|
25887
|
-
return
|
|
24729
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24730
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Dictionary" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Str" && v1._2._2.tag === "Cons" && v1._2._2._2.tag === "Nil") {
|
|
24731
|
+
const $0 = v1._2._1._3._1;
|
|
24732
|
+
return val2(v)($$$Map("Node", 1, 1, v1._1._1, void 0, Leaf2, Leaf2))($BaseVal(
|
|
25888
24733
|
"Dictionary",
|
|
25889
24734
|
mutate(($1) => () => {
|
|
25890
|
-
$1[$0] = $Tuple(
|
|
24735
|
+
$1[$0] = $Tuple(v1._2._1._1, v1._2._2._1);
|
|
25891
24736
|
return $1;
|
|
25892
|
-
})(
|
|
24737
|
+
})(v1._1._3._1)
|
|
25893
24738
|
));
|
|
25894
24739
|
}
|
|
25895
24740
|
return $$throw2("Dictionary, key and value expected");
|
|
@@ -25905,29 +24750,29 @@ var $$get3 = /* @__PURE__ */ $Tuple(
|
|
|
25905
24750
|
/* @__PURE__ */ $ForeignOp$p({
|
|
25906
24751
|
arity: 2,
|
|
25907
24752
|
op: (dictMonadWithGraphAlloc) => {
|
|
25908
|
-
const
|
|
24753
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
25909
24754
|
return (dictMonadError) => {
|
|
25910
24755
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
25911
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
25912
|
-
if (
|
|
25913
|
-
const
|
|
25914
|
-
if (
|
|
25915
|
-
return
|
|
24756
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24757
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Str" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Dictionary" && v1._2._2.tag === "Nil") {
|
|
24758
|
+
const v2 = _lookup(Nothing, Just, v1._1._3._1, v1._2._1._3._1);
|
|
24759
|
+
if (v2.tag === "Nothing") {
|
|
24760
|
+
return val2(v)($$$Map("Node", 1, 1, v1._1._1, void 0, Leaf2, Leaf2))($BaseVal(
|
|
25916
24761
|
"Constr",
|
|
25917
24762
|
"None",
|
|
25918
24763
|
Nil
|
|
25919
24764
|
));
|
|
25920
24765
|
}
|
|
25921
|
-
if (
|
|
25922
|
-
return
|
|
24766
|
+
if (v2.tag === "Just") {
|
|
24767
|
+
return val2(v)(insert(ordVertex)(v2._1._1)()($$$Map(
|
|
25923
24768
|
"Node",
|
|
25924
24769
|
1,
|
|
25925
24770
|
1,
|
|
25926
|
-
|
|
24771
|
+
v1._1._1,
|
|
25927
24772
|
void 0,
|
|
25928
24773
|
Leaf2,
|
|
25929
24774
|
Leaf2
|
|
25930
|
-
)))($BaseVal("Constr", "Some", $List("Cons",
|
|
24775
|
+
)))($BaseVal("Constr", "Some", $List("Cons", v2._1._2, Nil)));
|
|
25931
24776
|
}
|
|
25932
24777
|
fail();
|
|
25933
24778
|
}
|
|
@@ -25937,35 +24782,35 @@ var $$get3 = /* @__PURE__ */ $Tuple(
|
|
|
25937
24782
|
}
|
|
25938
24783
|
})
|
|
25939
24784
|
);
|
|
25940
|
-
var
|
|
25941
|
-
const
|
|
24785
|
+
var fromJson = (dictMonadWithGraphAlloc) => {
|
|
24786
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
25942
24787
|
return (dictMonadEffect) => {
|
|
25943
24788
|
const Monad0 = dictMonadEffect.Monad0();
|
|
25944
24789
|
const $0 = Monad0.Bind1();
|
|
25945
24790
|
const Applicative0 = Monad0.Applicative0();
|
|
25946
24791
|
const traverse22 = traversableArray.traverse(Applicative0);
|
|
25947
24792
|
const traverse2$1 = traversableArray.traverse(Applicative0);
|
|
25948
|
-
return caseJson((v) => throwException(error("Error, Null JSON value cannot be converted to Val"))())((b) =>
|
|
24793
|
+
return (doc_opt) => caseJson((v) => throwException(error("Error, Null JSON value cannot be converted to Val"))())((b) => val2(doc_opt)(Leaf2)($BaseVal(
|
|
25949
24794
|
"Constr",
|
|
25950
24795
|
b ? "True" : "False",
|
|
25951
24796
|
Nil
|
|
25952
24797
|
)))((n) => {
|
|
25953
24798
|
const v = fromNumber(n);
|
|
25954
24799
|
if (v.tag === "Just") {
|
|
25955
|
-
return
|
|
24800
|
+
return val2(doc_opt)(Leaf2)($BaseVal("Int", v._1));
|
|
25956
24801
|
}
|
|
25957
24802
|
if (v.tag === "Nothing") {
|
|
25958
|
-
return
|
|
24803
|
+
return val2(doc_opt)(Leaf2)($BaseVal("Float", n));
|
|
25959
24804
|
}
|
|
25960
24805
|
fail();
|
|
25961
|
-
})((s) =>
|
|
25962
|
-
const toList = (v) => {
|
|
25963
|
-
if (
|
|
25964
|
-
return
|
|
24806
|
+
})((s) => val2(doc_opt)(Leaf2)($BaseVal("Str", s)))((xs) => {
|
|
24807
|
+
const toList = (v) => (v1) => {
|
|
24808
|
+
if (v1.tag === "Nil") {
|
|
24809
|
+
return val2(v)(Leaf2)($BaseVal("Constr", "Nil", Nil));
|
|
25965
24810
|
}
|
|
25966
|
-
if (
|
|
25967
|
-
const $1 =
|
|
25968
|
-
return $0.bind(toList(
|
|
24811
|
+
if (v1.tag === "Cons") {
|
|
24812
|
+
const $1 = v1._1;
|
|
24813
|
+
return $0.bind(toList(Nothing)(v1._2))((v$p) => val2(v)(Leaf2)($BaseVal(
|
|
25969
24814
|
"Constr",
|
|
25970
24815
|
":",
|
|
25971
24816
|
$List("Cons", $1, $List("Cons", v$p, Nil))
|
|
@@ -25973,7 +24818,7 @@ var fromJsonVal = (dictMonadWithGraphAlloc) => {
|
|
|
25973
24818
|
}
|
|
25974
24819
|
fail();
|
|
25975
24820
|
};
|
|
25976
|
-
return $0.bind(traverse2$1(
|
|
24821
|
+
return $0.bind(traverse2$1(fromJson(dictMonadWithGraphAlloc)(dictMonadEffect)(Nothing))(xs))((vs) => toList(doc_opt)((() => {
|
|
25977
24822
|
const len = vs.length;
|
|
25978
24823
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
|
25979
24824
|
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
@@ -26012,36 +24857,36 @@ var fromJsonVal = (dictMonadWithGraphAlloc) => {
|
|
|
26012
24857
|
})((obj) => $0.bind(traverse22((v) => {
|
|
26013
24858
|
const $1 = v._1;
|
|
26014
24859
|
const $2 = v._2;
|
|
26015
|
-
return $0.bind(
|
|
24860
|
+
return $0.bind(val2(doc_opt)(Leaf2)($BaseVal("Str", $1)))((v1) => {
|
|
26016
24861
|
const $3 = v1._1;
|
|
26017
|
-
return $0.bind(
|
|
24862
|
+
return $0.bind(fromJson(dictMonadWithGraphAlloc)(dictMonadEffect)(Nothing)($2))((v2) => Applicative0.pure($Tuple($1, $Tuple($3, v2))));
|
|
26018
24863
|
});
|
|
26019
|
-
})(toUnfoldable8(obj)))((entries) =>
|
|
24864
|
+
})(toUnfoldable8(obj)))((entries) => val2(doc_opt)(Leaf2)($BaseVal("Dictionary", fromFoldable20(entries)))));
|
|
26020
24865
|
};
|
|
26021
24866
|
};
|
|
26022
24867
|
var loadJson = /* @__PURE__ */ $Tuple(
|
|
26023
|
-
"
|
|
24868
|
+
"load_json",
|
|
26024
24869
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26025
24870
|
arity: 1,
|
|
26026
24871
|
op: (dictMonadWithGraphAlloc) => {
|
|
26027
|
-
const
|
|
24872
|
+
const fromJson1 = fromJson(dictMonadWithGraphAlloc);
|
|
26028
24873
|
return (dictMonadError) => {
|
|
26029
24874
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26030
24875
|
return (dictMonadAff) => {
|
|
26031
24876
|
const MonadEffect0 = dictMonadAff.MonadEffect0();
|
|
26032
24877
|
const Bind1 = MonadEffect0.Monad0().Bind1();
|
|
26033
|
-
const
|
|
24878
|
+
const fromJson2 = fromJson1(MonadEffect0);
|
|
26034
24879
|
return (dictMonadReader) => (dictLoadFile) => {
|
|
26035
24880
|
const loadFileFromPath = dictLoadFile.loadFileFromPath(dictMonadError)(dictMonadAff);
|
|
26036
|
-
return (v) => {
|
|
26037
|
-
if (
|
|
26038
|
-
return Bind1.bind(Bind1.Apply0().Functor0().map(definitely('File "' +
|
|
26039
|
-
const
|
|
26040
|
-
if (
|
|
26041
|
-
return $$throw2("Failed to parse JSON: " + showJsonDecodeError.show(
|
|
24881
|
+
return (v) => (v1) => {
|
|
24882
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Str" && v1._2.tag === "Nil") {
|
|
24883
|
+
return Bind1.bind(Bind1.Apply0().Functor0().map(definitely('File "' + v1._1._3._1 + '" exists'))(loadFileFromPath(v1._1._3._1)))((str) => {
|
|
24884
|
+
const v2 = parseJson(str);
|
|
24885
|
+
if (v2.tag === "Left") {
|
|
24886
|
+
return $$throw2("Failed to parse JSON: " + showJsonDecodeError.show(v2._1));
|
|
26042
24887
|
}
|
|
26043
|
-
if (
|
|
26044
|
-
return
|
|
24888
|
+
if (v2.tag === "Right") {
|
|
24889
|
+
return fromJson2(v)(v2._1);
|
|
26045
24890
|
}
|
|
26046
24891
|
fail();
|
|
26047
24892
|
});
|
|
@@ -26064,14 +24909,15 @@ var foldl_with_index = /* @__PURE__ */ $Tuple(
|
|
|
26064
24909
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26065
24910
|
return (dictMonadAff) => {
|
|
26066
24911
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
|
26067
|
-
const
|
|
24912
|
+
const Bind1 = Monad0.Bind1();
|
|
24913
|
+
const $0 = Bind1.Apply0().Functor0();
|
|
26068
24914
|
return (dictMonadReader) => {
|
|
26069
24915
|
const apply12 = apply5(dictMonadReader)(dictMonadAff);
|
|
26070
24916
|
return (dictLoadFile) => {
|
|
26071
24917
|
const apply22 = apply12(dictLoadFile);
|
|
26072
|
-
return (v) => {
|
|
26073
|
-
if (
|
|
26074
|
-
const $1 =
|
|
24918
|
+
return (v) => (v1) => {
|
|
24919
|
+
if (v1.tag === "Cons" && v1._2.tag === "Cons" && v1._2._2.tag === "Cons" && v1._2._2._1._3.tag === "Dictionary" && v1._2._2._2.tag === "Nil") {
|
|
24920
|
+
const $1 = v1._1;
|
|
26075
24921
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
|
26076
24922
|
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
26077
24923
|
while (go$c) {
|
|
@@ -26085,8 +24931,19 @@ var foldl_with_index = /* @__PURE__ */ $Tuple(
|
|
|
26085
24931
|
go$a0 = (() => {
|
|
26086
24932
|
const $2 = v$1._1;
|
|
26087
24933
|
return Monad0.Bind1().bind(b)((a) => {
|
|
26088
|
-
const $3 =
|
|
26089
|
-
return $0.
|
|
24934
|
+
const $3 = a._1;
|
|
24935
|
+
return $0.map((v5) => $Tuple(v5, Nothing))(Bind1.bind(Bind1.bind(apply22(Nothing)($1)($Val(
|
|
24936
|
+
$2._2._1,
|
|
24937
|
+
Nothing,
|
|
24938
|
+
$BaseVal("Str", $2._1)
|
|
24939
|
+
)))((() => {
|
|
24940
|
+
const $4 = apply22(Nothing);
|
|
24941
|
+
return (a$1) => $4(a$1)($3);
|
|
24942
|
+
})()))((() => {
|
|
24943
|
+
const $4 = apply22(a._2);
|
|
24944
|
+
const $5 = $2._2._2;
|
|
24945
|
+
return (a$1) => $4(a$1)($5);
|
|
24946
|
+
})()));
|
|
26090
24947
|
});
|
|
26091
24948
|
})();
|
|
26092
24949
|
go$a1 = v$1._2;
|
|
@@ -26096,7 +24953,7 @@ var foldl_with_index = /* @__PURE__ */ $Tuple(
|
|
|
26096
24953
|
}
|
|
26097
24954
|
return go$r;
|
|
26098
24955
|
};
|
|
26099
|
-
return go(Monad0.Applicative0().pure(
|
|
24956
|
+
return $0.map(fst)(go(Monad0.Applicative0().pure($Tuple(v1._2._1, v)))(toUnfoldable22(v1._2._2._1._3._1)));
|
|
26100
24957
|
}
|
|
26101
24958
|
return $$throw2("Function, value and dictionary expected");
|
|
26102
24959
|
};
|
|
@@ -26107,15 +24964,53 @@ var foldl_with_index = /* @__PURE__ */ $Tuple(
|
|
|
26107
24964
|
}
|
|
26108
24965
|
})
|
|
26109
24966
|
);
|
|
24967
|
+
var find_str = /* @__PURE__ */ $Tuple(
|
|
24968
|
+
"find_str",
|
|
24969
|
+
/* @__PURE__ */ $ForeignOp$p({
|
|
24970
|
+
arity: 2,
|
|
24971
|
+
op: (dictMonadWithGraphAlloc) => {
|
|
24972
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
24973
|
+
return (dictMonadError) => {
|
|
24974
|
+
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
24975
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
24976
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Str" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Str" && v1._2._2.tag === "Nil") {
|
|
24977
|
+
return val2(v)(insert(ordVertex)(v1._2._1._1)()($$$Map(
|
|
24978
|
+
"Node",
|
|
24979
|
+
1,
|
|
24980
|
+
1,
|
|
24981
|
+
v1._1._1,
|
|
24982
|
+
void 0,
|
|
24983
|
+
Leaf2,
|
|
24984
|
+
Leaf2
|
|
24985
|
+
)))($BaseVal(
|
|
24986
|
+
"Int",
|
|
24987
|
+
(() => {
|
|
24988
|
+
const $0 = indexOf2(v1._1._3._1)(v1._2._1._3._1);
|
|
24989
|
+
if ($0.tag === "Nothing") {
|
|
24990
|
+
return -1;
|
|
24991
|
+
}
|
|
24992
|
+
if ($0.tag === "Just") {
|
|
24993
|
+
return $0._1;
|
|
24994
|
+
}
|
|
24995
|
+
fail();
|
|
24996
|
+
})()
|
|
24997
|
+
));
|
|
24998
|
+
}
|
|
24999
|
+
return $$throw2("Two strings expected");
|
|
25000
|
+
};
|
|
25001
|
+
};
|
|
25002
|
+
}
|
|
25003
|
+
})
|
|
25004
|
+
);
|
|
26110
25005
|
var error_ = /* @__PURE__ */ $Tuple(
|
|
26111
25006
|
"error",
|
|
26112
25007
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26113
25008
|
arity: 1,
|
|
26114
25009
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
|
26115
25010
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26116
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
26117
|
-
if (
|
|
26118
|
-
return dictMonadAff.MonadEffect0().Monad0().Applicative0().pure(throwException(error(
|
|
25011
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
25012
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Str" && v1._2.tag === "Nil") {
|
|
25013
|
+
return dictMonadAff.MonadEffect0().Monad0().Applicative0().pure(throwException(error(v1._1._3._1))());
|
|
26119
25014
|
}
|
|
26120
25015
|
return $$throw2("String expected");
|
|
26121
25016
|
};
|
|
@@ -26123,33 +25018,34 @@ var error_ = /* @__PURE__ */ $Tuple(
|
|
|
26123
25018
|
})
|
|
26124
25019
|
);
|
|
26125
25020
|
var divide = /* @__PURE__ */ union5(asNumberIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)((x) => (y) => toNumber(x) / toNumber(y))(numDiv);
|
|
25021
|
+
var div = (x) => (y) => unsafeClamp(floor(toNumber(x) / toNumber(y)));
|
|
25022
|
+
var mod = (x) => (y) => x - (y * div(x)(y) | 0) | 0;
|
|
26126
25023
|
var dims = /* @__PURE__ */ $Tuple(
|
|
26127
25024
|
"dims",
|
|
26128
25025
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26129
25026
|
arity: 1,
|
|
26130
25027
|
op: (dictMonadWithGraphAlloc) => {
|
|
26131
|
-
const
|
|
25028
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
26132
25029
|
return (dictMonadError) => {
|
|
26133
25030
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26134
25031
|
return (dictMonadAff) => {
|
|
26135
25032
|
const $0 = dictMonadAff.MonadEffect0().Monad0().Bind1();
|
|
26136
|
-
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
26137
|
-
if (
|
|
26138
|
-
const $1 =
|
|
26139
|
-
const $2 =
|
|
26140
|
-
const $3 =
|
|
26141
|
-
return $0.bind(
|
|
25033
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
25034
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Matrix" && v1._2.tag === "Nil") {
|
|
25035
|
+
const $1 = v1._1._3._1._2._2._1;
|
|
25036
|
+
const $2 = v1._1._1;
|
|
25037
|
+
const $3 = v1._1._3._1._2._2._2;
|
|
25038
|
+
return $0.bind(val2(Nothing)($$$Map("Node", 1, 1, v1._1._3._1._2._1._2, void 0, Leaf2, Leaf2))($BaseVal(
|
|
26142
25039
|
"Int",
|
|
26143
|
-
|
|
26144
|
-
)))((
|
|
26145
|
-
"
|
|
26146
|
-
1
|
|
26147
|
-
|
|
26148
|
-
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
))($BaseVal("Constr", "Pair", $List("Cons", v1, $List("Cons", v2, Nil))))));
|
|
25040
|
+
v1._1._3._1._2._1._1
|
|
25041
|
+
)))((v11) => $0.bind(val2(Nothing)($$$Map("Node", 1, 1, $3, void 0, Leaf2, Leaf2))($BaseVal(
|
|
25042
|
+
"Int",
|
|
25043
|
+
$1
|
|
25044
|
+
)))((v2) => val2(v)($$$Map("Node", 1, 1, $2, void 0, Leaf2, Leaf2))($BaseVal(
|
|
25045
|
+
"Constr",
|
|
25046
|
+
"Pair",
|
|
25047
|
+
$List("Cons", v11, $List("Cons", v2, Nil))
|
|
25048
|
+
))));
|
|
26153
25049
|
}
|
|
26154
25050
|
return $$throw2("Matrix expected");
|
|
26155
25051
|
};
|
|
@@ -26164,7 +25060,7 @@ var dict_map = /* @__PURE__ */ $Tuple(
|
|
|
26164
25060
|
arity: 2,
|
|
26165
25061
|
op: (dictMonadWithGraphAlloc) => {
|
|
26166
25062
|
const apply5 = apply2(dictMonadWithGraphAlloc);
|
|
26167
|
-
const
|
|
25063
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
26168
25064
|
return (dictMonadError) => {
|
|
26169
25065
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26170
25066
|
return (dictMonadAff) => {
|
|
@@ -26175,14 +25071,14 @@ var dict_map = /* @__PURE__ */ $Tuple(
|
|
|
26175
25071
|
const apply12 = apply5(dictMonadReader)(dictMonadAff);
|
|
26176
25072
|
return (dictLoadFile) => {
|
|
26177
25073
|
const apply22 = apply12(dictLoadFile);
|
|
26178
|
-
return (v) => {
|
|
26179
|
-
if (
|
|
26180
|
-
const $0 =
|
|
26181
|
-
const $1 =
|
|
26182
|
-
return Bind1.bind(traverse22((
|
|
26183
|
-
const $2 =
|
|
26184
|
-
return Bind1.Apply0().Functor0().map((
|
|
26185
|
-
})(
|
|
25074
|
+
return (v) => (v1) => {
|
|
25075
|
+
if (v1.tag === "Cons" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Dictionary" && v1._2._2.tag === "Nil") {
|
|
25076
|
+
const $0 = v1._1;
|
|
25077
|
+
const $1 = v1._2._1._1;
|
|
25078
|
+
return Bind1.bind(traverse22((v3) => {
|
|
25079
|
+
const $2 = v3._1;
|
|
25080
|
+
return Bind1.Apply0().Functor0().map((v4) => $Tuple($2, v4))(apply22(Nothing)($0)(v3._2));
|
|
25081
|
+
})(v1._2._1._3._1))((d$p) => val2(v)($$$Map("Node", 1, 1, $1, void 0, Leaf2, Leaf2))($BaseVal(
|
|
26186
25082
|
"Dictionary",
|
|
26187
25083
|
d$p
|
|
26188
25084
|
)));
|
|
@@ -26202,7 +25098,7 @@ var dict_intersectionWith = /* @__PURE__ */ $Tuple(
|
|
|
26202
25098
|
arity: 3,
|
|
26203
25099
|
op: (dictMonadWithGraphAlloc) => {
|
|
26204
25100
|
const apply5 = apply2(dictMonadWithGraphAlloc);
|
|
26205
|
-
const
|
|
25101
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
26206
25102
|
return (dictMonadError) => {
|
|
26207
25103
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26208
25104
|
return (dictMonadAff) => {
|
|
@@ -26214,25 +25110,28 @@ var dict_intersectionWith = /* @__PURE__ */ $Tuple(
|
|
|
26214
25110
|
const apply12 = apply5(dictMonadReader)(dictMonadAff);
|
|
26215
25111
|
return (dictLoadFile) => {
|
|
26216
25112
|
const apply22 = apply12(dictLoadFile);
|
|
26217
|
-
return (v) => {
|
|
26218
|
-
if (
|
|
26219
|
-
const $1 =
|
|
26220
|
-
const $2 =
|
|
26221
|
-
const $3 =
|
|
26222
|
-
return Bind1.bind($0.map(Dictionary2)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity14)(intersectionWith_Object((
|
|
26223
|
-
const $4 = v3.
|
|
26224
|
-
const $5 =
|
|
26225
|
-
|
|
26226
|
-
|
|
25113
|
+
return (v) => (v1) => {
|
|
25114
|
+
if (v1.tag === "Cons" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Dictionary" && v1._2._2.tag === "Cons" && v1._2._2._1._3.tag === "Dictionary" && v1._2._2._2.tag === "Nil") {
|
|
25115
|
+
const $1 = v1._1;
|
|
25116
|
+
const $2 = v1._2._1._1;
|
|
25117
|
+
const $3 = v1._2._2._1._1;
|
|
25118
|
+
return Bind1.bind($0.map(Dictionary2)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity14)(intersectionWith_Object((v3) => (v4) => {
|
|
25119
|
+
const $4 = v3._1;
|
|
25120
|
+
const $5 = v4._1;
|
|
25121
|
+
return Bind1.bind(Bind1.bind(apply22(Nothing)($1)(v3._2))((() => {
|
|
25122
|
+
const $6 = apply22(Nothing);
|
|
25123
|
+
const $7 = v4._2;
|
|
25124
|
+
return (a) => $6(a)($7);
|
|
25125
|
+
})()))((v5) => Bind1.bind(val2(Nothing)(insert(ordVertex)($5)()($$$Map(
|
|
26227
25126
|
"Node",
|
|
26228
25127
|
1,
|
|
26229
25128
|
1,
|
|
26230
|
-
$
|
|
25129
|
+
$4,
|
|
26231
25130
|
void 0,
|
|
26232
25131
|
Leaf2,
|
|
26233
25132
|
Leaf2
|
|
26234
|
-
)))(
|
|
26235
|
-
})(
|
|
25133
|
+
)))(v5._3))((v6) => Applicative0.pure($Tuple(v6._1, v5))));
|
|
25134
|
+
})(v1._2._1._3._1)(v1._2._2._1._3._1)))))((v$p) => val2(v)(insert(ordVertex)($3)()($$$Map(
|
|
26236
25135
|
"Node",
|
|
26237
25136
|
1,
|
|
26238
25137
|
1,
|
|
@@ -26256,20 +25155,20 @@ var dict_disjointUnion = /* @__PURE__ */ $Tuple(
|
|
|
26256
25155
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26257
25156
|
arity: 2,
|
|
26258
25157
|
op: (dictMonadWithGraphAlloc) => {
|
|
26259
|
-
const
|
|
25158
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
26260
25159
|
return (dictMonadError) => {
|
|
26261
25160
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26262
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
26263
|
-
if (
|
|
26264
|
-
return
|
|
25161
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
25162
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Dictionary" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Dictionary" && v1._2._2.tag === "Nil") {
|
|
25163
|
+
return val2(v)(insert(ordVertex)(v1._2._1._1)()($$$Map(
|
|
26265
25164
|
"Node",
|
|
26266
25165
|
1,
|
|
26267
25166
|
1,
|
|
26268
|
-
|
|
25167
|
+
v1._1._1,
|
|
26269
25168
|
void 0,
|
|
26270
25169
|
Leaf2,
|
|
26271
25170
|
Leaf2
|
|
26272
|
-
)))($BaseVal("Dictionary", disjointUnion3(
|
|
25171
|
+
)))($BaseVal("Dictionary", disjointUnion3(v1._1._3._1)(v1._2._1._3._1)));
|
|
26273
25172
|
}
|
|
26274
25173
|
return $$throw2("Dictionaries expected");
|
|
26275
25174
|
};
|
|
@@ -26282,20 +25181,20 @@ var dict_difference = /* @__PURE__ */ $Tuple(
|
|
|
26282
25181
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26283
25182
|
arity: 2,
|
|
26284
25183
|
op: (dictMonadWithGraphAlloc) => {
|
|
26285
|
-
const
|
|
25184
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
26286
25185
|
return (dictMonadError) => {
|
|
26287
25186
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26288
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
26289
|
-
if (
|
|
26290
|
-
return
|
|
25187
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
25188
|
+
if (v1.tag === "Cons" && v1._1._3.tag === "Dictionary" && v1._2.tag === "Cons" && v1._2._1._3.tag === "Dictionary" && v1._2._2.tag === "Nil") {
|
|
25189
|
+
return val2(v)(insert(ordVertex)(v1._2._1._1)()($$$Map(
|
|
26291
25190
|
"Node",
|
|
26292
25191
|
1,
|
|
26293
25192
|
1,
|
|
26294
|
-
|
|
25193
|
+
v1._1._1,
|
|
26295
25194
|
void 0,
|
|
26296
25195
|
Leaf2,
|
|
26297
25196
|
Leaf2
|
|
26298
|
-
)))($BaseVal("Dictionary", mapFObjectString.difference(
|
|
25197
|
+
)))($BaseVal("Dictionary", mapFObjectString.difference(v1._1._3._1)(v1._2._1._3._1)));
|
|
26299
25198
|
}
|
|
26300
25199
|
return $$throw2("Dictionaries expected.");
|
|
26301
25200
|
};
|
|
@@ -26308,42 +25207,42 @@ var dict = /* @__PURE__ */ $Tuple(
|
|
|
26308
25207
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26309
25208
|
arity: 1,
|
|
26310
25209
|
op: (dictMonadWithGraphAlloc) => {
|
|
26311
|
-
const
|
|
25210
|
+
const val2 = val(dictMonadWithGraphAlloc);
|
|
26312
25211
|
return (dictMonadError) => {
|
|
26313
25212
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26314
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
26315
|
-
if (
|
|
25213
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
25214
|
+
if (v1.tag === "Cons" && v1._2.tag === "Nil") {
|
|
26316
25215
|
const kvs$p = (dictMonadError1) => {
|
|
26317
25216
|
const MonadThrow0 = dictMonadError1.MonadThrow0();
|
|
26318
25217
|
const Monad0 = MonadThrow0.Monad0();
|
|
26319
25218
|
const $0 = Monad0.Applicative0();
|
|
26320
|
-
return (
|
|
26321
|
-
if (
|
|
26322
|
-
if (
|
|
26323
|
-
if (
|
|
25219
|
+
return (v3) => {
|
|
25220
|
+
if (v3._3.tag === "Constr") {
|
|
25221
|
+
if (v3._3._2.tag === "Nil") {
|
|
25222
|
+
if (v3._3._1 === "Nil") {
|
|
26324
25223
|
return $0.pure($Tuple(
|
|
26325
|
-
$$$Map("Node", 1, 1,
|
|
25224
|
+
$$$Map("Node", 1, 1, v3._1, void 0, Leaf2, Leaf2),
|
|
26326
25225
|
Nil
|
|
26327
25226
|
));
|
|
26328
25227
|
}
|
|
26329
25228
|
return MonadThrow0.throwError(error("List of (key, value) pairs expected"));
|
|
26330
25229
|
}
|
|
26331
|
-
if (
|
|
26332
|
-
const $1 =
|
|
26333
|
-
const $2 =
|
|
26334
|
-
const $3 =
|
|
26335
|
-
const $4 =
|
|
26336
|
-
const $5 =
|
|
26337
|
-
return Monad0.Bind1().bind(kvs$p(dictMonadError1)(
|
|
26338
|
-
insert(ordVertex)($3)()(insert(ordVertex)($5)()(
|
|
26339
|
-
$List("Cons", $Tuple($1, $Tuple($4, $2)),
|
|
25230
|
+
if (v3._3._2.tag === "Cons" && v3._3._2._1._3.tag === "Constr" && v3._3._2._1._3._2.tag === "Cons" && v3._3._2._1._3._2._1._3.tag === "Str" && v3._3._2._1._3._2._2.tag === "Cons" && v3._3._2._1._3._2._2._2.tag === "Nil" && v3._3._2._2.tag === "Cons" && v3._3._2._2._2.tag === "Nil" && v3._3._1 === ":" && v3._3._2._1._3._1 === "Pair") {
|
|
25231
|
+
const $1 = v3._3._2._1._3._2._1._3._1;
|
|
25232
|
+
const $2 = v3._3._2._1._3._2._2._1;
|
|
25233
|
+
const $3 = v3._1;
|
|
25234
|
+
const $4 = v3._3._2._1._3._2._1._1;
|
|
25235
|
+
const $5 = v3._3._2._1._1;
|
|
25236
|
+
return Monad0.Bind1().bind(kvs$p(dictMonadError1)(v3._3._2._2._1))((v4) => $0.pure($Tuple(
|
|
25237
|
+
insert(ordVertex)($3)()(insert(ordVertex)($5)()(v4._1)),
|
|
25238
|
+
$List("Cons", $Tuple($1, $Tuple($4, $2)), v4._2)
|
|
26340
25239
|
)));
|
|
26341
25240
|
}
|
|
26342
25241
|
}
|
|
26343
25242
|
return MonadThrow0.throwError(error("List of (key, value) pairs expected"));
|
|
26344
25243
|
};
|
|
26345
25244
|
};
|
|
26346
|
-
return dictMonadAff.MonadEffect0().Monad0().Bind1().bind(kvs$p(dictMonadError)(
|
|
25245
|
+
return dictMonadAff.MonadEffect0().Monad0().Bind1().bind(kvs$p(dictMonadError)(v1._1))((v3) => val2(v)(v3._1)($BaseVal("Dictionary", fromFoldable110(v3._2))));
|
|
26347
25246
|
}
|
|
26348
25247
|
return $$throw2("Single argument expected");
|
|
26349
25248
|
};
|
|
@@ -26352,14 +25251,14 @@ var dict = /* @__PURE__ */ $Tuple(
|
|
|
26352
25251
|
})
|
|
26353
25252
|
);
|
|
26354
25253
|
var debugLog = /* @__PURE__ */ $Tuple(
|
|
26355
|
-
"
|
|
25254
|
+
"debug_log",
|
|
26356
25255
|
/* @__PURE__ */ $ForeignOp$p({
|
|
26357
25256
|
arity: 1,
|
|
26358
25257
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
|
26359
25258
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
|
26360
|
-
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
|
26361
|
-
if (
|
|
26362
|
-
const $0 =
|
|
25259
|
+
return (dictMonadAff) => (dictMonadReader) => (dictLoadFile) => (v) => (v1) => {
|
|
25260
|
+
if (v1.tag === "Cons" && v1._2.tag === "Nil") {
|
|
25261
|
+
const $0 = v1._1;
|
|
26363
25262
|
return dictMonadAff.MonadEffect0().Monad0().Applicative0().pure(_trace($0, (v$1) => $0));
|
|
26364
25263
|
}
|
|
26365
25264
|
return $$throw2("Single argument expected");
|
|
@@ -26387,7 +25286,7 @@ var primitives = /* @__PURE__ */ (() => fromFoldable20([
|
|
|
26387
25286
|
}),
|
|
26388
25287
|
unary2("floor")({ i: number, o: $$int, fwd: floor2 }),
|
|
26389
25288
|
unary2("log")({ i: intOrNumber, o: number, fwd: log3 }),
|
|
26390
|
-
unary2("
|
|
25289
|
+
unary2("num_to_str")({ i: intOrNumber, o: string, fwd: numToStr }),
|
|
26391
25290
|
binary2("+")({
|
|
26392
25291
|
i1: intOrNumber,
|
|
26393
25292
|
i2: intOrNumber,
|
|
@@ -26454,10 +25353,14 @@ var primitives = /* @__PURE__ */ (() => fromFoldable20([
|
|
|
26454
25353
|
matrixUpdate._1,
|
|
26455
25354
|
$Val(void 0, Nothing, $BaseVal("Fun", $Fun("Foreign", $Tuple(matrixUpdate._1, matrixUpdate._2), Nil)))
|
|
26456
25355
|
),
|
|
25356
|
+
$Tuple(
|
|
25357
|
+
find_str._1,
|
|
25358
|
+
$Val(void 0, Nothing, $BaseVal("Fun", $Fun("Foreign", $Tuple(find_str._1, find_str._2), Nil)))
|
|
25359
|
+
),
|
|
26457
25360
|
$Tuple(search2._1, $Val(void 0, Nothing, $BaseVal("Fun", $Fun("Foreign", $Tuple(search2._1, search2._2), Nil)))),
|
|
26458
25361
|
$Tuple(split3._1, $Val(void 0, Nothing, $BaseVal("Fun", $Fun("Foreign", $Tuple(split3._1, split3._2), Nil)))),
|
|
26459
|
-
binaryZero22("
|
|
26460
|
-
binaryZero22("
|
|
25362
|
+
binaryZero22("//")({ i: $$int, o: $$int, fwd: div }),
|
|
25363
|
+
binaryZero22("%")({ i: $$int, o: $$int, fwd: mod }),
|
|
26461
25364
|
binaryZero22("quot")({ i: $$int, o: $$int, fwd: quot }),
|
|
26462
25365
|
binaryZero22("rem")({ i: $$int, o: $$int, fwd: rem })
|
|
26463
25366
|
]))();
|