@explorable-viz/fluid 0.7.75 → 0.7.77
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/.spago/affjax-node/v1.0.0/.editorconfig +13 -0
- package/.spago/affjax-node/v1.0.0/.eslintrc.json +30 -0
- package/.spago/affjax-node/v1.0.0/.gitignore +13 -0
- package/.spago/pathy/v9.0.0/.editorconfig +13 -0
- package/.spago/pathy/v9.0.0/.gitignore +9 -0
- package/.spago/pathy/v9.0.0/.tidyrc.json +10 -0
- package/LICENSE +1 -1
- package/dist/fluid/fluid/lib/convolution.fld +27 -12
- package/dist/fluid/shared/fluid.mjs +267 -161
- package/dist/fluid/shared/load-figure.js +265 -167
- package/package.json +2 -1
- package/script/bundle-website.sh +3 -5
- package/.spago/node-process/v11.0.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.0.0/.gitignore +0 -8
- package/.spago/node-process/v11.1.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.1.0/.gitignore +0 -8
- package/.spago/node-process/v11.2.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.2.0/.gitignore +0 -8
- package/.spago/optparse/v6.0.0/.gitignore +0 -8
- package/.spago/optparse/v6.0.0/.npmrc +0 -1
@@ -156,6 +156,14 @@ var intercalate = function(separator) {
|
|
156
156
|
var showString = { show: showStringImpl };
|
157
157
|
var showNumber = { show: showNumberImpl };
|
158
158
|
var showInt = { show: showIntImpl };
|
159
|
+
var showBoolean = {
|
160
|
+
show: (v) => {
|
161
|
+
if (v) {
|
162
|
+
return "true";
|
163
|
+
}
|
164
|
+
return "false";
|
165
|
+
}
|
166
|
+
};
|
159
167
|
|
160
168
|
// output-es/Data.Generic.Rep/index.js
|
161
169
|
var $NoArguments = () => ({ tag: "NoArguments" });
|
@@ -11576,22 +11584,29 @@ var verticesVertex = (dictFunctor) => (dictFoldable) => ({
|
|
11576
11584
|
return (x) => $0(dictFunctor.map(singleton2)(x));
|
11577
11585
|
})()
|
11578
11586
|
});
|
11587
|
+
var eqDVertex = { eq: (v) => (v1) => v._1 === v1._1 };
|
11588
|
+
var ordDVertex = { compare: (v) => (v1) => ordString.compare(v._1)(v1._1), Eq0: () => eqDVertex };
|
11589
|
+
var unDVertex = /* @__PURE__ */ map(ordVertex)((x) => x._1);
|
11579
11590
|
var showVertices = (\u03B1s) => "{" + joinWith(", ")(fromFoldable5(map(ordString)(unsafeCoerce)(\u03B1s))) + "}";
|
11580
11591
|
var showEdgeList = (es) => joinWith("\n")([
|
11581
11592
|
"digraph G {",
|
11582
11593
|
...arrayMap((v) => " " + v)([
|
11583
11594
|
"rankdir = RL",
|
11584
|
-
...arrayMap((v) => v._1 + " -> {" + joinWith(", ")(fromFoldable5(map(ordString)(unsafeCoerce)(v._2))) + "}")(fromFoldable13(reverse2(es)))
|
11595
|
+
...arrayMap((v) => v._1 + " -> {" + joinWith(", ")(fromFoldable5(map(ordString)(unsafeCoerce)(v._2._1))) + "}")(fromFoldable13(reverse2(es)))
|
11585
11596
|
]),
|
11586
11597
|
"}"
|
11587
11598
|
]);
|
11599
|
+
var pack1 = (x) => (k) => k(showString)(x);
|
11588
11600
|
var toEdgeList = (dictGraph) => (g) => {
|
11589
11601
|
const $0 = (v) => {
|
11590
11602
|
if (v._1.tag === "Nil") {
|
11591
11603
|
return $Step("Done", v._2);
|
11592
11604
|
}
|
11593
11605
|
if (v._1.tag === "Cons") {
|
11594
|
-
return $Step(
|
11606
|
+
return $Step(
|
11607
|
+
"Loop",
|
11608
|
+
$Tuple(v._1._2, $List("Cons", $Tuple(v._1._1, $Tuple(dictGraph.outN(g)(v._1._1), pack1(""))), v._2))
|
11609
|
+
);
|
11595
11610
|
}
|
11596
11611
|
fail();
|
11597
11612
|
};
|
@@ -11879,14 +11894,15 @@ var $GraphImpl = (_1) => ({ tag: "GraphImpl", _1 });
|
|
11879
11894
|
var eqSet2 = { eq: (v) => (v1) => eqMap(eqVertex)(eqUnit).eq(v)(v1) };
|
11880
11895
|
var eq = /* @__PURE__ */ (() => eqObject(eqSet2).eq)();
|
11881
11896
|
var fromFoldable7 = /* @__PURE__ */ foldlArray((m) => (a) => insert(ordVertex)(a)()(m))(Leaf2);
|
11897
|
+
var pack = (x) => (k) => k(showString)(x);
|
11882
11898
|
var toUnfoldable6 = /* @__PURE__ */ toUnfoldable4(unfoldableList);
|
11883
11899
|
var fromFoldable15 = /* @__PURE__ */ (() => foldableSet.foldr(Cons)(Nil))();
|
11884
11900
|
var fromFoldable23 = /* @__PURE__ */ (() => foldableSet.foldl((m) => (a) => insert(ordVertex)(a)()(m))(Leaf2))();
|
11885
11901
|
var toUnfoldable12 = /* @__PURE__ */ toAscUnfoldable(unfoldableArray);
|
11886
11902
|
var fromFoldable32 = /* @__PURE__ */ fromFoldable(ordVertex)(foldableArray);
|
11887
11903
|
var verticesGraphImpl = { vertices: (v) => v._1.vertices };
|
11888
|
-
var eqGraphImpl = { eq: (v) => (v1) => eq(v._1.out)(v1._1.out) };
|
11889
|
-
var sinks$p = (m) => fromFoldable7(arrayMap((x) => x._1)(filter((x) => x._2.tag === "Leaf")(toArrayWithKey(Tuple)(m))));
|
11904
|
+
var eqGraphImpl = { eq: (v) => (v1) => eq(_fmapObject(v._1.out, fst))(_fmapObject(v1._1.out, fst)) };
|
11905
|
+
var sinks$p = (m) => fromFoldable7(arrayMap((x) => x._1)(filter((x) => x._2._1.tag === "Leaf")(toArrayWithKey(Tuple)(m))));
|
11890
11906
|
var init4 = (\u03B1s) => () => {
|
11891
11907
|
const obj = {};
|
11892
11908
|
return monadRecST.tailRecM((v) => {
|
@@ -11898,7 +11914,7 @@ var init4 = (\u03B1s) => () => {
|
|
11898
11914
|
const $1 = v._1._2;
|
11899
11915
|
const $2 = v._2;
|
11900
11916
|
return () => {
|
11901
|
-
$2[$0] = Leaf2;
|
11917
|
+
$2[$0] = $Tuple(Leaf2, pack("uninit: init"));
|
11902
11918
|
return $Step("Loop", $Tuple($1, $2));
|
11903
11919
|
};
|
11904
11920
|
}
|
@@ -11934,7 +11950,7 @@ var addIfMissing = (acc) => (v) => {
|
|
11934
11950
|
return () => {
|
11935
11951
|
const v1 = $0();
|
11936
11952
|
if (v1.tag === "Nothing") {
|
11937
|
-
acc[v] = Leaf2;
|
11953
|
+
acc[v] = $Tuple(Leaf2, pack("uninit: missing"));
|
11938
11954
|
return acc;
|
11939
11955
|
}
|
11940
11956
|
if (v1.tag === "Just") {
|
@@ -11968,27 +11984,28 @@ var outMap = (\u03B1s) => (es) => {
|
|
11968
11984
|
if (v._1.tag === "Cons") {
|
11969
11985
|
const $1 = v._2;
|
11970
11986
|
const $2 = v._1._2;
|
11971
|
-
const $3 = v._1._1.
|
11972
|
-
const $4 = v._1._1.
|
11973
|
-
const $5 =
|
11987
|
+
const $3 = v._1._1._2._2;
|
11988
|
+
const $4 = v._1._1._1;
|
11989
|
+
const $5 = v._1._1._2._1;
|
11990
|
+
const $6 = peek($4)($1);
|
11974
11991
|
return () => {
|
11975
|
-
const $
|
11992
|
+
const $7 = $6();
|
11976
11993
|
if ((() => {
|
11977
|
-
if ($
|
11994
|
+
if ($7.tag === "Nothing") {
|
11978
11995
|
return true;
|
11979
11996
|
}
|
11980
|
-
if ($
|
11981
|
-
return eqMap(eqVertex)(eqUnit).eq($
|
11997
|
+
if ($7.tag === "Just") {
|
11998
|
+
return eqMap(eqVertex)(eqUnit).eq($7._1._1)(Leaf2);
|
11982
11999
|
}
|
11983
12000
|
fail();
|
11984
12001
|
})()) {
|
11985
|
-
const \u03B2s$p = toUnfoldable6($
|
12002
|
+
const \u03B2s$p = toUnfoldable6($5);
|
11986
12003
|
monadRecST.tailRecM(assertPresent($1))(\u03B2s$p)();
|
11987
|
-
$1[$
|
12004
|
+
$1[$4] = $Tuple($5, $3);
|
11988
12005
|
const acc$p = addIfMissing$p(\u03B2s$p)($1)();
|
11989
12006
|
return $Step("Loop", $Tuple($2, acc$p));
|
11990
12007
|
}
|
11991
|
-
return throwException(error("Duplicate edge list entry for " + showStringImpl($
|
12008
|
+
return throwException(error("Duplicate edge list entry for " + showStringImpl($4)))()();
|
11992
12009
|
};
|
11993
12010
|
}
|
11994
12011
|
fail();
|
@@ -12005,37 +12022,38 @@ var inMap = (\u03B1s) => (es) => {
|
|
12005
12022
|
}
|
12006
12023
|
if (v._1.tag === "Cons") {
|
12007
12024
|
const $1 = v._1._2;
|
12008
|
-
const $2 = v._1._1.
|
12009
|
-
const $3 =
|
12010
|
-
|
12011
|
-
|
12025
|
+
const $2 = v._1._1._2._2;
|
12026
|
+
const $3 = v._1._1._1;
|
12027
|
+
const $4 = monadRecST.tailRecM((v2) => {
|
12028
|
+
if (v2._1.tag === "Nil") {
|
12029
|
+
return () => $Step("Done", v2._2);
|
12012
12030
|
}
|
12013
|
-
if (
|
12014
|
-
const $
|
12015
|
-
const $
|
12016
|
-
const $
|
12017
|
-
const $
|
12031
|
+
if (v2._1.tag === "Cons") {
|
12032
|
+
const $42 = v2._2;
|
12033
|
+
const $5 = v2._1._1;
|
12034
|
+
const $6 = v2._1._2;
|
12035
|
+
const $7 = peek($5)($42);
|
12018
12036
|
return () => {
|
12019
|
-
const v1
|
12037
|
+
const v1 = $7();
|
12020
12038
|
const acc$p = (() => {
|
12021
|
-
if (v1
|
12022
|
-
$
|
12023
|
-
return $
|
12039
|
+
if (v1.tag === "Nothing") {
|
12040
|
+
$42[$5] = $Tuple($$$Map("Two", Leaf2, $3, void 0, Leaf2), $2);
|
12041
|
+
return $42;
|
12024
12042
|
}
|
12025
|
-
if (v1
|
12026
|
-
$
|
12027
|
-
return $
|
12043
|
+
if (v1.tag === "Just") {
|
12044
|
+
$42[$5] = $Tuple(insert(ordVertex)($3)()(v1._1._1), $2);
|
12045
|
+
return $42;
|
12028
12046
|
}
|
12029
12047
|
fail();
|
12030
12048
|
})();
|
12031
|
-
return $Step("Loop", $Tuple($
|
12049
|
+
return $Step("Loop", $Tuple($6, acc$p));
|
12032
12050
|
};
|
12033
12051
|
}
|
12034
12052
|
fail();
|
12035
|
-
})($Tuple(toUnfoldable6(v._1._1._2), v._2));
|
12053
|
+
})($Tuple(toUnfoldable6(v._1._1._2._1), v._2));
|
12036
12054
|
return () => {
|
12037
|
-
const a = $
|
12038
|
-
const acc$p = addIfMissing(a)($
|
12055
|
+
const a = $4();
|
12056
|
+
const acc$p = addIfMissing(a)($3)();
|
12039
12057
|
return $Step("Loop", $Tuple($1, acc$p));
|
12040
12058
|
};
|
12041
12059
|
}
|
@@ -12044,7 +12062,8 @@ var inMap = (\u03B1s) => (es) => {
|
|
12044
12062
|
};
|
12045
12063
|
};
|
12046
12064
|
var graphGraphImpl = {
|
12047
|
-
outN: (v) => (\u03B1) => definitely("in graph")(_lookup(Nothing, Just, \u03B1, v._1.out)),
|
12065
|
+
outN: (v) => (\u03B1) => definitely("in graph")(_lookup(Nothing, Just, \u03B1, v._1.out))._1,
|
12066
|
+
vertexData: (v) => (\u03B1) => definitely("in graph")(_lookup(Nothing, Just, \u03B1, v._1.out))._2,
|
12048
12067
|
inN: (g) => graphGraphImpl.outN(graphGraphImpl.op(g)),
|
12049
12068
|
elem: (\u03B1) => (v) => {
|
12050
12069
|
const $0 = _lookup(Nothing, Just, \u03B1, v._1.out);
|
@@ -12083,7 +12102,7 @@ var graphGraphImpl = {
|
|
12083
12102
|
topologicalSort: (v) => reverse2(topologicalSort(ordVertex)(fromFoldable32(arrayMap((x) => $Tuple(
|
12084
12103
|
x._1,
|
12085
12104
|
$Tuple(void 0, x._2)
|
12086
|
-
))(toUnfoldable12(_fmapObject(v._1.out, toUnfoldable6)))))),
|
12105
|
+
))(toUnfoldable12(_fmapObject(_fmapObject(v._1.out, fst), toUnfoldable6)))))),
|
12087
12106
|
Eq0: () => eqGraphImpl,
|
12088
12107
|
Vertices1: () => verticesGraphImpl
|
12089
12108
|
};
|
@@ -12115,8 +12134,8 @@ var monadWithGraphWithGraphT = (dictMonad) => {
|
|
12115
12134
|
const $1 = monadStateStateT(dictMonad);
|
12116
12135
|
const monadStateT2 = { Applicative0: () => applicativeStateT(dictMonad), Bind1: () => bindStateT(dictMonad) };
|
12117
12136
|
return {
|
12118
|
-
extend: (\u03B1) => (\u03B1s) => {
|
12119
|
-
const $2 = Cons($Tuple(\u03B1, \u03B1s));
|
12137
|
+
extend: (\u03B1) => (\u03B1s) => (vd) => {
|
12138
|
+
const $2 = Cons($Tuple(\u03B1, $Tuple(\u03B1s, vd)));
|
12120
12139
|
const $3 = $1.state((s) => $Tuple(void 0, $2(s)));
|
12121
12140
|
return (s) => $0.map((v1) => $Tuple(void 0, v1._2))($3(s));
|
12122
12141
|
},
|
@@ -12196,7 +12215,7 @@ var monadWithGraphAllocWithGr = (dictMonadError) => {
|
|
12196
12215
|
const monadWithGraphWithGraphT1 = monadWithGraphWithGraphT(monadStateT2);
|
12197
12216
|
const monadErrorStateT2 = monadErrorStateT(monadErrorStateT(dictMonadError));
|
12198
12217
|
return {
|
12199
|
-
new: (\u03B1s) => bindStateT2.bind(fresh1)((\u03B1) => bindStateT2.bind(monadWithGraphWithGraphT1.extend(\u03B1)(\u03B1s))(() => applicativeStateT(monadStateT2).pure(\u03B1))),
|
12218
|
+
new: (\u03B1s) => (vd) => bindStateT2.bind(fresh1)((\u03B1) => bindStateT2.bind(monadWithGraphWithGraphT1.extend(\u03B1)(\u03B1s)(vd))(() => applicativeStateT(monadStateT2).pure(\u03B1))),
|
12200
12219
|
MonadAlloc0: () => monadAllocWithGraphAllocT1,
|
12201
12220
|
MonadError1: () => monadErrorStateT2,
|
12202
12221
|
MonadWithGraph2: () => monadWithGraphWithGraphT1
|
@@ -12206,6 +12225,7 @@ var monadWithGraphAllocWithGr = (dictMonadError) => {
|
|
12206
12225
|
// output-es/Graph.Slice/index.js
|
12207
12226
|
var pure = /* @__PURE__ */ (() => applicativeStateT(monadIdentity).pure)();
|
12208
12227
|
var extend = /* @__PURE__ */ (() => monadWithGraphWithGraphT(monadIdentity).extend)();
|
12228
|
+
var pack2 = (x) => (k) => k(showString)(x);
|
12209
12229
|
var tailRecM = /* @__PURE__ */ (() => monadRecStateT(monadRecIdentity).tailRecM)();
|
12210
12230
|
var member3 = /* @__PURE__ */ (() => setSet(ordVertex).member)();
|
12211
12231
|
var fromFoldable9 = /* @__PURE__ */ (() => foldableSet.foldr(Cons)(Nil))();
|
@@ -12231,7 +12251,7 @@ var fwdSlice = (dictGraph) => {
|
|
12231
12251
|
fail();
|
12232
12252
|
})();
|
12233
12253
|
if (eqMap(eqVertex)(eqUnit).eq(\u03B2s)(dictGraph.outN($0)(v1.es._1._1))) {
|
12234
|
-
return bindStateT(monadIdentity).bind(extend(v1.es._1._1)(\u03B2s))(() => pure($Step(
|
12254
|
+
return bindStateT(monadIdentity).bind(extend(v1.es._1._1)(\u03B2s)(pack2("uninit: fwd")))(() => pure($Step(
|
12235
12255
|
"Loop",
|
12236
12256
|
{
|
12237
12257
|
pending: $$delete(ordVertex)(v1.es._1._1)(v1.pending),
|
@@ -12256,10 +12276,12 @@ var bwdSlice = (dictGraph) => {
|
|
12256
12276
|
return pure($Step("Done", void 0));
|
12257
12277
|
}
|
12258
12278
|
if (v1.pending.tag === "Cons") {
|
12279
|
+
const $2 = v1.pending._1._2._2;
|
12280
|
+
const $3 = v1.pending._1._2._1;
|
12259
12281
|
if (member3(v1.pending._1._1)(v1.visited)) {
|
12260
12282
|
return pure($Step("Loop", { visited: v1.visited, "\u03B1s": Nil, pending: v1.pending._2 }));
|
12261
12283
|
}
|
12262
|
-
return bindStateT(monadIdentity).bind(extend(v1.pending._1._1)(v1.pending._1.
|
12284
|
+
return bindStateT(monadIdentity).bind(extend(v1.pending._1._1)($3)(spyWhen(false)("Value found at " + showStringImpl(v1.pending._1._1))((v$1) => v$1((dictShow) => dictShow.show))($2)))(() => pure($Step(
|
12263
12285
|
"Loop",
|
12264
12286
|
{ visited: insert(ordVertex)(v1.pending._1._1)()(v1.visited), "\u03B1s": Nil, pending: v1.pending._2 }
|
12265
12287
|
)));
|
@@ -12273,7 +12295,7 @@ var bwdSlice = (dictGraph) => {
|
|
12273
12295
|
{
|
12274
12296
|
visited: v1.visited,
|
12275
12297
|
"\u03B1s": foldableList.foldr(Cons)(v1["\u03B1s"]._2)(fromFoldable9(\u03B2s)),
|
12276
|
-
pending: $List("Cons", $Tuple(v1["\u03B1s"]._1, \u03B2s), v1.pending)
|
12298
|
+
pending: $List("Cons", $Tuple(v1["\u03B1s"]._1, $Tuple(\u03B2s, dictGraph.vertexData($0)(v1["\u03B1s"]._1))), v1.pending)
|
12277
12299
|
}
|
12278
12300
|
));
|
12279
12301
|
}
|
@@ -17089,6 +17111,32 @@ var Dictionary3 = (value0) => $BaseVal("Dictionary", value0);
|
|
17089
17111
|
var DictRep = (x) => x;
|
17090
17112
|
var MatrixRep = (x) => x;
|
17091
17113
|
var Env = (x) => x;
|
17114
|
+
var showBaseVal = {
|
17115
|
+
show: (v) => {
|
17116
|
+
if (v.tag === "Int") {
|
17117
|
+
return showIntImpl(v._1);
|
17118
|
+
}
|
17119
|
+
if (v.tag === "Float") {
|
17120
|
+
return showNumberImpl(v._1);
|
17121
|
+
}
|
17122
|
+
if (v.tag === "Str") {
|
17123
|
+
return showStringImpl(v._1);
|
17124
|
+
}
|
17125
|
+
if (v.tag === "Constr") {
|
17126
|
+
return showStringImpl(v._1);
|
17127
|
+
}
|
17128
|
+
if (v.tag === "Dictionary") {
|
17129
|
+
return "Dictionary";
|
17130
|
+
}
|
17131
|
+
if (v.tag === "Matrix") {
|
17132
|
+
return "Matrix";
|
17133
|
+
}
|
17134
|
+
if (v.tag === "Fun") {
|
17135
|
+
return "Function";
|
17136
|
+
}
|
17137
|
+
fail();
|
17138
|
+
}
|
17139
|
+
};
|
17092
17140
|
var isEmptyEnv = { isEmpty: (v) => isEmpty2(v) };
|
17093
17141
|
var setEnvString = {
|
17094
17142
|
empty,
|
@@ -17874,7 +17922,7 @@ var string = {
|
|
17874
17922
|
return typeError(v)("Str");
|
17875
17923
|
}
|
17876
17924
|
};
|
17877
|
-
var unary = (dictBoundedJoinSemilattice) => {
|
17925
|
+
var unary = (dictShow) => (dictBoundedJoinSemilattice) => {
|
17878
17926
|
const bot = dictBoundedJoinSemilattice.bot;
|
17879
17927
|
return (id) => (f) => $Tuple(
|
17880
17928
|
id,
|
@@ -17892,17 +17940,17 @@ var unary = (dictBoundedJoinSemilattice) => {
|
|
17892
17940
|
const $0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0();
|
17893
17941
|
return (v) => {
|
17894
17942
|
if (v.tag === "Cons" && v._2.tag === "Nil") {
|
17895
|
-
const $
|
17943
|
+
const v$p = f.fwd(f.i.unpack(v._1._2));
|
17896
17944
|
return $0.map((() => {
|
17897
|
-
const $
|
17898
|
-
return (v$1) => $Val(v$1._2, $
|
17899
|
-
})())($0.map((v2) => $Tuple(
|
17945
|
+
const $1 = f.o;
|
17946
|
+
return (v$1) => $Val(v$1._2, $1.pack(v$1._1));
|
17947
|
+
})())($0.map((v2) => $Tuple(v$p, v2))(dictMonadWithGraphAlloc.new($$$Map(
|
17900
17948
|
"Two",
|
17901
17949
|
Leaf2,
|
17902
17950
|
v._1._1,
|
17903
17951
|
void 0,
|
17904
17952
|
Leaf2
|
17905
|
-
))));
|
17953
|
+
))((k) => k(dictShow)(v$p))));
|
17906
17954
|
}
|
17907
17955
|
fail();
|
17908
17956
|
};
|
@@ -18031,7 +18079,7 @@ var $$boolean = {
|
|
18031
18079
|
return typeError(v)("Boolean");
|
18032
18080
|
}
|
18033
18081
|
};
|
18034
|
-
var binaryZero = (dictBoundedJoinSemilattice) => {
|
18082
|
+
var binaryZero = (dictShow) => (dictBoundedJoinSemilattice) => {
|
18035
18083
|
const bot = dictBoundedJoinSemilattice.bot;
|
18036
18084
|
return (dictIsZero) => (id) => (f) => $Tuple(
|
18037
18085
|
id,
|
@@ -18051,10 +18099,11 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
18051
18099
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
18052
18100
|
const $1 = f.i.unpack(v._1._2);
|
18053
18101
|
const $2 = f.i.unpack(v._2._1._2);
|
18102
|
+
const v$p = f.fwd($1)($2);
|
18054
18103
|
return $0.map((() => {
|
18055
18104
|
const $3 = f.o;
|
18056
18105
|
return (v$1) => $Val(v$1._2, $3.pack(v$1._1));
|
18057
|
-
})())($0.map((v4) => $Tuple(
|
18106
|
+
})())($0.map((v4) => $Tuple(v$p, v4))(dictMonadWithGraphAlloc.new((() => {
|
18058
18107
|
if (dictIsZero.isZero($1)) {
|
18059
18108
|
return $$$Map("Two", Leaf2, v._1._1, void 0, Leaf2);
|
18060
18109
|
}
|
@@ -18068,7 +18117,7 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
18068
18117
|
void 0,
|
18069
18118
|
Leaf2
|
18070
18119
|
));
|
18071
|
-
})())));
|
18120
|
+
})())((k) => k(dictShow)(v$p))));
|
18072
18121
|
}
|
18073
18122
|
fail();
|
18074
18123
|
};
|
@@ -18119,7 +18168,7 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
18119
18168
|
)
|
18120
18169
|
);
|
18121
18170
|
};
|
18122
|
-
var binary = (dictBoundedJoinSemilattice) => {
|
18171
|
+
var binary = (dictShow) => (dictBoundedJoinSemilattice) => {
|
18123
18172
|
const bot = dictBoundedJoinSemilattice.bot;
|
18124
18173
|
return (id) => (f) => $Tuple(
|
18125
18174
|
id,
|
@@ -18137,18 +18186,17 @@ var binary = (dictBoundedJoinSemilattice) => {
|
|
18137
18186
|
const $0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0();
|
18138
18187
|
return (v) => {
|
18139
18188
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
18140
|
-
const $
|
18141
|
-
const $2 = v._2._1._2;
|
18189
|
+
const v$p = f.fwd(f.i1.unpack(v._1._2))(f.i2.unpack(v._2._1._2));
|
18142
18190
|
return $0.map((() => {
|
18143
|
-
const $
|
18144
|
-
return (v$1) => $Val(v$1._2, $
|
18145
|
-
})())($0.map((v3) => $Tuple(
|
18191
|
+
const $1 = f.o;
|
18192
|
+
return (v$1) => $Val(v$1._2, $1.pack(v$1._1));
|
18193
|
+
})())($0.map((v3) => $Tuple(v$p, v3))(dictMonadWithGraphAlloc.new(insert(ordVertex)(v._2._1._1)()($$$Map(
|
18146
18194
|
"Two",
|
18147
18195
|
Leaf2,
|
18148
18196
|
v._1._1,
|
18149
18197
|
void 0,
|
18150
18198
|
Leaf2
|
18151
|
-
)))));
|
18199
|
+
)))((k) => k(dictShow)(v$p))));
|
18152
18200
|
}
|
18153
18201
|
fail();
|
18154
18202
|
};
|
@@ -18209,13 +18257,14 @@ var union5 = (dictAs) => (dictAs1) => (dictAs2) => (dictAs3) => (v) => (v1) => (
|
|
18209
18257
|
var unionStr = (dictAs) => (dictAs1) => union5(dictAs)(dictAs)(dictAs1)(dictAs1);
|
18210
18258
|
|
18211
18259
|
// output-es/EvalGraph/index.js
|
18212
|
-
var setSet4 = /* @__PURE__ */ setSet(
|
18260
|
+
var setSet4 = /* @__PURE__ */ setSet(ordDVertex);
|
18213
18261
|
var disjointUnion2 = /* @__PURE__ */ disjointUnion(mapEnvStringVal);
|
18214
18262
|
var fromFoldable17 = /* @__PURE__ */ (() => foldableSet.foldl((m) => (a) => insert(ordString)(a)()(m))(Leaf2))();
|
18215
18263
|
var show22 = /* @__PURE__ */ (() => showSet(showString).show)();
|
18216
18264
|
var toUnfoldable9 = /* @__PURE__ */ toUnfoldable4(unfoldableList);
|
18217
18265
|
var union1 = /* @__PURE__ */ (() => setSet(ordString).union)();
|
18218
18266
|
var fv = /* @__PURE__ */ (() => fVDict(fVElim).fv)();
|
18267
|
+
var pack3 = (x) => (k) => k(showBaseVal)(x);
|
18219
18268
|
var fromFoldable18 = /* @__PURE__ */ fromFoldable2(foldableList);
|
18220
18269
|
var greaterThanOrEq = /* @__PURE__ */ (() => {
|
18221
18270
|
const $0 = ordTuple(ordInt)(ordInt);
|
@@ -18305,29 +18354,31 @@ var match = (dictMonadWithGraphAlloc) => {
|
|
18305
18354
|
if (v._2.tag === "Constr") {
|
18306
18355
|
const $1 = v._2._1;
|
18307
18356
|
const $2 = v1._1;
|
18308
|
-
const $3 = v._2
|
18309
|
-
const $4 = v.
|
18357
|
+
const $3 = v._2;
|
18358
|
+
const $4 = v._2._2;
|
18359
|
+
const $5 = v._1;
|
18310
18360
|
return Bind1.bind(withMsg2("Pattern mismatch")(consistentWith2($$$Map("Two", Leaf2, $1, void 0, Leaf2))(mapObjectString.keys($2))))(() => Bind1.bind(orElse(MonadThrow0)("Incomplete patterns: no branch for " + showCtr($1))(_lookup(
|
18311
18361
|
Nothing,
|
18312
18362
|
Just,
|
18313
18363
|
$1,
|
18314
18364
|
$2
|
18315
|
-
)))((\u03BA) => Bind1.bind(matchMany(dictMonadWithGraphAlloc)($
|
18316
|
-
|
18317
|
-
$Tuple(
|
18365
|
+
)))((\u03BA) => Bind1.bind(matchMany(dictMonadWithGraphAlloc)($4)(\u03BA))((v3) => $0.pure($Tuple(
|
18366
|
+
v3._1,
|
18367
|
+
$Tuple(v3._2._1, insert(ordDVertex)($Tuple($5, (k) => k(showBaseVal)($3)))()(v3._2._2))
|
18318
18368
|
)))));
|
18319
18369
|
}
|
18320
18370
|
return Bind1.bind(dataTypeForSetCtr.dataTypeFor(MonadThrow0)(mapObjectString.keys(v1._1)))((d) => MonadThrow0.throwError(error("Pattern mismatch: found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v)).lines) + ", expected " + d._1)));
|
18321
18371
|
}
|
18322
18372
|
if (v1.tag === "ElimDict") {
|
18323
18373
|
if (v._2.tag === "Dictionary") {
|
18324
|
-
const $1 =
|
18325
|
-
const $2 =
|
18326
|
-
const $3 = v._1;
|
18327
|
-
const $4 =
|
18328
|
-
|
18329
|
-
|
18330
|
-
|
18374
|
+
const $1 = v._2;
|
18375
|
+
const $2 = v1._1;
|
18376
|
+
const $3 = v._2._1;
|
18377
|
+
const $4 = v._1;
|
18378
|
+
const $5 = v1._2;
|
18379
|
+
return Bind1.bind(check(MonadThrow0)(difference2(ordString)($2)(fromFoldable17(mapObjectString.keys($3))).tag === "Leaf")("Pattern mismatch: found " + show22(mapObjectString.keys($3)) + ", expected " + show22($2)))(() => Bind1.bind(matchMany(dictMonadWithGraphAlloc)(listMap((k) => $$get(showString)(mapObjectString)(k)($3)._2)(toUnfoldable9($2)))($5))((v3) => $0.pure($Tuple(
|
18380
|
+
v3._1,
|
18381
|
+
$Tuple(v3._2._1, insert(ordDVertex)($Tuple($4, (k) => k(showBaseVal)($1)))()(v3._2._2))
|
18331
18382
|
))));
|
18332
18383
|
}
|
18333
18384
|
return MonadThrow0.throwError(error("Pattern mismatch: found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v)).lines) + ", expected " + show22(v1._1)));
|
@@ -18341,22 +18392,22 @@ var closeDefs = (dictMonadWithGraphAlloc) => {
|
|
18341
18392
|
const traverse2 = traversableDict.traverse(Monad0.Applicative0());
|
18342
18393
|
return (\u03B3) => (\u03C1) => (\u03B1s) => Functor0.map(Env)(traverse2((\u03C3) => {
|
18343
18394
|
const \u03C1$p = forDefs(\u03C1)(\u03C3);
|
18344
|
-
const
|
18395
|
+
const v = $BaseVal(
|
18345
18396
|
"Fun",
|
18346
18397
|
$Fun(
|
18347
18398
|
"Closure",
|
18348
18399
|
(() => {
|
18349
|
-
const $
|
18400
|
+
const $0 = union1(fv(\u03C1$p))(fVElim.fv(\u03C3));
|
18350
18401
|
return filterWithKey2((x) => {
|
18351
|
-
const $1 = setSet(ordString).member(x)($
|
18352
|
-
return (
|
18402
|
+
const $1 = setSet(ordString).member(x)($0);
|
18403
|
+
return (v2) => $1;
|
18353
18404
|
})(\u03B3);
|
18354
18405
|
})(),
|
18355
18406
|
\u03C1$p,
|
18356
18407
|
\u03C3
|
18357
18408
|
)
|
18358
18409
|
);
|
18359
|
-
return Functor0.map((f) => f(
|
18410
|
+
return Functor0.map((f) => f(v))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(unDVertex(\u03B1s))(pack3(v))));
|
18360
18411
|
})(\u03C1));
|
18361
18412
|
};
|
18362
18413
|
var $$eval = (dictMonadWithGraphAlloc) => {
|
@@ -18381,13 +18432,22 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
18381
18432
|
return withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)(v1._1)(v));
|
18382
18433
|
}
|
18383
18434
|
if (v1.tag === "Int") {
|
18384
|
-
return Functor0.map((f) => f($BaseVal("Int", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(v2)))
|
18435
|
+
return Functor0.map((f) => f($BaseVal("Int", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(unDVertex(v2)))(pack3($BaseVal(
|
18436
|
+
"Int",
|
18437
|
+
v1._2
|
18438
|
+
)))));
|
18385
18439
|
}
|
18386
18440
|
if (v1.tag === "Float") {
|
18387
|
-
return Functor0.map((f) => f($BaseVal("Float", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(v2)))
|
18441
|
+
return Functor0.map((f) => f($BaseVal("Float", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(unDVertex(v2)))(pack3($BaseVal(
|
18442
|
+
"Float",
|
18443
|
+
v1._2
|
18444
|
+
)))));
|
18388
18445
|
}
|
18389
18446
|
if (v1.tag === "Str") {
|
18390
|
-
return Functor0.map((f) => f($BaseVal("Str", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(v2)))
|
18447
|
+
return Functor0.map((f) => f($BaseVal("Str", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(unDVertex(v2)))(pack3($BaseVal(
|
18448
|
+
"Str",
|
18449
|
+
v1._2
|
18450
|
+
)))));
|
18391
18451
|
}
|
18392
18452
|
if (v1.tag === "Dictionary") {
|
18393
18453
|
const $0 = v1._1;
|
@@ -18396,8 +18456,8 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
18396
18456
|
return (a) => $1(a)(v2);
|
18397
18457
|
})()))(v1._2)))((v3) => {
|
18398
18458
|
const v4 = unzip(listMap((v$1) => $Tuple(v$1._2.tag === "Str" ? v$1._2._1 : typeError(v$1._2)("Str"), v$1._1))(v3._1));
|
18399
|
-
const
|
18400
|
-
return Functor0.map((f) => f(
|
18459
|
+
const v5 = $BaseVal("Dictionary", fromFoldable18(zipWith2(Tuple)(v4._1)(zipWith2(Tuple)(v4._2)(v3._2))));
|
18460
|
+
return Functor0.map((f) => f(v5))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)($0)()(unDVertex(v2)))(pack3(v5))));
|
18401
18461
|
});
|
18402
18462
|
}
|
18403
18463
|
if (v1.tag === "Constr") {
|
@@ -18427,7 +18487,11 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
18427
18487
|
})()))(() => Bind1.bind(traverse2((() => {
|
18428
18488
|
const $3 = $$eval(dictMonadWithGraphAlloc)(v);
|
18429
18489
|
return (a) => $3(a)(v2);
|
18430
|
-
})())($1))((vs) => Functor0.map((f) => f($BaseVal("Constr", $0, vs)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)($2)()(v2)))
|
18490
|
+
})())($1))((vs) => Functor0.map((f) => f($BaseVal("Constr", $0, vs)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)($2)()(unDVertex(v2)))(pack3($BaseVal(
|
18491
|
+
"Constr",
|
18492
|
+
$0,
|
18493
|
+
vs
|
18494
|
+
)))))));
|
18431
18495
|
}
|
18432
18496
|
if (v1.tag === "Matrix") {
|
18433
18497
|
const $0 = v1._2;
|
@@ -18455,18 +18519,21 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
18455
18519
|
return $8;
|
18456
18520
|
})())))($0)(v2)
|
18457
18521
|
]))
|
18458
|
-
])))((vss) => Functor0.map((f) => f($BaseVal("Matrix", $Tuple(vss, $Tuple($Tuple($4, $6), $Tuple($5, $7))))))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)($3)()(v2)))
|
18522
|
+
])))((vss) => Functor0.map((f) => f($BaseVal("Matrix", $Tuple(vss, $Tuple($Tuple($4, $6), $Tuple($5, $7))))))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)($3)()(unDVertex(v2)))(pack3($BaseVal(
|
18523
|
+
"Matrix",
|
18524
|
+
$Tuple(vss, $Tuple($Tuple($4, $6), $Tuple($5, $7)))
|
18525
|
+
)))))));
|
18459
18526
|
});
|
18460
18527
|
}
|
18461
18528
|
if (v1.tag === "Lambda") {
|
18462
|
-
const
|
18529
|
+
const v3 = $BaseVal(
|
18463
18530
|
"Fun",
|
18464
18531
|
$Fun(
|
18465
18532
|
"Closure",
|
18466
18533
|
(() => {
|
18467
|
-
const $
|
18534
|
+
const $0 = fVElim.fv(v1._2);
|
18468
18535
|
return filterWithKey2((x) => {
|
18469
|
-
const $1 = setSet(ordString).member(x)($
|
18536
|
+
const $1 = setSet(ordString).member(x)($0);
|
18470
18537
|
return (v$1) => $1;
|
18471
18538
|
})(v);
|
18472
18539
|
})(),
|
@@ -18474,7 +18541,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
18474
18541
|
v1._2
|
18475
18542
|
)
|
18476
18543
|
);
|
18477
|
-
return Functor0.map((f) => f(
|
18544
|
+
return Functor0.map((f) => f(v3))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v1._1)()(unDVertex(v2)))(pack3(v3))));
|
18478
18545
|
}
|
18479
18546
|
if (v1.tag === "Project") {
|
18480
18547
|
const $0 = v1._2;
|
@@ -18520,8 +18587,8 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
18520
18587
|
}
|
18521
18588
|
if (v1.tag === "LetRec") {
|
18522
18589
|
const $0 = v1._2;
|
18523
|
-
const
|
18524
|
-
return Bind1.bind(closeDefs1(v)(v1._1._2)(
|
18590
|
+
const inserted\u03B1 = insert(ordDVertex)($Tuple(v1._1._1, (k) => k(showString)("Expr")))()(v2);
|
18591
|
+
return Bind1.bind(closeDefs1(v)(v1._1._2)(inserted\u03B1))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity14)(v)(\u03B3$p))($0)(inserted\u03B1));
|
18525
18592
|
}
|
18526
18593
|
fail();
|
18527
18594
|
};
|
@@ -18537,10 +18604,20 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
18537
18604
|
const $0 = (v2) => MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v2)).lines) + ", expected function"));
|
18538
18605
|
if (v._2.tag === "Fun") {
|
18539
18606
|
if (v._2._1.tag === "Closure") {
|
18540
|
-
const $1 = v.
|
18541
|
-
const $2 = v.
|
18542
|
-
const $3 = v._2._1.
|
18543
|
-
|
18607
|
+
const $1 = v._2;
|
18608
|
+
const $2 = v._1;
|
18609
|
+
const $3 = v._2._1._1;
|
18610
|
+
const $4 = v._2._1._3;
|
18611
|
+
return Bind1.bind(closeDefs1($3)(v._2._1._2)($$$Map(
|
18612
|
+
"Two",
|
18613
|
+
Leaf2,
|
18614
|
+
$Tuple($2, (k) => k(showBaseVal)($1)),
|
18615
|
+
void 0,
|
18616
|
+
Leaf2
|
18617
|
+
)))((\u03B32) => Bind1.bind(match1(v1)($4))((v3) => $$eval(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity14)(unionWith2((v$1) => identity14)($3)(\u03B32))(v3._1))(v3._2._1.tag === "ContExpr" ? v3._2._1._1 : throwException(error("Expression expected"))())(insert(ordDVertex)($Tuple(
|
18618
|
+
$2,
|
18619
|
+
(k) => k(showBaseVal)($1)
|
18620
|
+
))()(v3._2._2))));
|
18544
18621
|
}
|
18545
18622
|
if (v._2._1.tag === "Foreign") {
|
18546
18623
|
const $1 = v._2._1._1._1;
|
@@ -18573,7 +18650,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
18573
18650
|
v._1,
|
18574
18651
|
void 0,
|
18575
18652
|
Leaf2
|
18576
|
-
))));
|
18653
|
+
))(pack3($BaseVal("Fun", $Fun("Foreign", $Tuple($1, $2), vs$p))))));
|
18577
18654
|
}
|
18578
18655
|
return $2._1["op'"](dictMonadWithGraphAlloc)(MonadError1)(vs$p);
|
18579
18656
|
}
|
@@ -18624,26 +18701,26 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
18624
18701
|
};
|
18625
18702
|
return go(0)($2) < (n - 1 | 0);
|
18626
18703
|
})()) {
|
18627
|
-
const $
|
18704
|
+
const v$p2 = $BaseVal(
|
18628
18705
|
"Fun",
|
18629
18706
|
$Fun("PartialConstr", $1, foldableList.foldr(Cons)($List("Cons", v1, Nil))($2))
|
18630
18707
|
);
|
18631
|
-
return Functor0.map((f) => f($
|
18708
|
+
return Functor0.map((f) => f(v$p2))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
18632
18709
|
"Two",
|
18633
18710
|
Leaf2,
|
18634
18711
|
$3,
|
18635
18712
|
void 0,
|
18636
18713
|
Leaf2
|
18637
|
-
))));
|
18714
|
+
))(pack3(v$p2))));
|
18638
18715
|
}
|
18639
|
-
const $
|
18640
|
-
return Functor0.map((f) => f($
|
18716
|
+
const v$p = $BaseVal("Constr", $1, foldableList.foldr(Cons)($List("Cons", v1, Nil))($2));
|
18717
|
+
return Functor0.map((f) => f(v$p))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
18641
18718
|
"Two",
|
18642
18719
|
Leaf2,
|
18643
18720
|
$3,
|
18644
18721
|
void 0,
|
18645
18722
|
Leaf2
|
18646
|
-
))));
|
18723
|
+
))(pack3(v$p))));
|
18647
18724
|
});
|
18648
18725
|
}
|
18649
18726
|
}
|
@@ -18669,7 +18746,10 @@ var eval_module = (dictMonadWithGraphAlloc) => {
|
|
18669
18746
|
}
|
18670
18747
|
if (v1._1.tag === "Right") {
|
18671
18748
|
const $1 = v1._2;
|
18672
|
-
return $0.bind(closeDefs1(unionWith2((v$1) => identity14)(\u03B3)(v))(v1._1._1._2)(insert(
|
18749
|
+
return $0.bind(closeDefs1(unionWith2((v$1) => identity14)(\u03B3)(v))(v1._1._1._2)(insert(ordDVertex)($Tuple(
|
18750
|
+
v1._1._1._1,
|
18751
|
+
(k) => k(showString)("Expr")
|
18752
|
+
))()(v2)))((\u03B3$p$p) => go(unionWith2((v$1) => identity14)(v)(\u03B3$p$p))($1)(v2));
|
18673
18753
|
}
|
18674
18754
|
}
|
18675
18755
|
fail();
|
@@ -23912,6 +23992,7 @@ var apply2Bwd = (dictAnn) => {
|
|
23912
23992
|
};
|
23913
23993
|
|
23914
23994
|
// output-es/Primitive.Defs/index.js
|
23995
|
+
var pack4 = (x) => (k) => k(showBaseVal)(x);
|
23915
23996
|
var erase = /* @__PURE__ */ (() => functorVal.map((v) => {
|
23916
23997
|
}))();
|
23917
23998
|
var unzip6 = /* @__PURE__ */ unzip3(functorDict);
|
@@ -23921,11 +24002,24 @@ var foldWithIndexM = (dictMonad) => (f) => (a0) => foldableWithIndexStringDi.fol
|
|
23921
24002
|
return (a) => $0(a)(b);
|
23922
24003
|
})()))(dictMonad.Applicative0().pure(a0));
|
23923
24004
|
var disjointUnion5 = /* @__PURE__ */ disjointUnion(mapDictString);
|
23924
|
-
var unary2 = /* @__PURE__ */ unary(boundedJoinSemilatticeUni);
|
23925
|
-
var
|
23926
|
-
|
23927
|
-
|
23928
|
-
|
24005
|
+
var unary2 = /* @__PURE__ */ unary(showInt)(boundedJoinSemilatticeUni);
|
24006
|
+
var showEither = {
|
24007
|
+
show: (v) => {
|
24008
|
+
if (v.tag === "Left") {
|
24009
|
+
return "(Left " + showIntImpl(v._1) + ")";
|
24010
|
+
}
|
24011
|
+
if (v.tag === "Right") {
|
24012
|
+
return "(Right " + showNumberImpl(v._1) + ")";
|
24013
|
+
}
|
24014
|
+
fail();
|
24015
|
+
}
|
24016
|
+
};
|
24017
|
+
var binary2 = /* @__PURE__ */ binary(showEither)(boundedJoinSemilatticeUni);
|
24018
|
+
var binaryZero2 = /* @__PURE__ */ (() => binaryZero(showEither)(boundedJoinSemilatticeUni)({
|
24019
|
+
isZero: fanin2(isZeroInt.isZero)(isZeroNumber.isZero)
|
24020
|
+
}))();
|
24021
|
+
var binary1 = /* @__PURE__ */ binary(showBoolean)(boundedJoinSemilatticeUni);
|
24022
|
+
var binaryZero1 = /* @__PURE__ */ binaryZero(showInt)(boundedJoinSemilatticeUni)(isZeroInt);
|
23929
24023
|
var pow3 = /* @__PURE__ */ union5(asNumberIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)((x) => (y) => pow(toNumber(x))(toNumber(y)))(pow);
|
23930
24024
|
var numToStr = (v2) => {
|
23931
24025
|
if (v2.tag === "Left") {
|
@@ -23947,14 +24041,14 @@ var matrixUpdate = /* @__PURE__ */ $Tuple(
|
|
23947
24041
|
return (v) => {
|
23948
24042
|
if (v.tag === "Cons" && v._1._2.tag === "Matrix" && v._2.tag === "Cons" && v._2._1._2.tag === "Constr" && v._2._1._2._2.tag === "Cons" && v._2._1._2._2._1._2.tag === "Int" && v._2._1._2._2._2.tag === "Cons" && v._2._1._2._2._2._1._2.tag === "Int" && v._2._1._2._2._2._2.tag === "Nil" && v._2._2.tag === "Cons" && v._2._2._2.tag === "Nil" && v._2._1._2._1 === "Pair") {
|
23949
24043
|
const $0 = v._2._2._1;
|
23950
|
-
const $
|
23951
|
-
return Functor0.map((f) => f($
|
24044
|
+
const v$p = $BaseVal("Matrix", matrixPut(v._2._1._2._2._1._2._1)(v._2._1._2._2._2._1._2._1)((v$1) => $0)(v._1._2._1));
|
24045
|
+
return Functor0.map((f) => f(v$p))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
23952
24046
|
"Two",
|
23953
24047
|
Leaf2,
|
23954
24048
|
v._1._1,
|
23955
24049
|
void 0,
|
23956
24050
|
Leaf2
|
23957
|
-
))));
|
24051
|
+
))(pack4(v$p))));
|
23958
24052
|
}
|
23959
24053
|
return MonadThrow0.throwError(error("Matrix, pair of integers and value expected"));
|
23960
24054
|
};
|
@@ -24136,28 +24230,31 @@ var dims = /* @__PURE__ */ $Tuple(
|
|
24136
24230
|
const Functor0 = Bind1.Apply0().Functor0();
|
24137
24231
|
return (v) => {
|
24138
24232
|
if (v.tag === "Cons" && v._1._2.tag === "Matrix" && v._2.tag === "Nil") {
|
24139
|
-
const $0 = v._1._2._1._2.
|
24140
|
-
const $1 = v._1._1;
|
24141
|
-
const $2 = v._1.
|
24142
|
-
|
24233
|
+
const $0 = v._1._2._1._2._1._1;
|
24234
|
+
const $1 = v._1._2._1._2._2._1;
|
24235
|
+
const $2 = v._1._1;
|
24236
|
+
const $3 = v._1._2._1._2._2._2;
|
24237
|
+
return Bind1.bind(Functor0.map((f) => f($BaseVal("Int", $0)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
24143
24238
|
"Two",
|
24144
24239
|
Leaf2,
|
24145
24240
|
v._1._2._1._2._1._2,
|
24146
24241
|
void 0,
|
24147
24242
|
Leaf2
|
24148
|
-
)))))((v1) => Bind1.bind(Functor0.map((f) => f($BaseVal("Int", $
|
24149
|
-
"Two",
|
24150
|
-
Leaf2,
|
24151
|
-
$2,
|
24152
|
-
void 0,
|
24153
|
-
Leaf2
|
24154
|
-
)))))((v2) => Functor0.map((f) => f($BaseVal("Constr", "Pair", $List("Cons", v1, $List("Cons", v2, Nil)))))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
24243
|
+
))(pack4($BaseVal("Int", $0))))))((v1) => Bind1.bind(Functor0.map((f) => f($BaseVal("Int", $1)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
24155
24244
|
"Two",
|
24156
24245
|
Leaf2,
|
24157
|
-
$
|
24246
|
+
$3,
|
24158
24247
|
void 0,
|
24159
24248
|
Leaf2
|
24160
|
-
))))))
|
24249
|
+
))(pack4($BaseVal("Int", $1))))))((v2) => Functor0.map((f) => f($BaseVal(
|
24250
|
+
"Constr",
|
24251
|
+
"Pair",
|
24252
|
+
$List("Cons", v1, $List("Cons", v2, Nil))
|
24253
|
+
)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map("Two", Leaf2, $2, void 0, Leaf2))(pack4($BaseVal(
|
24254
|
+
"Constr",
|
24255
|
+
"Pair",
|
24256
|
+
$List("Cons", v1, $List("Cons", v2, Nil))
|
24257
|
+
)))))));
|
24161
24258
|
}
|
24162
24259
|
return MonadThrow0.throwError(error("Matrix expected"));
|
24163
24260
|
};
|
@@ -24237,7 +24334,7 @@ var dict_map = /* @__PURE__ */ $Tuple(
|
|
24237
24334
|
$1,
|
24238
24335
|
void 0,
|
24239
24336
|
Leaf2
|
24240
|
-
)))));
|
24337
|
+
))(pack4($BaseVal("Dictionary", d$p))))));
|
24241
24338
|
}
|
24242
24339
|
return MonadThrow0.throwError(error("Function and dictionary expected"));
|
24243
24340
|
};
|
@@ -24302,27 +24399,31 @@ var dict_intersectionWith = /* @__PURE__ */ $Tuple(
|
|
24302
24399
|
const Bind1 = Monad0.Bind1();
|
24303
24400
|
const Apply0 = Bind1.Apply0();
|
24304
24401
|
const $0 = Apply0.Functor0();
|
24305
|
-
const
|
24402
|
+
const Applicative0 = Monad0.Applicative0();
|
24306
24403
|
return (v) => {
|
24307
24404
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._1._2.tag === "Dictionary" && v._2._2.tag === "Cons" && v._2._2._1._2.tag === "Dictionary" && v._2._2._2.tag === "Nil") {
|
24308
24405
|
const $1 = v._1;
|
24309
|
-
|
24310
|
-
|
24311
|
-
|
24312
|
-
|
24313
|
-
|
24314
|
-
|
24315
|
-
|
24316
|
-
const $2 = v2._2;
|
24317
|
-
const $3 = v3._2;
|
24318
|
-
return Bind1.bind(dictMonadWithGraphAlloc.new(insert(ordVertex)(v3._1)()($$$Map(
|
24406
|
+
const $2 = v._2._1._1;
|
24407
|
+
const $3 = v._2._2._1._1;
|
24408
|
+
const v$p = $0.map(Dictionary3)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity15)(intersectionWith_Object((v2) => (v3) => {
|
24409
|
+
const $4 = v3._2;
|
24410
|
+
const $5 = v2._1;
|
24411
|
+
const $6 = v3._1;
|
24412
|
+
return Bind1.bind(Bind1.bind(apply6($1)(v2._2))((a) => apply6(a)($4)))((v4) => Bind1.bind(dictMonadWithGraphAlloc.new(insert(ordVertex)($6)()($$$Map(
|
24319
24413
|
"Two",
|
24320
24414
|
Leaf2,
|
24321
|
-
|
24415
|
+
$5,
|
24322
24416
|
void 0,
|
24323
24417
|
Leaf2
|
24324
|
-
))))((\u03B2$p$p) => $0.map(Tuple(\u03B2$p$p))(
|
24325
|
-
})(v._2._1._2._1)(v._2._2._1._2._1))))
|
24418
|
+
)))(pack4(v4._2)))((\u03B2$p$p) => $0.map(Tuple(\u03B2$p$p))(Applicative0.pure(v4))));
|
24419
|
+
})(v._2._1._2._1)(v._2._2._1._2._1))));
|
24420
|
+
return Bind1.bind(v$p)((packable) => Apply0.apply($0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)($3)()($$$Map(
|
24421
|
+
"Two",
|
24422
|
+
Leaf2,
|
24423
|
+
$2,
|
24424
|
+
void 0,
|
24425
|
+
Leaf2
|
24426
|
+
)))(pack4(packable))))(v$p));
|
24326
24427
|
}
|
24327
24428
|
return MonadThrow0.throwError(error("Function and two dictionaries expected"));
|
24328
24429
|
};
|
@@ -24555,14 +24656,14 @@ var dict_disjointUnion = /* @__PURE__ */ $Tuple(
|
|
24555
24656
|
const Functor0 = MonadThrow0.Monad0().Bind1().Apply0().Functor0();
|
24556
24657
|
return (v) => {
|
24557
24658
|
if (v.tag === "Cons" && v._1._2.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._2.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
24558
|
-
const
|
24559
|
-
return Functor0.map((f) => f(
|
24659
|
+
const v1 = $BaseVal("Dictionary", disjointUnion5(v._1._2._1)(v._2._1._2._1));
|
24660
|
+
return Functor0.map((f) => f(v1))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v._2._1._1)()($$$Map(
|
24560
24661
|
"Two",
|
24561
24662
|
Leaf2,
|
24562
24663
|
v._1._1,
|
24563
24664
|
void 0,
|
24564
24665
|
Leaf2
|
24565
|
-
)))));
|
24666
|
+
)))(pack4(v1))));
|
24566
24667
|
}
|
24567
24668
|
return MonadThrow0.throwError(error("Dictionaries expected"));
|
24568
24669
|
};
|
@@ -24603,14 +24704,14 @@ var dict_difference = /* @__PURE__ */ $Tuple(
|
|
24603
24704
|
const Functor0 = MonadThrow0.Monad0().Bind1().Apply0().Functor0();
|
24604
24705
|
return (v) => {
|
24605
24706
|
if (v.tag === "Cons" && v._1._2.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._2.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
24606
|
-
const
|
24607
|
-
return Functor0.map((f) => f(
|
24707
|
+
const v1 = $BaseVal("Dictionary", mapFObjectString.difference(v._1._2._1)(v._2._1._2._1));
|
24708
|
+
return Functor0.map((f) => f(v1))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert(ordVertex)(v._2._1._1)()($$$Map(
|
24608
24709
|
"Two",
|
24609
24710
|
Leaf2,
|
24610
24711
|
v._1._1,
|
24611
24712
|
void 0,
|
24612
24713
|
Leaf2
|
24613
|
-
)))));
|
24714
|
+
)))(pack4(v1))));
|
24614
24715
|
}
|
24615
24716
|
return MonadThrow0.throwError(error("Dictionaries expected."));
|
24616
24717
|
};
|
@@ -24679,8 +24780,8 @@ var primitives = /* @__PURE__ */ fromFoldable2(foldableArray)([
|
|
24679
24780
|
/* @__PURE__ */ extern1(dims),
|
24680
24781
|
/* @__PURE__ */ extern1(error_),
|
24681
24782
|
/* @__PURE__ */ unary2("floor")({ i: number, o: $$int, fwd: floor2 }),
|
24682
|
-
/* @__PURE__ */
|
24683
|
-
/* @__PURE__ */
|
24783
|
+
/* @__PURE__ */ unary(showNumber)(boundedJoinSemilatticeUni)("log")({ i: intOrNumber, o: number, fwd: log3 }),
|
24784
|
+
/* @__PURE__ */ unary(showString)(boundedJoinSemilatticeUni)("numToStr")({ i: intOrNumber, o: string, fwd: numToStr }),
|
24684
24785
|
/* @__PURE__ */ binary2("+")({
|
24685
24786
|
i1: intOrNumber,
|
24686
24787
|
i2: intOrNumber,
|
@@ -24693,25 +24794,30 @@ var primitives = /* @__PURE__ */ fromFoldable2(foldableArray)([
|
|
24693
24794
|
o: intOrNumber,
|
24694
24795
|
fwd: /* @__PURE__ */ union5(asIntIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)(intSub)(numSub)
|
24695
24796
|
}),
|
24696
|
-
/* @__PURE__ */
|
24797
|
+
/* @__PURE__ */ binaryZero2("*")({
|
24697
24798
|
i: intOrNumber,
|
24698
24799
|
o: intOrNumber,
|
24699
24800
|
fwd: /* @__PURE__ */ union5(asIntIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)(intMul)(numMul)
|
24700
24801
|
}),
|
24701
|
-
/* @__PURE__ */
|
24702
|
-
/* @__PURE__ */
|
24703
|
-
/* @__PURE__ */
|
24802
|
+
/* @__PURE__ */ binaryZero2("**")({ i: intOrNumber, o: intOrNumber, fwd: pow3 }),
|
24803
|
+
/* @__PURE__ */ binaryZero2("/")({ i: intOrNumber, o: intOrNumber, fwd: divide }),
|
24804
|
+
/* @__PURE__ */ binary1("==")({
|
24704
24805
|
i1: intOrNumberOrString,
|
24705
24806
|
i2: intOrNumberOrString,
|
24706
24807
|
o: $$boolean,
|
24707
24808
|
fwd: /* @__PURE__ */ union5(asBooleanBoolean)(asBooleanBoolean)(asIntNumberOrString)(asIntNumberOrString)(eqIntImpl)(/* @__PURE__ */ unionStr(asBooleanBoolean)(asNumberString)(eqNumberImpl)(eqStringImpl))
|
24708
24809
|
}),
|
24709
|
-
/* @__PURE__ */
|
24710
|
-
/* @__PURE__ */
|
24711
|
-
/* @__PURE__ */
|
24712
|
-
/* @__PURE__ */
|
24713
|
-
/* @__PURE__ */
|
24714
|
-
/* @__PURE__ */
|
24810
|
+
/* @__PURE__ */ binary1("/=")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: notEquals }),
|
24811
|
+
/* @__PURE__ */ binary1("<")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: lessThan }),
|
24812
|
+
/* @__PURE__ */ binary1(">")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: greaterThan }),
|
24813
|
+
/* @__PURE__ */ binary1("<=")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: lessThanEquals }),
|
24814
|
+
/* @__PURE__ */ binary1(">=")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: greaterThanEquals }),
|
24815
|
+
/* @__PURE__ */ binary(showString)(boundedJoinSemilatticeUni)("++")({
|
24816
|
+
i1: string,
|
24817
|
+
i2: string,
|
24818
|
+
o: string,
|
24819
|
+
fwd: concatString
|
24820
|
+
}),
|
24715
24821
|
/* @__PURE__ */ extern1(matrixLookup),
|
24716
24822
|
/* @__PURE__ */ extern1(dict_difference),
|
24717
24823
|
/* @__PURE__ */ extern1(dict_disjointUnion),
|
@@ -24720,10 +24826,10 @@ var primitives = /* @__PURE__ */ fromFoldable2(foldableArray)([
|
|
24720
24826
|
/* @__PURE__ */ extern1(dict_intersectionWith),
|
24721
24827
|
/* @__PURE__ */ extern1(dict_map),
|
24722
24828
|
/* @__PURE__ */ extern1(matrixUpdate),
|
24723
|
-
/* @__PURE__ */
|
24724
|
-
/* @__PURE__ */
|
24725
|
-
/* @__PURE__ */
|
24726
|
-
/* @__PURE__ */
|
24829
|
+
/* @__PURE__ */ binaryZero1("div")({ i: $$int, o: $$int, fwd: intDiv2 }),
|
24830
|
+
/* @__PURE__ */ binaryZero1("mod")({ i: $$int, o: $$int, fwd: intMod }),
|
24831
|
+
/* @__PURE__ */ binaryZero1("quot")({ i: $$int, o: $$int, fwd: quot }),
|
24832
|
+
/* @__PURE__ */ binaryZero1("rem")({ i: $$int, o: $$int, fwd: rem })
|
24727
24833
|
]);
|
24728
24834
|
|
24729
24835
|
// output-es/ProgCxt/index.js
|