@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
@@ -27874,22 +27874,29 @@ var verticesVertex = (dictFunctor) => (dictFoldable) => ({
|
|
27874
27874
|
return (x2) => $0(dictFunctor.map(singleton3)(x2));
|
27875
27875
|
})()
|
27876
27876
|
});
|
27877
|
+
var eqDVertex = { eq: (v) => (v1) => v._1 === v1._1 };
|
27878
|
+
var ordDVertex = { compare: (v) => (v1) => ordString.compare(v._1)(v1._1), Eq0: () => eqDVertex };
|
27879
|
+
var unDVertex = /* @__PURE__ */ map2(ordVertex)((x2) => x2._1);
|
27877
27880
|
var showVertices = (\u03B1s) => "{" + joinWith(", ")(fromFoldable4(map2(ordString)(unsafeCoerce)(\u03B1s))) + "}";
|
27878
27881
|
var showEdgeList = (es) => joinWith("\n")([
|
27879
27882
|
"digraph G {",
|
27880
27883
|
...arrayMap((v) => " " + v)([
|
27881
27884
|
"rankdir = RL",
|
27882
|
-
...arrayMap((v) => v._1 + " -> {" + joinWith(", ")(fromFoldable4(map2(ordString)(unsafeCoerce)(v._2))) + "}")(fromFoldable13(reverse2(es)))
|
27885
|
+
...arrayMap((v) => v._1 + " -> {" + joinWith(", ")(fromFoldable4(map2(ordString)(unsafeCoerce)(v._2._1))) + "}")(fromFoldable13(reverse2(es)))
|
27883
27886
|
]),
|
27884
27887
|
"}"
|
27885
27888
|
]);
|
27889
|
+
var pack1 = (x2) => (k) => k(showString)(x2);
|
27886
27890
|
var toEdgeList = (dictGraph) => (g) => {
|
27887
27891
|
const $0 = (v) => {
|
27888
27892
|
if (v._1.tag === "Nil") {
|
27889
27893
|
return $Step("Done", v._2);
|
27890
27894
|
}
|
27891
27895
|
if (v._1.tag === "Cons") {
|
27892
|
-
return $Step(
|
27896
|
+
return $Step(
|
27897
|
+
"Loop",
|
27898
|
+
$Tuple(v._1._2, $List("Cons", $Tuple(v._1._1, $Tuple(dictGraph.outN(g)(v._1._1), pack1(""))), v._2))
|
27899
|
+
);
|
27893
27900
|
}
|
27894
27901
|
fail();
|
27895
27902
|
};
|
@@ -28161,14 +28168,15 @@ var $GraphImpl = (_1) => ({ tag: "GraphImpl", _1 });
|
|
28161
28168
|
var eqSet = { eq: (v) => (v1) => eqMap(eqVertex)(eqUnit).eq(v)(v1) };
|
28162
28169
|
var eq = /* @__PURE__ */ (() => eqObject(eqSet).eq)();
|
28163
28170
|
var fromFoldable6 = /* @__PURE__ */ foldlArray((m) => (a) => insert3(ordVertex)(a)()(m))(Leaf2);
|
28171
|
+
var pack = (x2) => (k) => k(showString)(x2);
|
28164
28172
|
var toUnfoldable6 = /* @__PURE__ */ toUnfoldable4(unfoldableList);
|
28165
28173
|
var fromFoldable15 = /* @__PURE__ */ (() => foldableSet.foldr(Cons)(Nil))();
|
28166
28174
|
var fromFoldable23 = /* @__PURE__ */ (() => foldableSet.foldl((m) => (a) => insert3(ordVertex)(a)()(m))(Leaf2))();
|
28167
28175
|
var toUnfoldable12 = /* @__PURE__ */ toAscUnfoldable(unfoldableArray);
|
28168
28176
|
var fromFoldable32 = /* @__PURE__ */ fromFoldable2(ordVertex)(foldableArray);
|
28169
28177
|
var verticesGraphImpl = { vertices: (v) => v._1.vertices };
|
28170
|
-
var eqGraphImpl = { eq: (v) => (v1) => eq(v._1.out)(v1._1.out) };
|
28171
|
-
var sinks$p = (m) => fromFoldable6(arrayMap((x2) => x2._1)(filter((x2) => x2._2.tag === "Leaf")(toArrayWithKey(Tuple)(m))));
|
28178
|
+
var eqGraphImpl = { eq: (v) => (v1) => eq(_fmapObject(v._1.out, fst))(_fmapObject(v1._1.out, fst)) };
|
28179
|
+
var sinks$p = (m) => fromFoldable6(arrayMap((x2) => x2._1)(filter((x2) => x2._2._1.tag === "Leaf")(toArrayWithKey(Tuple)(m))));
|
28172
28180
|
var init5 = (\u03B1s) => () => {
|
28173
28181
|
const obj = {};
|
28174
28182
|
return monadRecST.tailRecM((v) => {
|
@@ -28180,7 +28188,7 @@ var init5 = (\u03B1s) => () => {
|
|
28180
28188
|
const $1 = v._1._2;
|
28181
28189
|
const $2 = v._2;
|
28182
28190
|
return () => {
|
28183
|
-
$2[$0] = Leaf2;
|
28191
|
+
$2[$0] = $Tuple(Leaf2, pack("uninit: init"));
|
28184
28192
|
return $Step("Loop", $Tuple($1, $2));
|
28185
28193
|
};
|
28186
28194
|
}
|
@@ -28216,7 +28224,7 @@ var addIfMissing = (acc) => (v) => {
|
|
28216
28224
|
return () => {
|
28217
28225
|
const v1 = $0();
|
28218
28226
|
if (v1.tag === "Nothing") {
|
28219
|
-
acc[v] = Leaf2;
|
28227
|
+
acc[v] = $Tuple(Leaf2, pack("uninit: missing"));
|
28220
28228
|
return acc;
|
28221
28229
|
}
|
28222
28230
|
if (v1.tag === "Just") {
|
@@ -28250,27 +28258,28 @@ var outMap = (\u03B1s) => (es) => {
|
|
28250
28258
|
if (v._1.tag === "Cons") {
|
28251
28259
|
const $1 = v._2;
|
28252
28260
|
const $2 = v._1._2;
|
28253
|
-
const $3 = v._1._1.
|
28254
|
-
const $4 = v._1._1.
|
28255
|
-
const $5 =
|
28261
|
+
const $3 = v._1._1._2._2;
|
28262
|
+
const $4 = v._1._1._1;
|
28263
|
+
const $5 = v._1._1._2._1;
|
28264
|
+
const $6 = peek($4)($1);
|
28256
28265
|
return () => {
|
28257
|
-
const $
|
28266
|
+
const $7 = $6();
|
28258
28267
|
if ((() => {
|
28259
|
-
if ($
|
28268
|
+
if ($7.tag === "Nothing") {
|
28260
28269
|
return true;
|
28261
28270
|
}
|
28262
|
-
if ($
|
28263
|
-
return eqMap(eqVertex)(eqUnit).eq($
|
28271
|
+
if ($7.tag === "Just") {
|
28272
|
+
return eqMap(eqVertex)(eqUnit).eq($7._1._1)(Leaf2);
|
28264
28273
|
}
|
28265
28274
|
fail();
|
28266
28275
|
})()) {
|
28267
|
-
const \u03B2s$p = toUnfoldable6($
|
28276
|
+
const \u03B2s$p = toUnfoldable6($5);
|
28268
28277
|
monadRecST.tailRecM(assertPresent($1))(\u03B2s$p)();
|
28269
|
-
$1[$
|
28278
|
+
$1[$4] = $Tuple($5, $3);
|
28270
28279
|
const acc$p = addIfMissing$p(\u03B2s$p)($1)();
|
28271
28280
|
return $Step("Loop", $Tuple($2, acc$p));
|
28272
28281
|
}
|
28273
|
-
return throwException(error("Duplicate edge list entry for " + showStringImpl($
|
28282
|
+
return throwException(error("Duplicate edge list entry for " + showStringImpl($4)))()();
|
28274
28283
|
};
|
28275
28284
|
}
|
28276
28285
|
fail();
|
@@ -28287,37 +28296,38 @@ var inMap = (\u03B1s) => (es) => {
|
|
28287
28296
|
}
|
28288
28297
|
if (v._1.tag === "Cons") {
|
28289
28298
|
const $1 = v._1._2;
|
28290
|
-
const $2 = v._1._1.
|
28291
|
-
const $3 =
|
28292
|
-
|
28293
|
-
|
28299
|
+
const $2 = v._1._1._2._2;
|
28300
|
+
const $3 = v._1._1._1;
|
28301
|
+
const $4 = monadRecST.tailRecM((v2) => {
|
28302
|
+
if (v2._1.tag === "Nil") {
|
28303
|
+
return () => $Step("Done", v2._2);
|
28294
28304
|
}
|
28295
|
-
if (
|
28296
|
-
const $
|
28297
|
-
const $
|
28298
|
-
const $
|
28299
|
-
const $
|
28305
|
+
if (v2._1.tag === "Cons") {
|
28306
|
+
const $42 = v2._2;
|
28307
|
+
const $5 = v2._1._1;
|
28308
|
+
const $6 = v2._1._2;
|
28309
|
+
const $7 = peek($5)($42);
|
28300
28310
|
return () => {
|
28301
|
-
const v1
|
28311
|
+
const v1 = $7();
|
28302
28312
|
const acc$p = (() => {
|
28303
|
-
if (v1
|
28304
|
-
$
|
28305
|
-
return $
|
28313
|
+
if (v1.tag === "Nothing") {
|
28314
|
+
$42[$5] = $Tuple($$$Map("Two", Leaf2, $3, void 0, Leaf2), $2);
|
28315
|
+
return $42;
|
28306
28316
|
}
|
28307
|
-
if (v1
|
28308
|
-
$
|
28309
|
-
return $
|
28317
|
+
if (v1.tag === "Just") {
|
28318
|
+
$42[$5] = $Tuple(insert3(ordVertex)($3)()(v1._1._1), $2);
|
28319
|
+
return $42;
|
28310
28320
|
}
|
28311
28321
|
fail();
|
28312
28322
|
})();
|
28313
|
-
return $Step("Loop", $Tuple($
|
28323
|
+
return $Step("Loop", $Tuple($6, acc$p));
|
28314
28324
|
};
|
28315
28325
|
}
|
28316
28326
|
fail();
|
28317
|
-
})($Tuple(toUnfoldable6(v._1._1._2), v._2));
|
28327
|
+
})($Tuple(toUnfoldable6(v._1._1._2._1), v._2));
|
28318
28328
|
return () => {
|
28319
|
-
const a = $
|
28320
|
-
const acc$p = addIfMissing(a)($
|
28329
|
+
const a = $4();
|
28330
|
+
const acc$p = addIfMissing(a)($3)();
|
28321
28331
|
return $Step("Loop", $Tuple($1, acc$p));
|
28322
28332
|
};
|
28323
28333
|
}
|
@@ -28326,7 +28336,8 @@ var inMap = (\u03B1s) => (es) => {
|
|
28326
28336
|
};
|
28327
28337
|
};
|
28328
28338
|
var graphGraphImpl = {
|
28329
|
-
outN: (v) => (\u03B1) => definitely("in graph")(_lookup(Nothing, Just, \u03B1, v._1.out)),
|
28339
|
+
outN: (v) => (\u03B1) => definitely("in graph")(_lookup(Nothing, Just, \u03B1, v._1.out))._1,
|
28340
|
+
vertexData: (v) => (\u03B1) => definitely("in graph")(_lookup(Nothing, Just, \u03B1, v._1.out))._2,
|
28330
28341
|
inN: (g) => graphGraphImpl.outN(graphGraphImpl.op(g)),
|
28331
28342
|
elem: (\u03B1) => (v) => {
|
28332
28343
|
const $0 = _lookup(Nothing, Just, \u03B1, v._1.out);
|
@@ -28365,7 +28376,7 @@ var graphGraphImpl = {
|
|
28365
28376
|
topologicalSort: (v) => reverse2(topologicalSort(ordVertex)(fromFoldable32(arrayMap((x2) => $Tuple(
|
28366
28377
|
x2._1,
|
28367
28378
|
$Tuple(void 0, x2._2)
|
28368
|
-
))(toUnfoldable12(_fmapObject(v._1.out, toUnfoldable6)))))),
|
28379
|
+
))(toUnfoldable12(_fmapObject(_fmapObject(v._1.out, fst), toUnfoldable6)))))),
|
28369
28380
|
Eq0: () => eqGraphImpl,
|
28370
28381
|
Vertices1: () => verticesGraphImpl
|
28371
28382
|
};
|
@@ -34054,6 +34065,32 @@ var Dictionary3 = (value0) => $BaseVal("Dictionary", value0);
|
|
34054
34065
|
var DictRep = (x2) => x2;
|
34055
34066
|
var MatrixRep = (x2) => x2;
|
34056
34067
|
var Env = (x2) => x2;
|
34068
|
+
var showBaseVal = {
|
34069
|
+
show: (v) => {
|
34070
|
+
if (v.tag === "Int") {
|
34071
|
+
return showIntImpl(v._1);
|
34072
|
+
}
|
34073
|
+
if (v.tag === "Float") {
|
34074
|
+
return showNumberImpl(v._1);
|
34075
|
+
}
|
34076
|
+
if (v.tag === "Str") {
|
34077
|
+
return showStringImpl(v._1);
|
34078
|
+
}
|
34079
|
+
if (v.tag === "Constr") {
|
34080
|
+
return showStringImpl(v._1);
|
34081
|
+
}
|
34082
|
+
if (v.tag === "Dictionary") {
|
34083
|
+
return "Dictionary";
|
34084
|
+
}
|
34085
|
+
if (v.tag === "Matrix") {
|
34086
|
+
return "Matrix";
|
34087
|
+
}
|
34088
|
+
if (v.tag === "Fun") {
|
34089
|
+
return "Function";
|
34090
|
+
}
|
34091
|
+
fail();
|
34092
|
+
}
|
34093
|
+
};
|
34057
34094
|
var isEmptyEnv = { isEmpty: (v) => isEmpty(v) };
|
34058
34095
|
var setEnvString = {
|
34059
34096
|
empty,
|
@@ -34864,7 +34901,7 @@ var string2 = {
|
|
34864
34901
|
return typeError(v)("Str");
|
34865
34902
|
}
|
34866
34903
|
};
|
34867
|
-
var unary = (dictBoundedJoinSemilattice) => {
|
34904
|
+
var unary = (dictShow) => (dictBoundedJoinSemilattice) => {
|
34868
34905
|
const bot2 = dictBoundedJoinSemilattice.bot;
|
34869
34906
|
return (id3) => (f) => $Tuple(
|
34870
34907
|
id3,
|
@@ -34882,17 +34919,17 @@ var unary = (dictBoundedJoinSemilattice) => {
|
|
34882
34919
|
const $0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0();
|
34883
34920
|
return (v) => {
|
34884
34921
|
if (v.tag === "Cons" && v._2.tag === "Nil") {
|
34885
|
-
const $
|
34922
|
+
const v$p = f.fwd(f.i.unpack(v._1._2));
|
34886
34923
|
return $0.map((() => {
|
34887
|
-
const $
|
34888
|
-
return (v$1) => $Val(v$1._2, $
|
34889
|
-
})())($0.map((v2) => $Tuple(
|
34924
|
+
const $1 = f.o;
|
34925
|
+
return (v$1) => $Val(v$1._2, $1.pack(v$1._1));
|
34926
|
+
})())($0.map((v2) => $Tuple(v$p, v2))(dictMonadWithGraphAlloc.new($$$Map(
|
34890
34927
|
"Two",
|
34891
34928
|
Leaf2,
|
34892
34929
|
v._1._1,
|
34893
34930
|
void 0,
|
34894
34931
|
Leaf2
|
34895
|
-
))));
|
34932
|
+
))((k) => k(dictShow)(v$p))));
|
34896
34933
|
}
|
34897
34934
|
fail();
|
34898
34935
|
};
|
@@ -35021,7 +35058,7 @@ var $$boolean = {
|
|
35021
35058
|
return typeError(v)("Boolean");
|
35022
35059
|
}
|
35023
35060
|
};
|
35024
|
-
var binaryZero = (dictBoundedJoinSemilattice) => {
|
35061
|
+
var binaryZero = (dictShow) => (dictBoundedJoinSemilattice) => {
|
35025
35062
|
const bot2 = dictBoundedJoinSemilattice.bot;
|
35026
35063
|
return (dictIsZero) => (id3) => (f) => $Tuple(
|
35027
35064
|
id3,
|
@@ -35041,10 +35078,11 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
35041
35078
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
35042
35079
|
const $1 = f.i.unpack(v._1._2);
|
35043
35080
|
const $2 = f.i.unpack(v._2._1._2);
|
35081
|
+
const v$p = f.fwd($1)($2);
|
35044
35082
|
return $0.map((() => {
|
35045
35083
|
const $3 = f.o;
|
35046
35084
|
return (v$1) => $Val(v$1._2, $3.pack(v$1._1));
|
35047
|
-
})())($0.map((v4) => $Tuple(
|
35085
|
+
})())($0.map((v4) => $Tuple(v$p, v4))(dictMonadWithGraphAlloc.new((() => {
|
35048
35086
|
if (dictIsZero.isZero($1)) {
|
35049
35087
|
return $$$Map("Two", Leaf2, v._1._1, void 0, Leaf2);
|
35050
35088
|
}
|
@@ -35058,7 +35096,7 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
35058
35096
|
void 0,
|
35059
35097
|
Leaf2
|
35060
35098
|
));
|
35061
|
-
})())));
|
35099
|
+
})())((k) => k(dictShow)(v$p))));
|
35062
35100
|
}
|
35063
35101
|
fail();
|
35064
35102
|
};
|
@@ -35109,7 +35147,7 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
35109
35147
|
)
|
35110
35148
|
);
|
35111
35149
|
};
|
35112
|
-
var binary = (dictBoundedJoinSemilattice) => {
|
35150
|
+
var binary = (dictShow) => (dictBoundedJoinSemilattice) => {
|
35113
35151
|
const bot2 = dictBoundedJoinSemilattice.bot;
|
35114
35152
|
return (id3) => (f) => $Tuple(
|
35115
35153
|
id3,
|
@@ -35127,18 +35165,17 @@ var binary = (dictBoundedJoinSemilattice) => {
|
|
35127
35165
|
const $0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0();
|
35128
35166
|
return (v) => {
|
35129
35167
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
35130
|
-
const $
|
35131
|
-
const $2 = v._2._1._2;
|
35168
|
+
const v$p = f.fwd(f.i1.unpack(v._1._2))(f.i2.unpack(v._2._1._2));
|
35132
35169
|
return $0.map((() => {
|
35133
|
-
const $
|
35134
|
-
return (v$1) => $Val(v$1._2, $
|
35135
|
-
})())($0.map((v3) => $Tuple(
|
35170
|
+
const $1 = f.o;
|
35171
|
+
return (v$1) => $Val(v$1._2, $1.pack(v$1._1));
|
35172
|
+
})())($0.map((v3) => $Tuple(v$p, v3))(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v._2._1._1)()($$$Map(
|
35136
35173
|
"Two",
|
35137
35174
|
Leaf2,
|
35138
35175
|
v._1._1,
|
35139
35176
|
void 0,
|
35140
35177
|
Leaf2
|
35141
|
-
)))));
|
35178
|
+
)))((k) => k(dictShow)(v$p))));
|
35142
35179
|
}
|
35143
35180
|
fail();
|
35144
35181
|
};
|
@@ -37685,9 +37722,9 @@ var drawableTableView = {
|
|
37685
37722
|
var arrayDictToArray2 = (x2) => arrayMap((a) => arrayMap((a$1) => $$get2(showString)(mapDictString)(a$1)(a))(x2));
|
37686
37723
|
|
37687
37724
|
// output-es/App.View/index.js
|
37688
|
-
var
|
37689
|
-
var
|
37690
|
-
var
|
37725
|
+
var pack2 = (x2) => (k) => k(drawableBarChart)(x2);
|
37726
|
+
var pack12 = (x2) => (k) => k(drawableLineChart)(x2);
|
37727
|
+
var pack22 = (x2) => (k) => k(drawableScatterPlot)(x2);
|
37691
37728
|
var pack3 = (x2) => (k) => k(drawableParagraphSelState)(x2);
|
37692
37729
|
var pack4 = (x2) => (k) => k(drawableMultiView)(x2);
|
37693
37730
|
var identity28 = (x2) => x2;
|
@@ -37697,13 +37734,13 @@ var view = () => (v) => (v1) => (v2) => {
|
|
37697
37734
|
if (v1._2.tag === "Constr") {
|
37698
37735
|
if (v1._2._2.tag === "Cons" && v1._2._2._2.tag === "Nil") {
|
37699
37736
|
if (v1._2._1 === "BarChart") {
|
37700
|
-
return
|
37737
|
+
return pack2(dict(reflectDictSelState\u{1D54A}$x215ValS22.from())(v1._2._2._1));
|
37701
37738
|
}
|
37702
37739
|
if (v1._2._1 === "LineChart") {
|
37703
|
-
return
|
37740
|
+
return pack12(dict(reflectDictSelState\u{1D54A}$x215ValS13.from())(v1._2._2._1));
|
37704
37741
|
}
|
37705
37742
|
if (v1._2._1 === "ScatterPlot") {
|
37706
|
-
return
|
37743
|
+
return pack22(dict(reflectDictSelState\u{1D54A}$x215ValS5.from())(v1._2._2._1));
|
37707
37744
|
}
|
37708
37745
|
if (v1._2._1 === "Paragraph") {
|
37709
37746
|
return pack3(reflectValSelState\u{1D54A}Paragr.from()(v1._2._2._1));
|
@@ -37819,8 +37856,8 @@ var monadWithGraphWithGraphT = (dictMonad) => {
|
|
37819
37856
|
const $1 = monadStateStateT(dictMonad);
|
37820
37857
|
const monadStateT = { Applicative0: () => applicativeStateT(dictMonad), Bind1: () => bindStateT(dictMonad) };
|
37821
37858
|
return {
|
37822
|
-
extend: (\u03B1) => (\u03B1s) => {
|
37823
|
-
const $2 = Cons($Tuple(\u03B1, \u03B1s));
|
37859
|
+
extend: (\u03B1) => (\u03B1s) => (vd) => {
|
37860
|
+
const $2 = Cons($Tuple(\u03B1, $Tuple(\u03B1s, vd)));
|
37824
37861
|
const $3 = $1.state((s) => $Tuple(void 0, $2(s)));
|
37825
37862
|
return (s) => $0.map((v1) => $Tuple(void 0, v1._2))($3(s));
|
37826
37863
|
},
|
@@ -37900,7 +37937,7 @@ var monadWithGraphAllocWithGr = (dictMonadError) => {
|
|
37900
37937
|
const monadWithGraphWithGraphT1 = monadWithGraphWithGraphT(monadStateT);
|
37901
37938
|
const monadErrorStateT2 = monadErrorStateT(monadErrorStateT(dictMonadError));
|
37902
37939
|
return {
|
37903
|
-
new: (\u03B1s) => bindStateT2.bind(fresh1)((\u03B1) => bindStateT2.bind(monadWithGraphWithGraphT1.extend(\u03B1)(\u03B1s))(() => applicativeStateT(monadStateT).pure(\u03B1))),
|
37940
|
+
new: (\u03B1s) => (vd) => bindStateT2.bind(fresh1)((\u03B1) => bindStateT2.bind(monadWithGraphWithGraphT1.extend(\u03B1)(\u03B1s)(vd))(() => applicativeStateT(monadStateT).pure(\u03B1))),
|
37904
37941
|
MonadAlloc0: () => monadAllocWithGraphAllocT1,
|
37905
37942
|
MonadError1: () => monadErrorStateT2,
|
37906
37943
|
MonadWithGraph2: () => monadWithGraphWithGraphT1
|
@@ -37910,6 +37947,7 @@ var monadWithGraphAllocWithGr = (dictMonadError) => {
|
|
37910
37947
|
// output-es/Graph.Slice/index.js
|
37911
37948
|
var pure2 = /* @__PURE__ */ (() => applicativeStateT(monadIdentity).pure)();
|
37912
37949
|
var extend3 = /* @__PURE__ */ (() => monadWithGraphWithGraphT(monadIdentity).extend)();
|
37950
|
+
var pack7 = (x2) => (k) => k(showString)(x2);
|
37913
37951
|
var tailRecM = /* @__PURE__ */ (() => monadRecStateT(monadRecIdentity).tailRecM)();
|
37914
37952
|
var member4 = /* @__PURE__ */ (() => setSet(ordVertex).member)();
|
37915
37953
|
var fromFoldable19 = /* @__PURE__ */ (() => foldableSet.foldr(Cons)(Nil))();
|
@@ -37935,7 +37973,7 @@ var fwdSlice = (dictGraph) => {
|
|
37935
37973
|
fail();
|
37936
37974
|
})();
|
37937
37975
|
if (eqMap(eqVertex)(eqUnit).eq(\u03B2s)(dictGraph.outN($0)(v1.es._1._1))) {
|
37938
|
-
return bindStateT(monadIdentity).bind(extend3(v1.es._1._1)(\u03B2s))(() => pure2($Step(
|
37976
|
+
return bindStateT(monadIdentity).bind(extend3(v1.es._1._1)(\u03B2s)(pack7("uninit: fwd")))(() => pure2($Step(
|
37939
37977
|
"Loop",
|
37940
37978
|
{
|
37941
37979
|
pending: $$delete3(ordVertex)(v1.es._1._1)(v1.pending),
|
@@ -37960,10 +37998,12 @@ var bwdSlice = (dictGraph) => {
|
|
37960
37998
|
return pure2($Step("Done", void 0));
|
37961
37999
|
}
|
37962
38000
|
if (v1.pending.tag === "Cons") {
|
38001
|
+
const $2 = v1.pending._1._2._2;
|
38002
|
+
const $3 = v1.pending._1._2._1;
|
37963
38003
|
if (member4(v1.pending._1._1)(v1.visited)) {
|
37964
38004
|
return pure2($Step("Loop", { visited: v1.visited, "\u03B1s": Nil, pending: v1.pending._2 }));
|
37965
38005
|
}
|
37966
|
-
return bindStateT(monadIdentity).bind(extend3(v1.pending._1._1)(v1.pending._1.
|
38006
|
+
return bindStateT(monadIdentity).bind(extend3(v1.pending._1._1)($3)(spyWhen(false)("Value found at " + showStringImpl(v1.pending._1._1))((v$1) => v$1((dictShow) => dictShow.show))($2)))(() => pure2($Step(
|
37967
38007
|
"Loop",
|
37968
38008
|
{ visited: insert3(ordVertex)(v1.pending._1._1)()(v1.visited), "\u03B1s": Nil, pending: v1.pending._2 }
|
37969
38009
|
)));
|
@@ -37977,7 +38017,7 @@ var bwdSlice = (dictGraph) => {
|
|
37977
38017
|
{
|
37978
38018
|
visited: v1.visited,
|
37979
38019
|
"\u03B1s": foldableList.foldr(Cons)(v1["\u03B1s"]._2)(fromFoldable19(\u03B2s)),
|
37980
|
-
pending: $List("Cons", $Tuple(v1["\u03B1s"]._1, \u03B2s), v1.pending)
|
38020
|
+
pending: $List("Cons", $Tuple(v1["\u03B1s"]._1, $Tuple(\u03B2s, dictGraph.vertexData($0)(v1["\u03B1s"]._1))), v1.pending)
|
37981
38021
|
}
|
37982
38022
|
));
|
37983
38023
|
}
|
@@ -37991,13 +38031,14 @@ var bwdSlice = (dictGraph) => {
|
|
37991
38031
|
};
|
37992
38032
|
|
37993
38033
|
// output-es/EvalGraph/index.js
|
37994
|
-
var setSet4 = /* @__PURE__ */ setSet(
|
38034
|
+
var setSet4 = /* @__PURE__ */ setSet(ordDVertex);
|
37995
38035
|
var disjointUnion2 = /* @__PURE__ */ disjointUnion(mapEnvStringVal);
|
37996
38036
|
var fromFoldable20 = /* @__PURE__ */ (() => foldableSet.foldl((m) => (a) => insert3(ordString)(a)()(m))(Leaf2))();
|
37997
38037
|
var show22 = /* @__PURE__ */ (() => showSet(showString).show)();
|
37998
38038
|
var toUnfoldable10 = /* @__PURE__ */ toUnfoldable4(unfoldableList);
|
37999
38039
|
var union1 = /* @__PURE__ */ (() => setSet(ordString).union)();
|
38000
38040
|
var fv = /* @__PURE__ */ (() => fVDict(fVElim).fv)();
|
38041
|
+
var pack8 = (x2) => (k) => k(showBaseVal)(x2);
|
38001
38042
|
var fromFoldable110 = /* @__PURE__ */ fromFoldable(foldableList);
|
38002
38043
|
var greaterThanOrEq = /* @__PURE__ */ (() => {
|
38003
38044
|
const $0 = ordTuple(ordInt)(ordInt);
|
@@ -38087,29 +38128,31 @@ var match = (dictMonadWithGraphAlloc) => {
|
|
38087
38128
|
if (v._2.tag === "Constr") {
|
38088
38129
|
const $1 = v._2._1;
|
38089
38130
|
const $2 = v1._1;
|
38090
|
-
const $3 = v._2
|
38091
|
-
const $4 = v.
|
38131
|
+
const $3 = v._2;
|
38132
|
+
const $4 = v._2._2;
|
38133
|
+
const $5 = v._1;
|
38092
38134
|
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(
|
38093
38135
|
Nothing,
|
38094
38136
|
Just,
|
38095
38137
|
$1,
|
38096
38138
|
$2
|
38097
|
-
)))((\u03BA) => Bind1.bind(matchMany(dictMonadWithGraphAlloc)($
|
38098
|
-
|
38099
|
-
$Tuple(
|
38139
|
+
)))((\u03BA) => Bind1.bind(matchMany(dictMonadWithGraphAlloc)($4)(\u03BA))((v3) => $0.pure($Tuple(
|
38140
|
+
v3._1,
|
38141
|
+
$Tuple(v3._2._1, insert3(ordDVertex)($Tuple($5, (k) => k(showBaseVal)($3)))()(v3._2._2))
|
38100
38142
|
)))));
|
38101
38143
|
}
|
38102
38144
|
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)));
|
38103
38145
|
}
|
38104
38146
|
if (v1.tag === "ElimDict") {
|
38105
38147
|
if (v._2.tag === "Dictionary") {
|
38106
|
-
const $1 =
|
38107
|
-
const $2 =
|
38108
|
-
const $3 = v._1;
|
38109
|
-
const $4 =
|
38110
|
-
|
38111
|
-
|
38112
|
-
|
38148
|
+
const $1 = v._2;
|
38149
|
+
const $2 = v1._1;
|
38150
|
+
const $3 = v._2._1;
|
38151
|
+
const $4 = v._1;
|
38152
|
+
const $5 = v1._2;
|
38153
|
+
return Bind1.bind(check(MonadThrow0)(difference2(ordString)($2)(fromFoldable20(mapObjectString.keys($3))).tag === "Leaf")("Pattern mismatch: found " + show22(mapObjectString.keys($3)) + ", expected " + show22($2)))(() => Bind1.bind(matchMany(dictMonadWithGraphAlloc)(listMap((k) => $$get2(showString)(mapObjectString)(k)($3)._2)(toUnfoldable10($2)))($5))((v3) => $0.pure($Tuple(
|
38154
|
+
v3._1,
|
38155
|
+
$Tuple(v3._2._1, insert3(ordDVertex)($Tuple($4, (k) => k(showBaseVal)($1)))()(v3._2._2))
|
38113
38156
|
))));
|
38114
38157
|
}
|
38115
38158
|
return MonadThrow0.throwError(error("Pattern mismatch: found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v)).lines) + ", expected " + show22(v1._1)));
|
@@ -38147,22 +38190,22 @@ var closeDefs = (dictMonadWithGraphAlloc) => {
|
|
38147
38190
|
const traverse2 = traversableDict.traverse(Monad0.Applicative0());
|
38148
38191
|
return (\u03B3) => (\u03C1) => (\u03B1s) => Functor0.map(Env)(traverse2((\u03C3) => {
|
38149
38192
|
const \u03C1$p = forDefs(\u03C1)(\u03C3);
|
38150
|
-
const
|
38193
|
+
const v = $BaseVal(
|
38151
38194
|
"Fun",
|
38152
38195
|
$Fun(
|
38153
38196
|
"Closure",
|
38154
38197
|
(() => {
|
38155
|
-
const $
|
38198
|
+
const $0 = union1(fv(\u03C1$p))(fVElim.fv(\u03C3));
|
38156
38199
|
return filterWithKey((x2) => {
|
38157
|
-
const $1 = setSet(ordString).member(x2)($
|
38158
|
-
return (
|
38200
|
+
const $1 = setSet(ordString).member(x2)($0);
|
38201
|
+
return (v2) => $1;
|
38159
38202
|
})(\u03B3);
|
38160
38203
|
})(),
|
38161
38204
|
\u03C1$p,
|
38162
38205
|
\u03C3
|
38163
38206
|
)
|
38164
38207
|
);
|
38165
|
-
return Functor0.map((f) => f(
|
38208
|
+
return Functor0.map((f) => f(v))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(unDVertex(\u03B1s))(pack8(v))));
|
38166
38209
|
})(\u03C1));
|
38167
38210
|
};
|
38168
38211
|
var $$eval = (dictMonadWithGraphAlloc) => {
|
@@ -38187,13 +38230,22 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
38187
38230
|
return withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)(v1._1)(v));
|
38188
38231
|
}
|
38189
38232
|
if (v1.tag === "Int") {
|
38190
|
-
return Functor0.map((f) => f($BaseVal("Int", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(v2)))
|
38233
|
+
return Functor0.map((f) => f($BaseVal("Int", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(unDVertex(v2)))(pack8($BaseVal(
|
38234
|
+
"Int",
|
38235
|
+
v1._2
|
38236
|
+
)))));
|
38191
38237
|
}
|
38192
38238
|
if (v1.tag === "Float") {
|
38193
|
-
return Functor0.map((f) => f($BaseVal("Float", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(v2)))
|
38239
|
+
return Functor0.map((f) => f($BaseVal("Float", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(unDVertex(v2)))(pack8($BaseVal(
|
38240
|
+
"Float",
|
38241
|
+
v1._2
|
38242
|
+
)))));
|
38194
38243
|
}
|
38195
38244
|
if (v1.tag === "Str") {
|
38196
|
-
return Functor0.map((f) => f($BaseVal("Str", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(v2)))
|
38245
|
+
return Functor0.map((f) => f($BaseVal("Str", v1._2)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(unDVertex(v2)))(pack8($BaseVal(
|
38246
|
+
"Str",
|
38247
|
+
v1._2
|
38248
|
+
)))));
|
38197
38249
|
}
|
38198
38250
|
if (v1.tag === "Dictionary") {
|
38199
38251
|
const $0 = v1._1;
|
@@ -38202,8 +38254,8 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
38202
38254
|
return (a) => $1(a)(v2);
|
38203
38255
|
})()))(v1._2)))((v3) => {
|
38204
38256
|
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));
|
38205
|
-
const
|
38206
|
-
return Functor0.map((f) => f(
|
38257
|
+
const v5 = $BaseVal("Dictionary", fromFoldable110(zipWith2(Tuple)(v4._1)(zipWith2(Tuple)(v4._2)(v3._2))));
|
38258
|
+
return Functor0.map((f) => f(v5))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)($0)()(unDVertex(v2)))(pack8(v5))));
|
38207
38259
|
});
|
38208
38260
|
}
|
38209
38261
|
if (v1.tag === "Constr") {
|
@@ -38233,7 +38285,11 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
38233
38285
|
})()))(() => Bind1.bind(traverse2((() => {
|
38234
38286
|
const $3 = $$eval(dictMonadWithGraphAlloc)(v);
|
38235
38287
|
return (a) => $3(a)(v2);
|
38236
|
-
})())($1))((vs) => Functor0.map((f) => f($BaseVal("Constr", $0, vs)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)($2)()(v2)))
|
38288
|
+
})())($1))((vs) => Functor0.map((f) => f($BaseVal("Constr", $0, vs)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)($2)()(unDVertex(v2)))(pack8($BaseVal(
|
38289
|
+
"Constr",
|
38290
|
+
$0,
|
38291
|
+
vs
|
38292
|
+
)))))));
|
38237
38293
|
}
|
38238
38294
|
if (v1.tag === "Matrix") {
|
38239
38295
|
const $0 = v1._2;
|
@@ -38261,18 +38317,21 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
38261
38317
|
return $8;
|
38262
38318
|
})())))($0)(v2)
|
38263
38319
|
]))
|
38264
|
-
])))((vss) => Functor0.map((f) => f($BaseVal("Matrix", $Tuple(vss, $Tuple($Tuple($4, $6), $Tuple($5, $7))))))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)($3)()(v2)))
|
38320
|
+
])))((vss) => Functor0.map((f) => f($BaseVal("Matrix", $Tuple(vss, $Tuple($Tuple($4, $6), $Tuple($5, $7))))))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)($3)()(unDVertex(v2)))(pack8($BaseVal(
|
38321
|
+
"Matrix",
|
38322
|
+
$Tuple(vss, $Tuple($Tuple($4, $6), $Tuple($5, $7)))
|
38323
|
+
)))))));
|
38265
38324
|
});
|
38266
38325
|
}
|
38267
38326
|
if (v1.tag === "Lambda") {
|
38268
|
-
const
|
38327
|
+
const v3 = $BaseVal(
|
38269
38328
|
"Fun",
|
38270
38329
|
$Fun(
|
38271
38330
|
"Closure",
|
38272
38331
|
(() => {
|
38273
|
-
const $
|
38332
|
+
const $0 = fVElim.fv(v1._2);
|
38274
38333
|
return filterWithKey((x2) => {
|
38275
|
-
const $1 = setSet(ordString).member(x2)($
|
38334
|
+
const $1 = setSet(ordString).member(x2)($0);
|
38276
38335
|
return (v$1) => $1;
|
38277
38336
|
})(v);
|
38278
38337
|
})(),
|
@@ -38280,7 +38339,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
38280
38339
|
v1._2
|
38281
38340
|
)
|
38282
38341
|
);
|
38283
|
-
return Functor0.map((f) => f(
|
38342
|
+
return Functor0.map((f) => f(v3))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v1._1)()(unDVertex(v2)))(pack8(v3))));
|
38284
38343
|
}
|
38285
38344
|
if (v1.tag === "Project") {
|
38286
38345
|
const $0 = v1._2;
|
@@ -38326,8 +38385,8 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
38326
38385
|
}
|
38327
38386
|
if (v1.tag === "LetRec") {
|
38328
38387
|
const $0 = v1._2;
|
38329
|
-
const
|
38330
|
-
return Bind1.bind(closeDefs1(v)(v1._1._2)(
|
38388
|
+
const inserted\u03B1 = insert3(ordDVertex)($Tuple(v1._1._1, (k) => k(showString)("Expr")))()(v2);
|
38389
|
+
return Bind1.bind(closeDefs1(v)(v1._1._2)(inserted\u03B1))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(unionWith((v$1) => identity18)(v)(\u03B3$p))($0)(inserted\u03B1));
|
38331
38390
|
}
|
38332
38391
|
fail();
|
38333
38392
|
};
|
@@ -38343,10 +38402,20 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
38343
38402
|
const $0 = (v2) => MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v2)).lines) + ", expected function"));
|
38344
38403
|
if (v._2.tag === "Fun") {
|
38345
38404
|
if (v._2._1.tag === "Closure") {
|
38346
|
-
const $1 = v.
|
38347
|
-
const $2 = v.
|
38348
|
-
const $3 = v._2._1.
|
38349
|
-
|
38405
|
+
const $1 = v._2;
|
38406
|
+
const $2 = v._1;
|
38407
|
+
const $3 = v._2._1._1;
|
38408
|
+
const $4 = v._2._1._3;
|
38409
|
+
return Bind1.bind(closeDefs1($3)(v._2._1._2)($$$Map(
|
38410
|
+
"Two",
|
38411
|
+
Leaf2,
|
38412
|
+
$Tuple($2, (k) => k(showBaseVal)($1)),
|
38413
|
+
void 0,
|
38414
|
+
Leaf2
|
38415
|
+
)))((\u03B32) => Bind1.bind(match1(v1)($4))((v3) => $$eval(dictMonadWithGraphAlloc)(unionWith((v$1) => identity18)(unionWith((v$1) => identity18)($3)(\u03B32))(v3._1))(v3._2._1.tag === "ContExpr" ? v3._2._1._1 : throwException(error("Expression expected"))())(insert3(ordDVertex)($Tuple(
|
38416
|
+
$2,
|
38417
|
+
(k) => k(showBaseVal)($1)
|
38418
|
+
))()(v3._2._2))));
|
38350
38419
|
}
|
38351
38420
|
if (v._2._1.tag === "Foreign") {
|
38352
38421
|
const $1 = v._2._1._1._1;
|
@@ -38379,7 +38448,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
38379
38448
|
v._1,
|
38380
38449
|
void 0,
|
38381
38450
|
Leaf2
|
38382
|
-
))));
|
38451
|
+
))(pack8($BaseVal("Fun", $Fun("Foreign", $Tuple($1, $2), vs$p))))));
|
38383
38452
|
}
|
38384
38453
|
return $2._1["op'"](dictMonadWithGraphAlloc)(MonadError1)(vs$p);
|
38385
38454
|
}
|
@@ -38430,26 +38499,26 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
38430
38499
|
};
|
38431
38500
|
return go(0)($2) < (n - 1 | 0);
|
38432
38501
|
})()) {
|
38433
|
-
const $
|
38502
|
+
const v$p2 = $BaseVal(
|
38434
38503
|
"Fun",
|
38435
38504
|
$Fun("PartialConstr", $1, foldableList.foldr(Cons)($List("Cons", v1, Nil))($2))
|
38436
38505
|
);
|
38437
|
-
return Functor0.map((f) => f($
|
38506
|
+
return Functor0.map((f) => f(v$p2))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
38438
38507
|
"Two",
|
38439
38508
|
Leaf2,
|
38440
38509
|
$3,
|
38441
38510
|
void 0,
|
38442
38511
|
Leaf2
|
38443
|
-
))));
|
38512
|
+
))(pack8(v$p2))));
|
38444
38513
|
}
|
38445
|
-
const $
|
38446
|
-
return Functor0.map((f) => f($
|
38514
|
+
const v$p = $BaseVal("Constr", $1, foldableList.foldr(Cons)($List("Cons", v1, Nil))($2));
|
38515
|
+
return Functor0.map((f) => f(v$p))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
38447
38516
|
"Two",
|
38448
38517
|
Leaf2,
|
38449
38518
|
$3,
|
38450
38519
|
void 0,
|
38451
38520
|
Leaf2
|
38452
|
-
))));
|
38521
|
+
))(pack8(v$p))));
|
38453
38522
|
});
|
38454
38523
|
}
|
38455
38524
|
}
|
@@ -38475,7 +38544,10 @@ var eval_module = (dictMonadWithGraphAlloc) => {
|
|
38475
38544
|
}
|
38476
38545
|
if (v1._1.tag === "Right") {
|
38477
38546
|
const $1 = v1._2;
|
38478
|
-
return $0.bind(closeDefs1(unionWith((v$1) => identity18)(\u03B3)(v))(v1._1._1._2)(insert3(
|
38547
|
+
return $0.bind(closeDefs1(unionWith((v$1) => identity18)(\u03B3)(v))(v1._1._1._2)(insert3(ordDVertex)($Tuple(
|
38548
|
+
v1._1._1._1,
|
38549
|
+
(k) => k(showString)("Expr")
|
38550
|
+
))()(v2)))((\u03B3$p$p) => go(unionWith((v$1) => identity18)(v)(\u03B3$p$p))($1)(v2));
|
38479
38551
|
}
|
38480
38552
|
}
|
38481
38553
|
fail();
|
@@ -42864,6 +42936,7 @@ var apply2Bwd = (dictAnn) => {
|
|
42864
42936
|
};
|
42865
42937
|
|
42866
42938
|
// output-es/Primitive.Defs/index.js
|
42939
|
+
var pack9 = (x2) => (k) => k(showBaseVal)(x2);
|
42867
42940
|
var erase = /* @__PURE__ */ (() => functorVal.map((v) => {
|
42868
42941
|
}))();
|
42869
42942
|
var unzip6 = /* @__PURE__ */ unzip3(functorDict);
|
@@ -42873,11 +42946,24 @@ var foldWithIndexM = (dictMonad) => (f) => (a0) => foldableWithIndexStringDi.fol
|
|
42873
42946
|
return (a) => $0(a)(b);
|
42874
42947
|
})()))(dictMonad.Applicative0().pure(a0));
|
42875
42948
|
var disjointUnion5 = /* @__PURE__ */ disjointUnion(mapDictString);
|
42876
|
-
var unary2 = /* @__PURE__ */ unary(boundedJoinSemilatticeUni);
|
42877
|
-
var
|
42878
|
-
|
42879
|
-
|
42880
|
-
|
42949
|
+
var unary2 = /* @__PURE__ */ unary(showInt)(boundedJoinSemilatticeUni);
|
42950
|
+
var showEither = {
|
42951
|
+
show: (v) => {
|
42952
|
+
if (v.tag === "Left") {
|
42953
|
+
return "(Left " + showIntImpl(v._1) + ")";
|
42954
|
+
}
|
42955
|
+
if (v.tag === "Right") {
|
42956
|
+
return "(Right " + showNumberImpl(v._1) + ")";
|
42957
|
+
}
|
42958
|
+
fail();
|
42959
|
+
}
|
42960
|
+
};
|
42961
|
+
var binary2 = /* @__PURE__ */ binary(showEither)(boundedJoinSemilatticeUni);
|
42962
|
+
var binaryZero2 = /* @__PURE__ */ (() => binaryZero(showEither)(boundedJoinSemilatticeUni)({
|
42963
|
+
isZero: fanin2(isZeroInt.isZero)(isZeroNumber.isZero)
|
42964
|
+
}))();
|
42965
|
+
var binary1 = /* @__PURE__ */ binary(showBoolean)(boundedJoinSemilatticeUni);
|
42966
|
+
var binaryZero1 = /* @__PURE__ */ binaryZero(showInt)(boundedJoinSemilatticeUni)(isZeroInt);
|
42881
42967
|
var pow3 = /* @__PURE__ */ union5(asNumberIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)((x2) => (y2) => pow(toNumber(x2))(toNumber(y2)))(pow);
|
42882
42968
|
var numToStr = (v2) => {
|
42883
42969
|
if (v2.tag === "Left") {
|
@@ -42899,14 +42985,14 @@ var matrixUpdate = /* @__PURE__ */ $Tuple(
|
|
42899
42985
|
return (v) => {
|
42900
42986
|
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") {
|
42901
42987
|
const $0 = v._2._2._1;
|
42902
|
-
const $
|
42903
|
-
return Functor0.map((f) => f($
|
42988
|
+
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));
|
42989
|
+
return Functor0.map((f) => f(v$p))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
42904
42990
|
"Two",
|
42905
42991
|
Leaf2,
|
42906
42992
|
v._1._1,
|
42907
42993
|
void 0,
|
42908
42994
|
Leaf2
|
42909
|
-
))));
|
42995
|
+
))(pack9(v$p))));
|
42910
42996
|
}
|
42911
42997
|
return MonadThrow0.throwError(error("Matrix, pair of integers and value expected"));
|
42912
42998
|
};
|
@@ -43088,28 +43174,31 @@ var dims = /* @__PURE__ */ $Tuple(
|
|
43088
43174
|
const Functor0 = Bind1.Apply0().Functor0();
|
43089
43175
|
return (v) => {
|
43090
43176
|
if (v.tag === "Cons" && v._1._2.tag === "Matrix" && v._2.tag === "Nil") {
|
43091
|
-
const $0 = v._1._2._1._2.
|
43092
|
-
const $1 = v._1._1;
|
43093
|
-
const $2 = v._1.
|
43094
|
-
|
43177
|
+
const $0 = v._1._2._1._2._1._1;
|
43178
|
+
const $1 = v._1._2._1._2._2._1;
|
43179
|
+
const $2 = v._1._1;
|
43180
|
+
const $3 = v._1._2._1._2._2._2;
|
43181
|
+
return Bind1.bind(Functor0.map((f) => f($BaseVal("Int", $0)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
43095
43182
|
"Two",
|
43096
43183
|
Leaf2,
|
43097
43184
|
v._1._2._1._2._1._2,
|
43098
43185
|
void 0,
|
43099
43186
|
Leaf2
|
43100
|
-
)))))((v1) => Bind1.bind(Functor0.map((f) => f($BaseVal("Int", $
|
43101
|
-
"Two",
|
43102
|
-
Leaf2,
|
43103
|
-
$2,
|
43104
|
-
void 0,
|
43105
|
-
Leaf2
|
43106
|
-
)))))((v2) => Functor0.map((f) => f($BaseVal("Constr", "Pair", $List("Cons", v1, $List("Cons", v2, Nil)))))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
43187
|
+
))(pack9($BaseVal("Int", $0))))))((v1) => Bind1.bind(Functor0.map((f) => f($BaseVal("Int", $1)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map(
|
43107
43188
|
"Two",
|
43108
43189
|
Leaf2,
|
43109
|
-
$
|
43190
|
+
$3,
|
43110
43191
|
void 0,
|
43111
43192
|
Leaf2
|
43112
|
-
))))))
|
43193
|
+
))(pack9($BaseVal("Int", $1))))))((v2) => Functor0.map((f) => f($BaseVal(
|
43194
|
+
"Constr",
|
43195
|
+
"Pair",
|
43196
|
+
$List("Cons", v1, $List("Cons", v2, Nil))
|
43197
|
+
)))(Functor0.map(Val)(dictMonadWithGraphAlloc.new($$$Map("Two", Leaf2, $2, void 0, Leaf2))(pack9($BaseVal(
|
43198
|
+
"Constr",
|
43199
|
+
"Pair",
|
43200
|
+
$List("Cons", v1, $List("Cons", v2, Nil))
|
43201
|
+
)))))));
|
43113
43202
|
}
|
43114
43203
|
return MonadThrow0.throwError(error("Matrix expected"));
|
43115
43204
|
};
|
@@ -43189,7 +43278,7 @@ var dict_map = /* @__PURE__ */ $Tuple(
|
|
43189
43278
|
$1,
|
43190
43279
|
void 0,
|
43191
43280
|
Leaf2
|
43192
|
-
)))));
|
43281
|
+
))(pack9($BaseVal("Dictionary", d$p))))));
|
43193
43282
|
}
|
43194
43283
|
return MonadThrow0.throwError(error("Function and dictionary expected"));
|
43195
43284
|
};
|
@@ -43254,27 +43343,31 @@ var dict_intersectionWith = /* @__PURE__ */ $Tuple(
|
|
43254
43343
|
const Bind1 = Monad0.Bind1();
|
43255
43344
|
const Apply0 = Bind1.Apply0();
|
43256
43345
|
const $0 = Apply0.Functor0();
|
43257
|
-
const
|
43346
|
+
const Applicative0 = Monad0.Applicative0();
|
43258
43347
|
return (v) => {
|
43259
43348
|
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") {
|
43260
43349
|
const $1 = v._1;
|
43261
|
-
|
43262
|
-
|
43263
|
-
|
43264
|
-
|
43265
|
-
|
43266
|
-
|
43267
|
-
|
43268
|
-
const $2 = v2._2;
|
43269
|
-
const $3 = v3._2;
|
43270
|
-
return Bind1.bind(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v3._1)()($$$Map(
|
43350
|
+
const $2 = v._2._1._1;
|
43351
|
+
const $3 = v._2._2._1._1;
|
43352
|
+
const v$p = $0.map(Dictionary3)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity19)(intersectionWith_Object((v2) => (v3) => {
|
43353
|
+
const $4 = v3._2;
|
43354
|
+
const $5 = v2._1;
|
43355
|
+
const $6 = v3._1;
|
43356
|
+
return Bind1.bind(Bind1.bind(apply4($1)(v2._2))((a) => apply4(a)($4)))((v4) => Bind1.bind(dictMonadWithGraphAlloc.new(insert3(ordVertex)($6)()($$$Map(
|
43271
43357
|
"Two",
|
43272
43358
|
Leaf2,
|
43273
|
-
|
43359
|
+
$5,
|
43274
43360
|
void 0,
|
43275
43361
|
Leaf2
|
43276
|
-
))))((\u03B2$p$p) => $0.map(Tuple(\u03B2$p$p))(
|
43277
|
-
})(v._2._1._2._1)(v._2._2._1._2._1))))
|
43362
|
+
)))(pack9(v4._2)))((\u03B2$p$p) => $0.map(Tuple(\u03B2$p$p))(Applicative0.pure(v4))));
|
43363
|
+
})(v._2._1._2._1)(v._2._2._1._2._1))));
|
43364
|
+
return Bind1.bind(v$p)((packable) => Apply0.apply($0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)($3)()($$$Map(
|
43365
|
+
"Two",
|
43366
|
+
Leaf2,
|
43367
|
+
$2,
|
43368
|
+
void 0,
|
43369
|
+
Leaf2
|
43370
|
+
)))(pack9(packable))))(v$p));
|
43278
43371
|
}
|
43279
43372
|
return MonadThrow0.throwError(error("Function and two dictionaries expected"));
|
43280
43373
|
};
|
@@ -43507,14 +43600,14 @@ var dict_disjointUnion = /* @__PURE__ */ $Tuple(
|
|
43507
43600
|
const Functor0 = MonadThrow0.Monad0().Bind1().Apply0().Functor0();
|
43508
43601
|
return (v) => {
|
43509
43602
|
if (v.tag === "Cons" && v._1._2.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._2.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
43510
|
-
const
|
43511
|
-
return Functor0.map((f) => f(
|
43603
|
+
const v1 = $BaseVal("Dictionary", disjointUnion5(v._1._2._1)(v._2._1._2._1));
|
43604
|
+
return Functor0.map((f) => f(v1))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v._2._1._1)()($$$Map(
|
43512
43605
|
"Two",
|
43513
43606
|
Leaf2,
|
43514
43607
|
v._1._1,
|
43515
43608
|
void 0,
|
43516
43609
|
Leaf2
|
43517
|
-
)))));
|
43610
|
+
)))(pack9(v1))));
|
43518
43611
|
}
|
43519
43612
|
return MonadThrow0.throwError(error("Dictionaries expected"));
|
43520
43613
|
};
|
@@ -43555,14 +43648,14 @@ var dict_difference = /* @__PURE__ */ $Tuple(
|
|
43555
43648
|
const Functor0 = MonadThrow0.Monad0().Bind1().Apply0().Functor0();
|
43556
43649
|
return (v) => {
|
43557
43650
|
if (v.tag === "Cons" && v._1._2.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._2.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
43558
|
-
const
|
43559
|
-
return Functor0.map((f) => f(
|
43651
|
+
const v1 = $BaseVal("Dictionary", mapFObjectString.difference(v._1._2._1)(v._2._1._2._1));
|
43652
|
+
return Functor0.map((f) => f(v1))(Functor0.map(Val)(dictMonadWithGraphAlloc.new(insert3(ordVertex)(v._2._1._1)()($$$Map(
|
43560
43653
|
"Two",
|
43561
43654
|
Leaf2,
|
43562
43655
|
v._1._1,
|
43563
43656
|
void 0,
|
43564
43657
|
Leaf2
|
43565
|
-
)))));
|
43658
|
+
)))(pack9(v1))));
|
43566
43659
|
}
|
43567
43660
|
return MonadThrow0.throwError(error("Dictionaries expected."));
|
43568
43661
|
};
|
@@ -43631,8 +43724,8 @@ var primitives = /* @__PURE__ */ fromFoldable(foldableArray)([
|
|
43631
43724
|
/* @__PURE__ */ extern1(dims),
|
43632
43725
|
/* @__PURE__ */ extern1(error_),
|
43633
43726
|
/* @__PURE__ */ unary2("floor")({ i: number5, o: $$int, fwd: floor2 }),
|
43634
|
-
/* @__PURE__ */
|
43635
|
-
/* @__PURE__ */
|
43727
|
+
/* @__PURE__ */ unary(showNumber)(boundedJoinSemilatticeUni)("log")({ i: intOrNumber, o: number5, fwd: log3 }),
|
43728
|
+
/* @__PURE__ */ unary(showString)(boundedJoinSemilatticeUni)("numToStr")({ i: intOrNumber, o: string2, fwd: numToStr }),
|
43636
43729
|
/* @__PURE__ */ binary2("+")({
|
43637
43730
|
i1: intOrNumber,
|
43638
43731
|
i2: intOrNumber,
|
@@ -43645,25 +43738,30 @@ var primitives = /* @__PURE__ */ fromFoldable(foldableArray)([
|
|
43645
43738
|
o: intOrNumber,
|
43646
43739
|
fwd: /* @__PURE__ */ union5(asIntIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)(intSub)(numSub)
|
43647
43740
|
}),
|
43648
|
-
/* @__PURE__ */
|
43741
|
+
/* @__PURE__ */ binaryZero2("*")({
|
43649
43742
|
i: intOrNumber,
|
43650
43743
|
o: intOrNumber,
|
43651
43744
|
fwd: /* @__PURE__ */ union5(asIntIntOrNumber)(asNumberIntOrNumber)(asIntNumber)(asIntNumber)(intMul)(numMul)
|
43652
43745
|
}),
|
43653
|
-
/* @__PURE__ */
|
43654
|
-
/* @__PURE__ */
|
43655
|
-
/* @__PURE__ */
|
43746
|
+
/* @__PURE__ */ binaryZero2("**")({ i: intOrNumber, o: intOrNumber, fwd: pow3 }),
|
43747
|
+
/* @__PURE__ */ binaryZero2("/")({ i: intOrNumber, o: intOrNumber, fwd: divide }),
|
43748
|
+
/* @__PURE__ */ binary1("==")({
|
43656
43749
|
i1: intOrNumberOrString,
|
43657
43750
|
i2: intOrNumberOrString,
|
43658
43751
|
o: $$boolean,
|
43659
43752
|
fwd: /* @__PURE__ */ union5(asBooleanBoolean)(asBooleanBoolean)(asIntNumberOrString)(asIntNumberOrString)(eqIntImpl)(/* @__PURE__ */ unionStr(asBooleanBoolean)(asNumberString)(eqNumberImpl)(eqStringImpl))
|
43660
43753
|
}),
|
43661
|
-
/* @__PURE__ */
|
43662
|
-
/* @__PURE__ */
|
43663
|
-
/* @__PURE__ */
|
43664
|
-
/* @__PURE__ */
|
43665
|
-
/* @__PURE__ */
|
43666
|
-
/* @__PURE__ */
|
43754
|
+
/* @__PURE__ */ binary1("/=")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: notEquals }),
|
43755
|
+
/* @__PURE__ */ binary1("<")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: lessThan }),
|
43756
|
+
/* @__PURE__ */ binary1(">")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: greaterThan }),
|
43757
|
+
/* @__PURE__ */ binary1("<=")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: lessThanEquals }),
|
43758
|
+
/* @__PURE__ */ binary1(">=")({ i1: intOrNumberOrString, i2: intOrNumberOrString, o: $$boolean, fwd: greaterThanEquals }),
|
43759
|
+
/* @__PURE__ */ binary(showString)(boundedJoinSemilatticeUni)("++")({
|
43760
|
+
i1: string2,
|
43761
|
+
i2: string2,
|
43762
|
+
o: string2,
|
43763
|
+
fwd: concatString
|
43764
|
+
}),
|
43667
43765
|
/* @__PURE__ */ extern1(matrixLookup),
|
43668
43766
|
/* @__PURE__ */ extern1(dict_difference),
|
43669
43767
|
/* @__PURE__ */ extern1(dict_disjointUnion),
|
@@ -43672,10 +43770,10 @@ var primitives = /* @__PURE__ */ fromFoldable(foldableArray)([
|
|
43672
43770
|
/* @__PURE__ */ extern1(dict_intersectionWith),
|
43673
43771
|
/* @__PURE__ */ extern1(dict_map),
|
43674
43772
|
/* @__PURE__ */ extern1(matrixUpdate),
|
43675
|
-
/* @__PURE__ */
|
43676
|
-
/* @__PURE__ */
|
43677
|
-
/* @__PURE__ */
|
43678
|
-
/* @__PURE__ */
|
43773
|
+
/* @__PURE__ */ binaryZero1("div")({ i: $$int, o: $$int, fwd: intDiv2 }),
|
43774
|
+
/* @__PURE__ */ binaryZero1("mod")({ i: $$int, o: $$int, fwd: intMod }),
|
43775
|
+
/* @__PURE__ */ binaryZero1("quot")({ i: $$int, o: $$int, fwd: quot }),
|
43776
|
+
/* @__PURE__ */ binaryZero1("rem")({ i: $$int, o: $$int, fwd: rem })
|
43679
43777
|
]);
|
43680
43778
|
|
43681
43779
|
// output-es/ProgCxt/index.js
|