@explorable-viz/fluid 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluid/shared/fluid.mjs +807 -786
- package/dist/fluid/shared/load-figure.js +951 -835
- package/dist/fluid/shared/webtest-lib.js +740 -740
- package/package.json +1 -1
@@ -326,15 +326,6 @@ var applyEither = {
|
|
326
326
|
Functor0: () => functorEither
|
327
327
|
};
|
328
328
|
var applicativeEither = { pure: Right, Apply0: () => applyEither };
|
329
|
-
var altEither = {
|
330
|
-
alt: (v) => (v1) => {
|
331
|
-
if (v.tag === "Left") {
|
332
|
-
return v1;
|
333
|
-
}
|
334
|
-
return v;
|
335
|
-
},
|
336
|
-
Functor0: () => functorEither
|
337
|
-
};
|
338
329
|
|
339
330
|
// output-es/Effect/foreign.js
|
340
331
|
var pureE = function(a) {
|
@@ -800,6 +791,12 @@ var foldrDefault = (dictFoldable) => {
|
|
800
791
|
const foldMap22 = dictFoldable.foldMap(monoidEndo);
|
801
792
|
return (c) => (u) => (xs) => foldMap22((x2) => c(x2))(xs)(u);
|
802
793
|
};
|
794
|
+
var find = (dictFoldable) => (p) => dictFoldable.foldl((v) => (v1) => {
|
795
|
+
if (v.tag === "Nothing" && p(v1)) {
|
796
|
+
return $Maybe("Just", v1);
|
797
|
+
}
|
798
|
+
return v;
|
799
|
+
})(Nothing);
|
803
800
|
|
804
801
|
// output-es/Unsafe.Coerce/foreign.js
|
805
802
|
var unsafeCoerce = function(x2) {
|
@@ -1167,6 +1164,7 @@ var nubBy = (comp) => (xs) => {
|
|
1167
1164
|
}
|
1168
1165
|
fail();
|
1169
1166
|
};
|
1167
|
+
var foldM = (dictMonad) => (f) => (b) => unconsImpl((v) => dictMonad.Applicative0().pure(b))((a) => (as) => dictMonad.Bind1().bind(f(b)(a))((b$p) => foldM(dictMonad)(f)(b$p)(as)));
|
1170
1168
|
var findIndex = /* @__PURE__ */ findIndexImpl(Just)(Nothing);
|
1171
1169
|
var notElem = (dictEq) => (a) => (arr) => {
|
1172
1170
|
const $0 = findIndex((v) => dictEq.eq(v)(a))(arr);
|
@@ -1375,20 +1373,20 @@ var insert = (k) => (v) => mutate(($0) => () => {
|
|
1375
1373
|
var functorObject = { map: (f) => (m) => _fmapObject(m, f) };
|
1376
1374
|
var functorWithIndexObject = { mapWithIndex: mapWithKey, Functor0: () => functorObject };
|
1377
1375
|
var fromFoldable = (dictFoldable) => {
|
1378
|
-
const
|
1376
|
+
const fromFoldable113 = fromFoldableImpl(dictFoldable.foldr);
|
1379
1377
|
return (l) => {
|
1380
1378
|
const s = {};
|
1381
|
-
for (const v of
|
1379
|
+
for (const v of fromFoldable113(l)) {
|
1382
1380
|
s[v._1] = v._2;
|
1383
1381
|
}
|
1384
1382
|
return s;
|
1385
1383
|
};
|
1386
1384
|
};
|
1387
|
-
var
|
1385
|
+
var foldM2 = (dictMonad) => {
|
1388
1386
|
const bind1 = dictMonad.Bind1().bind;
|
1389
1387
|
return (f) => (z) => _foldM(bind1)(f)(dictMonad.Applicative0().pure(z));
|
1390
1388
|
};
|
1391
|
-
var foldM1 = /* @__PURE__ */
|
1389
|
+
var foldM1 = /* @__PURE__ */ foldM2(monadST);
|
1392
1390
|
var union = (m) => mutate((s) => foldM1((s$p) => (k) => (v) => () => {
|
1393
1391
|
s$p[k] = v;
|
1394
1392
|
return s$p;
|
@@ -1487,7 +1485,6 @@ function _caseJson(isNull2, isBool, isNum, isStr, isArr, isObj, j) {
|
|
1487
1485
|
// output-es/Data.Argonaut.Core/index.js
|
1488
1486
|
var jsonEmptyObject = /* @__PURE__ */ id(empty);
|
1489
1487
|
var caseJsonString = (d) => (f) => (j) => _caseJson((v) => d, (v) => d, (v) => d, f, (v) => d, (v) => d, j);
|
1490
|
-
var caseJson = (a) => (b) => (c) => (d) => (e) => (f) => (json) => _caseJson(a, b, c, d, e, f, json);
|
1491
1488
|
|
1492
1489
|
// output-es/Data.Argonaut.Parser/foreign.js
|
1493
1490
|
function _jsonParser(fail3, succ, s) {
|
@@ -1852,7 +1849,7 @@ var foldableNonEmptyList = {
|
|
1852
1849
|
};
|
1853
1850
|
var semigroupNonEmptyList = { append: (v) => (as$p) => $NonEmpty(v._1, foldableList.foldr(Cons)($List("Cons", as$p._1, as$p._2))(v._2)) };
|
1854
1851
|
var showList = (dictShow) => {
|
1855
|
-
const
|
1852
|
+
const show5 = dictShow.show;
|
1856
1853
|
return {
|
1857
1854
|
show: (v) => {
|
1858
1855
|
if (v.tag === "Nil") {
|
@@ -1876,7 +1873,7 @@ var showList = (dictShow) => {
|
|
1876
1873
|
}
|
1877
1874
|
return go$r;
|
1878
1875
|
};
|
1879
|
-
return "(" + go({ init: true, acc: "" })(listMap(
|
1876
|
+
return "(" + go({ init: true, acc: "" })(listMap(show5)(v)).acc + " : Nil)";
|
1880
1877
|
}
|
1881
1878
|
};
|
1882
1879
|
};
|
@@ -3222,16 +3219,6 @@ var _toChar = function(just) {
|
|
3222
3219
|
var length2 = function(s) {
|
3223
3220
|
return s.length;
|
3224
3221
|
};
|
3225
|
-
var _indexOf = function(just) {
|
3226
|
-
return function(nothing) {
|
3227
|
-
return function(x2) {
|
3228
|
-
return function(s) {
|
3229
|
-
var i = s.indexOf(x2);
|
3230
|
-
return i === -1 ? nothing : just(i);
|
3231
|
-
};
|
3232
|
-
};
|
3233
|
-
};
|
3234
|
-
};
|
3235
3222
|
var take = function(n) {
|
3236
3223
|
return function(s) {
|
3237
3224
|
return s.substr(0, n);
|
@@ -3263,20 +3250,6 @@ var stripPrefix = (v) => (str) => {
|
|
3263
3250
|
}
|
3264
3251
|
return Nothing;
|
3265
3252
|
};
|
3266
|
-
var indexOf = /* @__PURE__ */ _indexOf(Just)(Nothing);
|
3267
|
-
var contains = (pat) => {
|
3268
|
-
const $0 = indexOf(pat);
|
3269
|
-
return (x2) => {
|
3270
|
-
const $1 = $0(x2);
|
3271
|
-
if ($1.tag === "Nothing") {
|
3272
|
-
return false;
|
3273
|
-
}
|
3274
|
-
if ($1.tag === "Just") {
|
3275
|
-
return true;
|
3276
|
-
}
|
3277
|
-
fail();
|
3278
|
-
};
|
3279
|
-
};
|
3280
3253
|
var charAt2 = /* @__PURE__ */ _charAt(Just)(Nothing);
|
3281
3254
|
|
3282
3255
|
// output-es/Foreign/foreign.js
|
@@ -4207,10 +4180,10 @@ function childMatcher(selector) {
|
|
4207
4180
|
}
|
4208
4181
|
|
4209
4182
|
// node_modules/d3-selection/src/selection/selectChild.js
|
4210
|
-
var
|
4183
|
+
var find2 = Array.prototype.find;
|
4211
4184
|
function childFind(match4) {
|
4212
4185
|
return function() {
|
4213
|
-
return
|
4186
|
+
return find2.call(this.children, match4);
|
4214
4187
|
};
|
4215
4188
|
}
|
4216
4189
|
function childFirst() {
|
@@ -10247,7 +10220,7 @@ function getSelection(root2) {
|
|
10247
10220
|
}
|
10248
10221
|
return target.getSelection();
|
10249
10222
|
}
|
10250
|
-
function
|
10223
|
+
function contains(dom, node) {
|
10251
10224
|
return node ? dom == node || dom.contains(node.nodeType != 1 ? node.parentNode : node) : false;
|
10252
10225
|
}
|
10253
10226
|
function deepActiveElement(doc2) {
|
@@ -10260,7 +10233,7 @@ function hasSelection(dom, selection2) {
|
|
10260
10233
|
if (!selection2.anchorNode)
|
10261
10234
|
return false;
|
10262
10235
|
try {
|
10263
|
-
return
|
10236
|
+
return contains(dom, selection2.anchorNode);
|
10264
10237
|
} catch (_) {
|
10265
10238
|
return false;
|
10266
10239
|
}
|
@@ -11159,7 +11132,7 @@ function scanCompositionTree(pos, side, view2, text2, enterView, fromText) {
|
|
11159
11132
|
let desc = ContentView.get(child);
|
11160
11133
|
if (!desc)
|
11161
11134
|
return fromText(pos, side);
|
11162
|
-
let hasComp =
|
11135
|
+
let hasComp = contains(child, text2);
|
11163
11136
|
let len = desc.length + (hasComp ? text2.nodeValue.length : 0);
|
11164
11137
|
if (pos < len || pos == len && desc.getSide() <= 0)
|
11165
11138
|
return hasComp ? scanCompositionTree(pos, side, desc, text2, enterView, fromText) : enterView(desc, pos, side);
|
@@ -11176,8 +11149,8 @@ function posFromDOMInCompositionTree(node, offset, view2, text2) {
|
|
11176
11149
|
if (view2 instanceof MarkView) {
|
11177
11150
|
let pos = 0;
|
11178
11151
|
for (let child of view2.children) {
|
11179
|
-
let hasComp =
|
11180
|
-
if (
|
11152
|
+
let hasComp = contains(child.dom, text2);
|
11153
|
+
if (contains(child.dom, node))
|
11181
11154
|
return pos + (hasComp ? posFromDOMInCompositionTree(node, offset, child, text2) : child.localPosFromDOM(node, offset));
|
11182
11155
|
pos += hasComp ? text2.nodeValue.length : child.length;
|
11183
11156
|
}
|
@@ -14832,7 +14805,7 @@ var ViewState = class {
|
|
14832
14805
|
return;
|
14833
14806
|
}
|
14834
14807
|
}
|
14835
|
-
let gap =
|
14808
|
+
let gap = find3(current, (gap2) => gap2.from >= line2.from && gap2.to <= line2.to && Math.abs(gap2.from - from) < halfMargin && Math.abs(gap2.to - to) < halfMargin && !avoid.some((pos) => gap2.from < pos && gap2.to > pos));
|
14836
14809
|
if (!gap) {
|
14837
14810
|
if (to < line2.to && mayMeasure && wrapping && mayMeasure.visibleRanges.some((r) => r.from <= to && r.to >= to)) {
|
14838
14811
|
let lineStart = mayMeasure.moveToLineBoundary(EditorSelection.cursor(to), false, true).head;
|
@@ -14983,7 +14956,7 @@ function findFraction(structure, pos) {
|
|
14983
14956
|
}
|
14984
14957
|
return counted / structure.total;
|
14985
14958
|
}
|
14986
|
-
function
|
14959
|
+
function find3(array2, f) {
|
14987
14960
|
for (let val of array2)
|
14988
14961
|
if (f(val))
|
14989
14962
|
return val;
|
@@ -15302,8 +15275,8 @@ var DOMChange = class {
|
|
15302
15275
|
this.newSel = selectionFromPoints(selPoints, this.bounds.from);
|
15303
15276
|
} else {
|
15304
15277
|
let domSel = view2.observer.selectionRange;
|
15305
|
-
let head = iHead && iHead.node == domSel.focusNode && iHead.offset == domSel.focusOffset || !
|
15306
|
-
let anchor = iAnchor && iAnchor.node == domSel.anchorNode && iAnchor.offset == domSel.anchorOffset || !
|
15278
|
+
let head = iHead && iHead.node == domSel.focusNode && iHead.offset == domSel.focusOffset || !contains(view2.contentDOM, domSel.focusNode) ? view2.state.selection.main.head : view2.docView.posFromDOM(domSel.focusNode, domSel.focusOffset);
|
15279
|
+
let anchor = iAnchor && iAnchor.node == domSel.anchorNode && iAnchor.offset == domSel.anchorOffset || !contains(view2.contentDOM, domSel.anchorNode) ? view2.state.selection.main.anchor : view2.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset);
|
15307
15280
|
this.newSel = EditorSelection.single(anchor, head);
|
15308
15281
|
}
|
15309
15282
|
}
|
@@ -18251,10 +18224,10 @@ function tagHighlighter(tags2, options) {
|
|
18251
18224
|
for (let tag of style.tag)
|
18252
18225
|
map3[tag.id] = style.class;
|
18253
18226
|
}
|
18254
|
-
let { scope, all:
|
18227
|
+
let { scope, all: all4 = null } = options || {};
|
18255
18228
|
return {
|
18256
18229
|
style: (tags3) => {
|
18257
|
-
let cls =
|
18230
|
+
let cls = all4;
|
18258
18231
|
for (let tag of tags3) {
|
18259
18232
|
for (let sub of tag.set) {
|
18260
18233
|
let tagClass = map3[sub.id];
|
@@ -19009,14 +18982,14 @@ var HighlightStyle = class {
|
|
19009
18982
|
(modSpec || (modSpec = /* @__PURE__ */ Object.create(null)))["." + cls] = spec;
|
19010
18983
|
return cls;
|
19011
18984
|
}
|
19012
|
-
const
|
18985
|
+
const all4 = typeof options.all == "string" ? options.all : options.all ? def(options.all) : void 0;
|
19013
18986
|
const scopeOpt = options.scope;
|
19014
18987
|
this.scope = scopeOpt instanceof Language ? (type2) => type2.prop(languageDataProp) == scopeOpt.data : scopeOpt ? (type2) => type2 == scopeOpt : void 0;
|
19015
18988
|
this.style = tagHighlighter(specs.map((style) => ({
|
19016
18989
|
tag: style.tag,
|
19017
18990
|
class: style.class || def(Object.assign({}, style, { tag: null }))
|
19018
18991
|
})), {
|
19019
|
-
all:
|
18992
|
+
all: all4
|
19020
18993
|
}).style;
|
19021
18994
|
this.module = modSpec ? new StyleModule(modSpec) : null;
|
19022
18995
|
this.themeType = options.themeType;
|
@@ -20633,6 +20606,16 @@ var groupBy = (v) => (v1) => {
|
|
20633
20606
|
}
|
20634
20607
|
fail();
|
20635
20608
|
};
|
20609
|
+
var foldM3 = (dictMonad) => (v) => (v1) => (v2) => {
|
20610
|
+
if (v2.tag === "Nil") {
|
20611
|
+
return dictMonad.Applicative0().pure(v1);
|
20612
|
+
}
|
20613
|
+
if (v2.tag === "Cons") {
|
20614
|
+
const $0 = v2._2;
|
20615
|
+
return dictMonad.Bind1().bind(v(v1)(v2._1))((b$p) => foldM3(dictMonad)(v)(b$p)($0));
|
20616
|
+
}
|
20617
|
+
fail();
|
20618
|
+
};
|
20636
20619
|
var drop2 = (drop$a0$copy) => (drop$a1$copy) => {
|
20637
20620
|
let drop$a0 = drop$a0$copy, drop$a1 = drop$a1$copy, drop$c = true, drop$r;
|
20638
20621
|
while (drop$c) {
|
@@ -20806,7 +20789,10 @@ var filter3 = (p) => {
|
|
20806
20789
|
var $KickUp = (_1, _2, _3, _4) => ({ tag: "KickUp", _1, _2, _3, _4 });
|
20807
20790
|
var $$$Map = (tag, _1, _2, _3, _4, _5, _6, _7) => ({ tag, _1, _2, _3, _4, _5, _6, _7 });
|
20808
20791
|
var $TreeContext = (tag, _1, _2, _3, _4, _5, _6) => ({ tag, _1, _2, _3, _4, _5, _6 });
|
20792
|
+
var identity15 = (x2) => x2;
|
20809
20793
|
var Leaf2 = /* @__PURE__ */ $$$Map("Leaf");
|
20794
|
+
var Two = (value0) => (value1) => (value2) => (value3) => $$$Map("Two", value0, value1, value2, value3);
|
20795
|
+
var Three = (value0) => (value1) => (value2) => (value3) => (value4) => (value5) => (value6) => $$$Map("Three", value0, value1, value2, value3, value4, value5, value6);
|
20810
20796
|
var size2 = (v) => {
|
20811
20797
|
if (v.tag === "Leaf") {
|
20812
20798
|
return 0;
|
@@ -20925,6 +20911,20 @@ var lookup2 = (dictOrd) => (k) => {
|
|
20925
20911
|
};
|
20926
20912
|
return go;
|
20927
20913
|
};
|
20914
|
+
var functorMap = {
|
20915
|
+
map: (v) => (v1) => {
|
20916
|
+
if (v1.tag === "Leaf") {
|
20917
|
+
return Leaf2;
|
20918
|
+
}
|
20919
|
+
if (v1.tag === "Two") {
|
20920
|
+
return $$$Map("Two", functorMap.map(v)(v1._1), v1._2, v(v1._3), functorMap.map(v)(v1._4));
|
20921
|
+
}
|
20922
|
+
if (v1.tag === "Three") {
|
20923
|
+
return $$$Map("Three", functorMap.map(v)(v1._1), v1._2, v(v1._3), functorMap.map(v)(v1._4), v1._5, v(v1._6), functorMap.map(v)(v1._7));
|
20924
|
+
}
|
20925
|
+
fail();
|
20926
|
+
}
|
20927
|
+
};
|
20928
20928
|
var fromZipper = (fromZipper$a0$copy) => (fromZipper$a1$copy) => (fromZipper$a2$copy) => {
|
20929
20929
|
let fromZipper$a0 = fromZipper$a0$copy, fromZipper$a1 = fromZipper$a1$copy, fromZipper$a2 = fromZipper$a2$copy, fromZipper$c = true, fromZipper$r;
|
20930
20930
|
while (fromZipper$c) {
|
@@ -21711,6 +21711,27 @@ var foldableWithIndexMap = {
|
|
21711
21711
|
},
|
21712
21712
|
Foldable0: () => foldableMap
|
21713
21713
|
};
|
21714
|
+
var traversableMap = {
|
21715
|
+
traverse: (dictApplicative) => {
|
21716
|
+
const Apply0 = dictApplicative.Apply0();
|
21717
|
+
const $0 = Apply0.Functor0();
|
21718
|
+
return (v) => (v1) => {
|
21719
|
+
if (v1.tag === "Leaf") {
|
21720
|
+
return dictApplicative.pure(Leaf2);
|
21721
|
+
}
|
21722
|
+
if (v1.tag === "Two") {
|
21723
|
+
return Apply0.apply(Apply0.apply(Apply0.apply($0.map(Two)(traversableMap.traverse(dictApplicative)(v)(v1._1)))(dictApplicative.pure(v1._2)))(v(v1._3)))(traversableMap.traverse(dictApplicative)(v)(v1._4));
|
21724
|
+
}
|
21725
|
+
if (v1.tag === "Three") {
|
21726
|
+
return Apply0.apply(Apply0.apply(Apply0.apply(Apply0.apply(Apply0.apply(Apply0.apply($0.map(Three)(traversableMap.traverse(dictApplicative)(v)(v1._1)))(dictApplicative.pure(v1._2)))(v(v1._3)))(traversableMap.traverse(dictApplicative)(v)(v1._4)))(dictApplicative.pure(v1._5)))(v(v1._6)))(traversableMap.traverse(dictApplicative)(v)(v1._7));
|
21727
|
+
}
|
21728
|
+
fail();
|
21729
|
+
};
|
21730
|
+
},
|
21731
|
+
sequence: (dictApplicative) => traversableMap.traverse(dictApplicative)(identity15),
|
21732
|
+
Functor0: () => functorMap,
|
21733
|
+
Foldable1: () => foldableMap
|
21734
|
+
};
|
21714
21735
|
var findMin = /* @__PURE__ */ (() => {
|
21715
21736
|
const go = (go$a0$copy) => (go$a1$copy) => {
|
21716
21737
|
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
@@ -21743,10 +21764,10 @@ var eqMap = (dictEq) => (dictEq1) => {
|
|
21743
21764
|
};
|
21744
21765
|
var fromFoldable2 = (dictOrd) => (dictFoldable) => dictFoldable.foldl((m) => (v) => insert3(dictOrd)(v._1)(v._2)(m))(Leaf2);
|
21745
21766
|
var filterWithKey2 = (dictOrd) => {
|
21746
|
-
const
|
21767
|
+
const fromFoldable113 = fromFoldable2(dictOrd)(foldableList2);
|
21747
21768
|
return (predicate) => {
|
21748
21769
|
const $0 = filter3((v) => predicate(v._1)(v._2));
|
21749
|
-
return (x2) =>
|
21770
|
+
return (x2) => fromFoldable113($0(toUnfoldable3(unfoldableList2)(x2)));
|
21750
21771
|
};
|
21751
21772
|
};
|
21752
21773
|
var $$delete3 = (dictOrd) => (k) => (m) => {
|
@@ -22153,7 +22174,7 @@ var intercalate3 = (sep) => (xs) => {
|
|
22153
22174
|
};
|
22154
22175
|
return go({ init: true, acc: Nil })(xs).acc;
|
22155
22176
|
};
|
22156
|
-
var
|
22177
|
+
var identity18 = (x2) => x2;
|
22157
22178
|
var isEmptySet = { isEmpty: isEmpty2 };
|
22158
22179
|
var isEmptyObject = { isEmpty };
|
22159
22180
|
var $$throw = (dictMonadThrow) => (x2) => dictMonadThrow.throwError(error(x2));
|
@@ -22253,13 +22274,13 @@ var bind2Flipped = (dictMonad) => {
|
|
22253
22274
|
};
|
22254
22275
|
var assertWith = (v) => (v1) => {
|
22255
22276
|
if (v1) {
|
22256
|
-
return
|
22277
|
+
return identity18;
|
22257
22278
|
}
|
22258
22279
|
return (v2) => throwException(error("Assertion failure: " + v))();
|
22259
22280
|
};
|
22260
22281
|
var assertWhen = (v) => (v1) => {
|
22261
22282
|
if (!v) {
|
22262
|
-
return (v$1) =>
|
22283
|
+
return (v$1) => identity18;
|
22263
22284
|
}
|
22264
22285
|
if (v) {
|
22265
22286
|
return (x2) => assertWith(v1)(x2());
|
@@ -22306,7 +22327,7 @@ function intersectionWith_Object(f) {
|
|
22306
22327
|
}
|
22307
22328
|
|
22308
22329
|
// output-es/Util.Map/index.js
|
22309
|
-
var
|
22330
|
+
var identity19 = (x2) => x2;
|
22310
22331
|
var mapObjectString = {
|
22311
22332
|
maplet: singleton,
|
22312
22333
|
keys: /* @__PURE__ */ (() => {
|
@@ -22341,9 +22362,9 @@ var mapFObjectString = {
|
|
22341
22362
|
mapWithKey
|
22342
22363
|
};
|
22343
22364
|
var asMaplet = (dictMap) => {
|
22344
|
-
const
|
22365
|
+
const toUnfoldable16 = dictMap.toUnfoldable(unfoldableList);
|
22345
22366
|
return (m) => assertWith("")(dictMap.Set0().size(m) === 1)(definitely("singleton map")((() => {
|
22346
|
-
const $0 =
|
22367
|
+
const $0 = toUnfoldable16(m);
|
22347
22368
|
if ($0.tag === "Nil") {
|
22348
22369
|
return Nothing;
|
22349
22370
|
}
|
@@ -22359,7 +22380,7 @@ var update2 = (dictShow) => (dictMap) => (f) => (k) => {
|
|
22359
22380
|
};
|
22360
22381
|
|
22361
22382
|
// output-es/Dict/index.js
|
22362
|
-
var
|
22383
|
+
var identity20 = (x2) => x2;
|
22363
22384
|
var isEmptyDict = { isEmpty: (v) => isEmpty(v) };
|
22364
22385
|
var setDictString = {
|
22365
22386
|
empty,
|
@@ -22412,7 +22433,7 @@ var traversableDict = {
|
|
22412
22433
|
const $0 = traversableWithIndexObject.traverseWithIndex(dictApplicative);
|
22413
22434
|
return (f) => (m) => dictApplicative.Apply0().Functor0().map((v1) => v1)($0((v) => f)(m));
|
22414
22435
|
},
|
22415
|
-
sequence: (dictApplicative) => (v) => traversableDict.traverse(dictApplicative)(
|
22436
|
+
sequence: (dictApplicative) => (v) => traversableDict.traverse(dictApplicative)(identity20)(v),
|
22416
22437
|
Functor0: () => functorDict,
|
22417
22438
|
Foldable1: () => foldableDict
|
22418
22439
|
};
|
@@ -22489,16 +22510,16 @@ var toTuple = (v) => $Tuple(v._1, v._2);
|
|
22489
22510
|
var unzip3 = (xys) => unzip(listMap(toTuple)(xys));
|
22490
22511
|
|
22491
22512
|
// output-es/Lattice/index.js
|
22492
|
-
var
|
22493
|
-
var meetSemilatticeUnit = { meet: (v) =>
|
22513
|
+
var identity21 = (x2) => x2;
|
22514
|
+
var meetSemilatticeUnit = { meet: (v) => identity21 };
|
22494
22515
|
var meetSemilatticeBoolean = { meet: boolConj };
|
22495
|
-
var joinSemilatticeUnit = { join: (v) =>
|
22516
|
+
var joinSemilatticeUnit = { join: (v) => identity21 };
|
22496
22517
|
var boundedMeetSemilatticeUni = { top: void 0, MeetSemilattice0: () => meetSemilatticeUnit };
|
22497
22518
|
var boundedMeetSemilatticeBoo = { top: true, MeetSemilattice0: () => meetSemilatticeBoolean };
|
22498
22519
|
var boundedJoinSemilatticeUni = { bot: void 0, JoinSemilattice0: () => joinSemilatticeUnit };
|
22499
22520
|
|
22500
22521
|
// output-es/Data.Profunctor.Choice/index.js
|
22501
|
-
var
|
22522
|
+
var identity22 = (x2) => x2;
|
22502
22523
|
var fanin = (dictCategory) => {
|
22503
22524
|
const identity1 = dictCategory.identity;
|
22504
22525
|
const $0 = dictCategory.Semigroupoid0();
|
@@ -22511,7 +22532,7 @@ var fanin = (dictCategory) => {
|
|
22511
22532
|
return v2._1;
|
22512
22533
|
}
|
22513
22534
|
fail();
|
22514
|
-
})(
|
22535
|
+
})(identity22)(identity1))($1.compose(dictChoice.right(r))(dictChoice.left(l)));
|
22515
22536
|
};
|
22516
22537
|
var choiceFn = /* @__PURE__ */ (() => ({
|
22517
22538
|
left: (v) => (v1) => {
|
@@ -28803,7 +28824,7 @@ var between = (open) => (close) => (p) => (state1, more, lift12, $$throw2, done)
|
|
28803
28824
|
var $Assoc = (tag) => tag;
|
28804
28825
|
var $Operator = (tag, _1, _2) => ({ tag, _1, _2 });
|
28805
28826
|
var choice2 = /* @__PURE__ */ choice(foldableList);
|
28806
|
-
var
|
28827
|
+
var identity23 = (x2) => x2;
|
28807
28828
|
var AssocNone = /* @__PURE__ */ $Assoc("AssocNone");
|
28808
28829
|
var AssocLeft = /* @__PURE__ */ $Assoc("AssocLeft");
|
28809
28830
|
var AssocRight = /* @__PURE__ */ $Assoc("AssocRight");
|
@@ -28984,7 +29005,7 @@ var makeParser = (term) => (ops) => {
|
|
28984
29005
|
if ($7) {
|
28985
29006
|
return $22(v4, $6);
|
28986
29007
|
}
|
28987
|
-
return $32(v2$1,
|
29008
|
+
return $32(v2$1, identity23);
|
28988
29009
|
});
|
28989
29010
|
},
|
28990
29011
|
$32
|
@@ -29002,7 +29023,7 @@ var makeParser = (term) => (ops) => {
|
|
29002
29023
|
if ($7) {
|
29003
29024
|
return $22(v4, $6);
|
29004
29025
|
}
|
29005
|
-
return $32(v2$1,
|
29026
|
+
return $32(v2$1, identity23);
|
29006
29027
|
});
|
29007
29028
|
},
|
29008
29029
|
$32
|
@@ -29021,7 +29042,7 @@ var makeParser = (term) => (ops) => {
|
|
29021
29042
|
if ($8) {
|
29022
29043
|
return $32(v4, $7);
|
29023
29044
|
}
|
29024
|
-
return $42(v2$1,
|
29045
|
+
return $42(v2$1, identity23);
|
29025
29046
|
});
|
29026
29047
|
},
|
29027
29048
|
$42
|
@@ -29039,7 +29060,7 @@ var makeParser = (term) => (ops) => {
|
|
29039
29060
|
if ($8) {
|
29040
29061
|
return $32(v4, $7);
|
29041
29062
|
}
|
29042
|
-
return $42(v2$1,
|
29063
|
+
return $42(v2$1, identity23);
|
29043
29064
|
});
|
29044
29065
|
},
|
29045
29066
|
$42
|
@@ -29058,7 +29079,7 @@ var makeParser = (term) => (ops) => {
|
|
29058
29079
|
if ($9) {
|
29059
29080
|
return $42(v4, $8);
|
29060
29081
|
}
|
29061
|
-
return $52(v2$1,
|
29082
|
+
return $52(v2$1, identity23);
|
29062
29083
|
});
|
29063
29084
|
},
|
29064
29085
|
$52
|
@@ -29076,7 +29097,7 @@ var makeParser = (term) => (ops) => {
|
|
29076
29097
|
if ($9) {
|
29077
29098
|
return $42(v4, $8);
|
29078
29099
|
}
|
29079
|
-
return $52(v2$1,
|
29100
|
+
return $52(v2$1, identity23);
|
29080
29101
|
});
|
29081
29102
|
},
|
29082
29103
|
$52
|
@@ -29171,7 +29192,7 @@ var makeParser = (term) => (ops) => {
|
|
29171
29192
|
if ($5) {
|
29172
29193
|
return $$throw2(v4, $4);
|
29173
29194
|
}
|
29174
|
-
return $1(state1,
|
29195
|
+
return $1(state1, identity23);
|
29175
29196
|
});
|
29176
29197
|
},
|
29177
29198
|
$1
|
@@ -29263,7 +29284,7 @@ var unions = /* @__PURE__ */ (() => {
|
|
29263
29284
|
};
|
29264
29285
|
return go(Leaf2);
|
29265
29286
|
})();
|
29266
|
-
var
|
29287
|
+
var identity26 = (x2) => x2;
|
29267
29288
|
var Unquote = (value0) => $DocCommentElem("Unquote", value0);
|
29268
29289
|
var None = /* @__PURE__ */ $DocOpt("None");
|
29269
29290
|
var Doc = (value0) => $DocOpt("Doc", value0);
|
@@ -29470,18 +29491,18 @@ var traversableDocCommentElem = (dictTraversable) => {
|
|
29470
29491
|
};
|
29471
29492
|
return {
|
29472
29493
|
traverse: (dictApplicative) => {
|
29473
|
-
const
|
29494
|
+
const traverse22 = dictTraversable.traverse(dictApplicative);
|
29474
29495
|
return (f) => (m) => {
|
29475
29496
|
if (m.tag === "Token") {
|
29476
29497
|
return dictApplicative.pure($DocCommentElem("Token", m._1));
|
29477
29498
|
}
|
29478
29499
|
if (m.tag === "Unquote") {
|
29479
|
-
return dictApplicative.Apply0().Functor0().map((v1) => $DocCommentElem("Unquote", v1))(
|
29500
|
+
return dictApplicative.Apply0().Functor0().map((v1) => $DocCommentElem("Unquote", v1))(traverse22(f)(m._1));
|
29480
29501
|
}
|
29481
29502
|
fail();
|
29482
29503
|
};
|
29483
29504
|
},
|
29484
|
-
sequence: (dictApplicative) => (v) => traversableDocCommentElem(dictTraversable).traverse(dictApplicative)(
|
29505
|
+
sequence: (dictApplicative) => (v) => traversableDocCommentElem(dictTraversable).traverse(dictApplicative)(identity26)(v),
|
29485
29506
|
Functor0: () => functorDocCommentElem1,
|
29486
29507
|
Foldable1: () => foldableDocCommentElem1
|
29487
29508
|
};
|
@@ -29491,19 +29512,19 @@ var traversableDocOpt = (dictTraversable) => {
|
|
29491
29512
|
const foldableDocOpt1 = foldableDocOpt(dictTraversable.Foldable1());
|
29492
29513
|
return {
|
29493
29514
|
traverse: (dictApplicative) => {
|
29494
|
-
const
|
29515
|
+
const traverse22 = traversableList.traverse(dictApplicative);
|
29495
29516
|
const traverse3 = traversableDocCommentElem(dictTraversable).traverse(dictApplicative);
|
29496
29517
|
return (f) => (m) => {
|
29497
29518
|
if (m.tag === "None") {
|
29498
29519
|
return dictApplicative.pure(None);
|
29499
29520
|
}
|
29500
29521
|
if (m.tag === "Doc") {
|
29501
|
-
return dictApplicative.Apply0().Functor0().map((v1) => $DocOpt("Doc", v1))(
|
29522
|
+
return dictApplicative.Apply0().Functor0().map((v1) => $DocOpt("Doc", v1))(traverse22(traverse3(f))(m._1));
|
29502
29523
|
}
|
29503
29524
|
fail();
|
29504
29525
|
};
|
29505
29526
|
},
|
29506
|
-
sequence: (dictApplicative) => (v) => traversableDocOpt(dictTraversable).traverse(dictApplicative)(
|
29527
|
+
sequence: (dictApplicative) => (v) => traversableDocOpt(dictTraversable).traverse(dictApplicative)(identity26)(v),
|
29507
29528
|
Functor0: () => functorDocOpt1,
|
29508
29529
|
Foldable1: () => foldableDocOpt1
|
29509
29530
|
};
|
@@ -29656,7 +29677,7 @@ var unions12 = /* @__PURE__ */ (() => {
|
|
29656
29677
|
};
|
29657
29678
|
return go(Leaf2);
|
29658
29679
|
})();
|
29659
|
-
var
|
29680
|
+
var identity27 = (x2) => x2;
|
29660
29681
|
var compare3 = /* @__PURE__ */ (() => ordTuple(ordString)(ordString).compare)();
|
29661
29682
|
var compare4 = /* @__PURE__ */ (() => ordSet(ordString).compare)();
|
29662
29683
|
var setSet2 = /* @__PURE__ */ setSet(ordString);
|
@@ -30169,7 +30190,7 @@ var traversableVarDef = {
|
|
30169
30190
|
const Apply0 = dictApplicative.Apply0();
|
30170
30191
|
return (f) => (m) => Apply0.apply(Apply0.Functor0().map((v2) => (v3) => $VarDef(v2, v3))(traversableElim.traverse(dictApplicative)(f)(m._1)))(traversableExpr.traverse(dictApplicative)(f)(m._2));
|
30171
30192
|
},
|
30172
|
-
sequence: (dictApplicative) => (v) => traversableVarDef.traverse(dictApplicative)(
|
30193
|
+
sequence: (dictApplicative) => (v) => traversableVarDef.traverse(dictApplicative)(identity27)(v),
|
30173
30194
|
Functor0: () => functorVarDef,
|
30174
30195
|
Foldable1: () => foldableVarDef
|
30175
30196
|
};
|
@@ -30179,7 +30200,7 @@ var traversableRecDefs = {
|
|
30179
30200
|
const traverse5 = traversableDict.traverse(dictApplicative);
|
30180
30201
|
return (f) => (m) => Apply0.apply(Apply0.Functor0().map((v2) => (v3) => $RecDefs(v2, v3))(f(m._1)))(traverse5(traversableElim.traverse(dictApplicative)(f))(m._2));
|
30181
30202
|
},
|
30182
|
-
sequence: (dictApplicative) => (v) => traversableRecDefs.traverse(dictApplicative)(
|
30203
|
+
sequence: (dictApplicative) => (v) => traversableRecDefs.traverse(dictApplicative)(identity27)(v),
|
30183
30204
|
Functor0: () => functorRecDefs,
|
30184
30205
|
Foldable1: () => foldableRecDefs
|
30185
30206
|
};
|
@@ -30241,7 +30262,7 @@ var traversableExpr = {
|
|
30241
30262
|
fail();
|
30242
30263
|
};
|
30243
30264
|
},
|
30244
|
-
sequence: (dictApplicative) => (v) => traversableExpr.traverse(dictApplicative)(
|
30265
|
+
sequence: (dictApplicative) => (v) => traversableExpr.traverse(dictApplicative)(identity27)(v),
|
30245
30266
|
Functor0: () => functorExpr,
|
30246
30267
|
Foldable1: () => foldableExpr
|
30247
30268
|
};
|
@@ -30264,7 +30285,7 @@ var traversableElim = {
|
|
30264
30285
|
fail();
|
30265
30286
|
};
|
30266
30287
|
},
|
30267
|
-
sequence: (dictApplicative) => (v) => traversableElim.traverse(dictApplicative)(
|
30288
|
+
sequence: (dictApplicative) => (v) => traversableElim.traverse(dictApplicative)(identity27)(v),
|
30268
30289
|
Functor0: () => functorElim,
|
30269
30290
|
Foldable1: () => foldableElim
|
30270
30291
|
};
|
@@ -30281,7 +30302,7 @@ var traversableCont = {
|
|
30281
30302
|
fail();
|
30282
30303
|
};
|
30283
30304
|
},
|
30284
|
-
sequence: (dictApplicative) => (v) => traversableCont.traverse(dictApplicative)(
|
30305
|
+
sequence: (dictApplicative) => (v) => traversableCont.traverse(dictApplicative)(identity27)(v),
|
30285
30306
|
Functor0: () => functorCont,
|
30286
30307
|
Foldable1: () => foldableCont
|
30287
30308
|
};
|
@@ -33644,13 +33665,13 @@ var varDefFwd = (dictMonadError) => {
|
|
33644
33665
|
};
|
33645
33666
|
var recDefsFwd = (dictMonadError) => {
|
33646
33667
|
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
33647
|
-
const
|
33668
|
+
const traverse22 = traversableNonEmptyList.traverse(Monad0.Applicative0());
|
33648
33669
|
return (dictBoundedLattice) => {
|
33649
33670
|
const top3 = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
33650
33671
|
return (xcs) => Monad0.Bind1().Apply0().Functor0().map((() => {
|
33651
33672
|
const $0 = RecDefs(top3);
|
33652
33673
|
return (x2) => $0(fromFoldable16(x2));
|
33653
|
-
})())(
|
33674
|
+
})())(traverse22(recDefFwd(dictMonadError)(dictBoundedLattice))((() => {
|
33654
33675
|
const $0 = wrappedOperation("groupBy")(groupBy((x2) => (y2) => x2._1 === y2._1))(xcs);
|
33655
33676
|
return $NonEmpty($0._1, listMap(RecDef)($0._2));
|
33656
33677
|
})()));
|
@@ -33852,7 +33873,7 @@ var exprFwd = (dictBoundedLattice) => {
|
|
33852
33873
|
const Bind1 = Monad0.Bind1();
|
33853
33874
|
const Apply0 = Bind1.Apply0();
|
33854
33875
|
const Functor0 = Apply0.Functor0();
|
33855
|
-
const
|
33876
|
+
const traverse22 = traversableList.traverse(Applicative0);
|
33856
33877
|
return (dictJoinSemilattice) => (v) => {
|
33857
33878
|
if (v.tag === "Var") {
|
33858
33879
|
return Applicative0.pure($Expr("Var", v._1));
|
@@ -33879,14 +33900,14 @@ var exprFwd = (dictBoundedLattice) => {
|
|
33879
33900
|
const $0 = v._3;
|
33880
33901
|
const $1 = v._4;
|
33881
33902
|
const $2 = v._1;
|
33882
|
-
return Bind1.bind(desugComment(dictBoundedLattice)(dictMonadError)(v._2))((edoc) => Functor0.map(Constr($2)(edoc)($0))(
|
33903
|
+
return Bind1.bind(desugComment(dictBoundedLattice)(dictMonadError)(v._2))((edoc) => Functor0.map(Constr($2)(edoc)($0))(traverse22(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0()))($1)));
|
33883
33904
|
}
|
33884
33905
|
if (v.tag === "Dictionary") {
|
33885
33906
|
const $0 = v._2;
|
33886
33907
|
const $1 = v._1;
|
33887
33908
|
const v1 = unzip(v._3);
|
33888
33909
|
const $2 = v1._2;
|
33889
|
-
return Bind1.bind(
|
33910
|
+
return Bind1.bind(traverse22(desugarableDictEntryExpr.desug(dictMonadError)(dictBoundedLattice))(v1._1))((ks$p) => Bind1.bind(traverse22(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0()))($2))((es) => Bind1.bind(desugComment(dictBoundedLattice)(dictMonadError)($0))((edoc) => Functor0.map(Dictionary($1)(edoc))(Applicative0.pure(zipWith2((k) => (v2) => $Pair(
|
33890
33911
|
k,
|
33891
33912
|
v2
|
33892
33913
|
))(ks$p)(es))))));
|
@@ -34421,11 +34442,11 @@ var moduleFwd = (dictMonadError) => {
|
|
34421
34442
|
const $0 = Monad0.Bind1().Apply0().Functor0();
|
34422
34443
|
const varDefFwd1 = varDefFwd(dictMonadError);
|
34423
34444
|
const recDefsFwd1 = recDefsFwd(dictMonadError);
|
34424
|
-
const
|
34445
|
+
const traverse22 = traversableList.traverse(Monad0.Applicative0());
|
34425
34446
|
return (dictBoundedLattice) => {
|
34426
34447
|
const varDefFwd2 = varDefFwd1(dictBoundedLattice);
|
34427
34448
|
const recDefsFwd2 = recDefsFwd1(dictBoundedLattice);
|
34428
|
-
return (v) => $0.map(Module)(
|
34449
|
+
return (v) => $0.map(Module)(traverse22((v1) => {
|
34429
34450
|
if (v1.tag === "Left") {
|
34430
34451
|
return $0.map(Left)(varDefFwd2(v1._1));
|
34431
34452
|
}
|
@@ -34514,13 +34535,67 @@ var semigroupColumns = { append: (v) => (v1) => beside(v)(v1) };
|
|
34514
34535
|
var monoidColumns = { mempty: empty3, Semigroup0: () => semigroupColumns };
|
34515
34536
|
|
34516
34537
|
// output-es/Pretty/index.js
|
34517
|
-
var $ExprType = (tag) => tag;
|
34518
34538
|
var hcat = /* @__PURE__ */ (() => foldableList.foldMap(monoidColumns)(unsafeCoerce))();
|
34519
34539
|
var hcat1 = /* @__PURE__ */ (() => foldableArray.foldMap(monoidColumns)(unsafeCoerce))();
|
34520
34540
|
var toUnfoldable8 = /* @__PURE__ */ toUnfoldable4(unfoldableList);
|
34521
34541
|
var toUnfoldable13 = /* @__PURE__ */ toAscUnfoldable(unfoldableList);
|
34522
|
-
var
|
34523
|
-
|
34542
|
+
var isSimpleVal = {
|
34543
|
+
isSimple: (v) => {
|
34544
|
+
if (v._3.tag === "Constr") {
|
34545
|
+
return v._3._2.tag !== "Cons";
|
34546
|
+
}
|
34547
|
+
if (v._3.tag === "Fun" && v._3._1.tag === "PartialConstr") {
|
34548
|
+
return v._3._1._2.tag !== "Cons";
|
34549
|
+
}
|
34550
|
+
return true;
|
34551
|
+
}
|
34552
|
+
};
|
34553
|
+
var isSimpleExpr = {
|
34554
|
+
isSimple: (v) => {
|
34555
|
+
if (v.tag === "Var") {
|
34556
|
+
return true;
|
34557
|
+
}
|
34558
|
+
if (v.tag === "Op") {
|
34559
|
+
return true;
|
34560
|
+
}
|
34561
|
+
if (v.tag === "Int") {
|
34562
|
+
return true;
|
34563
|
+
}
|
34564
|
+
if (v.tag === "Float") {
|
34565
|
+
return true;
|
34566
|
+
}
|
34567
|
+
if (v.tag === "Str") {
|
34568
|
+
return true;
|
34569
|
+
}
|
34570
|
+
if (v.tag === "Constr") {
|
34571
|
+
return v._4.tag === "Nil";
|
34572
|
+
}
|
34573
|
+
return v.tag === "Dictionary" || v.tag === "Matrix" || v.tag === "Project" || v.tag === "DProject";
|
34574
|
+
}
|
34575
|
+
};
|
34576
|
+
var isSimpleExpr1 = {
|
34577
|
+
isSimple: (v) => {
|
34578
|
+
if (v.tag === "Var") {
|
34579
|
+
return true;
|
34580
|
+
}
|
34581
|
+
if (v.tag === "Op") {
|
34582
|
+
return true;
|
34583
|
+
}
|
34584
|
+
if (v.tag === "Int") {
|
34585
|
+
return true;
|
34586
|
+
}
|
34587
|
+
if (v.tag === "Float") {
|
34588
|
+
return true;
|
34589
|
+
}
|
34590
|
+
if (v.tag === "Str") {
|
34591
|
+
return true;
|
34592
|
+
}
|
34593
|
+
if (v.tag === "Constr") {
|
34594
|
+
return v._4.tag === "Nil";
|
34595
|
+
}
|
34596
|
+
return v.tag === "Dictionary" || v.tag === "Matrix" || v.tag === "Project" || v.tag === "DProject" || v.tag === "ListEmpty" || v.tag === "ListNonEmpty" || v.tag === "ListEnum" || v.tag === "ListComp";
|
34597
|
+
}
|
34598
|
+
};
|
34524
34599
|
var vert = (dictFoldable) => {
|
34525
34600
|
const fromFoldable27 = dictFoldable.foldr(Cons)(Nil);
|
34526
34601
|
return (delim) => {
|
@@ -34633,75 +34708,6 @@ var getPrec = (x2) => {
|
|
34633
34708
|
}
|
34634
34709
|
fail();
|
34635
34710
|
};
|
34636
|
-
var exprType = (v) => {
|
34637
|
-
if (v.tag === "Var") {
|
34638
|
-
return Simple;
|
34639
|
-
}
|
34640
|
-
if (v.tag === "Op") {
|
34641
|
-
return Simple;
|
34642
|
-
}
|
34643
|
-
if (v.tag === "Int") {
|
34644
|
-
return Simple;
|
34645
|
-
}
|
34646
|
-
if (v.tag === "Float") {
|
34647
|
-
return Simple;
|
34648
|
-
}
|
34649
|
-
if (v.tag === "Str") {
|
34650
|
-
return Simple;
|
34651
|
-
}
|
34652
|
-
if (v.tag === "Constr") {
|
34653
|
-
if (v._4.tag === "Nil") {
|
34654
|
-
return Simple;
|
34655
|
-
}
|
34656
|
-
return Expression;
|
34657
|
-
}
|
34658
|
-
if (v.tag === "Dictionary") {
|
34659
|
-
return Simple;
|
34660
|
-
}
|
34661
|
-
if (v.tag === "Matrix") {
|
34662
|
-
return Simple;
|
34663
|
-
}
|
34664
|
-
if (v.tag === "Lambda") {
|
34665
|
-
return Simple;
|
34666
|
-
}
|
34667
|
-
if (v.tag === "Project") {
|
34668
|
-
return Simple;
|
34669
|
-
}
|
34670
|
-
if (v.tag === "DProject") {
|
34671
|
-
return Simple;
|
34672
|
-
}
|
34673
|
-
if (v.tag === "App") {
|
34674
|
-
return Expression;
|
34675
|
-
}
|
34676
|
-
if (v.tag === "BinaryApp") {
|
34677
|
-
return Expression;
|
34678
|
-
}
|
34679
|
-
if (v.tag === "MatchAs") {
|
34680
|
-
return Simple;
|
34681
|
-
}
|
34682
|
-
if (v.tag === "IfElse") {
|
34683
|
-
return Simple;
|
34684
|
-
}
|
34685
|
-
if (v.tag === "ListEmpty") {
|
34686
|
-
return Simple;
|
34687
|
-
}
|
34688
|
-
if (v.tag === "ListNonEmpty") {
|
34689
|
-
return Simple;
|
34690
|
-
}
|
34691
|
-
if (v.tag === "ListEnum") {
|
34692
|
-
return Simple;
|
34693
|
-
}
|
34694
|
-
if (v.tag === "ListComp") {
|
34695
|
-
return Simple;
|
34696
|
-
}
|
34697
|
-
if (v.tag === "Let") {
|
34698
|
-
return Expression;
|
34699
|
-
}
|
34700
|
-
if (v.tag === "LetRec") {
|
34701
|
-
return Expression;
|
34702
|
-
}
|
34703
|
-
fail();
|
34704
|
-
};
|
34705
34711
|
var comma = /* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" ,"));
|
34706
34712
|
var hcomma = (dictFoldable) => {
|
34707
34713
|
const $0 = dictFoldable.foldr(Cons)(Nil);
|
@@ -34718,30 +34724,29 @@ var between2 = (l) => (r) => (doc2) => beside(beside(l)(doc2))(r);
|
|
34718
34724
|
var brackets = /* @__PURE__ */ between2(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" [")))(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" ]")));
|
34719
34725
|
var curlyBraces = /* @__PURE__ */ between2(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" {")))(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" }")));
|
34720
34726
|
var keyBracks = /* @__PURE__ */ between2(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" [")))(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" ]")));
|
34721
|
-
var
|
34722
|
-
var
|
34723
|
-
|
34724
|
-
|
34725
|
-
return parens(doc2);
|
34727
|
+
var parentheses = /* @__PURE__ */ between2(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" (")))(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" )")));
|
34728
|
+
var prettySimple = (dictIsSimple) => (dictPretty) => (s) => {
|
34729
|
+
if (dictIsSimple.isSimple(s)) {
|
34730
|
+
return dictPretty.pretty(s);
|
34726
34731
|
}
|
34727
|
-
return
|
34732
|
+
return parentheses(dictPretty.pretty(s));
|
34728
34733
|
};
|
34729
|
-
var prettyConstr = (dictPretty) => (v) => (v1) => {
|
34734
|
+
var prettyConstr = (dictIsSimple) => (dictPretty) => (v) => (v1) => {
|
34730
34735
|
const $0 = (c, xs) => hcat($List(
|
34731
34736
|
"Cons",
|
34732
34737
|
checkOneLine(split("\n")(" " + showCtr(c))),
|
34733
|
-
listMap(
|
34738
|
+
listMap(prettySimple(dictIsSimple)(dictPretty))(xs)
|
34734
34739
|
));
|
34735
34740
|
if (v1.tag === "Cons") {
|
34736
34741
|
if (v1._2.tag === "Cons") {
|
34737
34742
|
if (v === "Pair") {
|
34738
|
-
return assertWith("")(v1._2._2.tag === "Nil")(
|
34743
|
+
return assertWith("")(v1._2._2.tag === "Nil")(parentheses(hcomma2([dictPretty.pretty(v1._1), dictPretty.pretty(v1._2._1)])));
|
34739
34744
|
}
|
34740
34745
|
if (v === "Nil") {
|
34741
34746
|
return assertWith("")(v1.tag === "Nil")(nil2);
|
34742
34747
|
}
|
34743
34748
|
if (v === ":") {
|
34744
|
-
return assertWith("")(v1._2._2.tag === "Nil")(
|
34749
|
+
return assertWith("")(v1._2._2.tag === "Nil")(parentheses(hcat1([
|
34745
34750
|
dictPretty.pretty(v1._1),
|
34746
34751
|
checkOneLine(split("\n")(" :")),
|
34747
34752
|
dictPretty.pretty(v1._2._1)
|
@@ -34753,7 +34758,7 @@ var prettyConstr = (dictPretty) => (v) => (v1) => {
|
|
34753
34758
|
return assertWith("")(v1.tag === "Nil")(nil2);
|
34754
34759
|
}
|
34755
34760
|
if (v1._2.tag === "Nil") {
|
34756
|
-
return beside(checkOneLine(split("\n")(" " + showCtr(v))))(dictPretty
|
34761
|
+
return beside(checkOneLine(split("\n")(" " + showCtr(v))))(prettySimple(dictIsSimple)(dictPretty)(v1._1));
|
34757
34762
|
}
|
34758
34763
|
return $0(v, v1);
|
34759
34764
|
}
|
@@ -34762,7 +34767,6 @@ var prettyConstr = (dictPretty) => (v) => (v1) => {
|
|
34762
34767
|
}
|
34763
34768
|
return $0(v, v1);
|
34764
34769
|
};
|
34765
|
-
var parentheses = /* @__PURE__ */ between2(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" (")))(/* @__PURE__ */ checkOneLine(/* @__PURE__ */ split("\n")(" )")));
|
34766
34770
|
var prettyPattern = {
|
34767
34771
|
pretty: (v) => {
|
34768
34772
|
if (v.tag === "PVar") {
|
@@ -34867,7 +34871,7 @@ var prettyExpr = (dictHighlightable) => ({
|
|
34867
34871
|
return beside(prettyDocOpt(prettyExpr(dictHighlightable)).pretty(v._2))(dictHighlightable.highlightIf(v._1)(prettyRecordOrDict(prettyExpr(dictHighlightable))(checkOneLine(split("\n")(" :")))(keyBracks)(curlyBraces)(prettyExpr(dictHighlightable).pretty)(listMap(toTuple)(v._3))));
|
34868
34872
|
}
|
34869
34873
|
if (v.tag === "Constr") {
|
34870
|
-
return beside(prettyDocOpt(prettyExpr(dictHighlightable)).pretty(v._2))(dictHighlightable.highlightIf(v._1)(prettyConstr(prettyExpr(dictHighlightable))(v._3)(v._4)));
|
34874
|
+
return beside(prettyDocOpt(prettyExpr(dictHighlightable)).pretty(v._2))(dictHighlightable.highlightIf(v._1)(prettyConstr(isSimpleExpr)(prettyExpr(dictHighlightable))(v._3)(v._4)));
|
34871
34875
|
}
|
34872
34876
|
if (v.tag === "Matrix") {
|
34873
34877
|
return beside(prettyDocOpt(prettyExpr(dictHighlightable)).pretty(v._2))(dictHighlightable.highlightIf(v._1)(prettyMatrix(dictHighlightable)(v._3)(v._4._1)(v._4._2)(v._5)));
|
@@ -34876,7 +34880,7 @@ var prettyExpr = (dictHighlightable) => ({
|
|
34876
34880
|
return hcat1([dictHighlightable.highlightIf(v._1)(checkOneLine(split("\n")(" fun"))), prettyElim(dictHighlightable).pretty(v._2)]);
|
34877
34881
|
}
|
34878
34882
|
if (v.tag === "Op") {
|
34879
|
-
return
|
34883
|
+
return parentheses(checkOneLine(split("\n")(" " + v._1)));
|
34880
34884
|
}
|
34881
34885
|
if (v.tag === "Let") {
|
34882
34886
|
return atop(hcat1([
|
@@ -34977,7 +34981,7 @@ var prettyFun = (dictHighlightable) => ({
|
|
34977
34981
|
return checkOneLine(split("\n")(" " + v._1._1));
|
34978
34982
|
}
|
34979
34983
|
if (v.tag === "PartialConstr") {
|
34980
|
-
return prettyConstr(prettyVal(dictHighlightable))(v._1)(v._2);
|
34984
|
+
return prettyConstr(isSimpleVal)(prettyVal(dictHighlightable))(v._1)(v._2);
|
34981
34985
|
}
|
34982
34986
|
fail();
|
34983
34987
|
}
|
@@ -35014,7 +35018,7 @@ var prettyBaseVal = (dictHighlightable) => ({
|
|
35014
35018
|
))(toUnfoldable13(v._1)));
|
35015
35019
|
}
|
35016
35020
|
if (v.tag === "Constr") {
|
35017
|
-
return prettyConstr(prettyVal(dictHighlightable))(v._1)(v._2);
|
35021
|
+
return prettyConstr(isSimpleVal)(prettyVal(dictHighlightable))(v._1)(v._2);
|
35018
35022
|
}
|
35019
35023
|
if (v.tag === "Matrix") {
|
35020
35024
|
return vert1(comma)(arrayMap((() => {
|
@@ -35116,7 +35120,7 @@ var prettyExpr1 = (dictAnn) => {
|
|
35116
35120
|
return beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._2))($0.highlightIf(v._1)(checkOneLine(split("\n")(' "' + v._3 + '"'))));
|
35117
35121
|
}
|
35118
35122
|
if (v.tag === "Constr") {
|
35119
|
-
return beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._2))($0.highlightIf(v._1)(prettyConstr(prettyExpr1(dictAnn))(v._3)(v._4)));
|
35123
|
+
return beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._2))($0.highlightIf(v._1)(prettyConstr(isSimpleExpr1)(prettyExpr1(dictAnn))(v._3)(v._4)));
|
35120
35124
|
}
|
35121
35125
|
if (v.tag === "Dictionary") {
|
35122
35126
|
return beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._2))($0.highlightIf(v._1)(curlyBraces(prettyDictEntries(dictAnn)(atop)(v._3))));
|
@@ -35125,13 +35129,13 @@ var prettyExpr1 = (dictAnn) => {
|
|
35125
35129
|
return beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._2))($0.highlightIf(v._1)(arrayBrackets(beside(beside(beside(beside(prettyExpr1(dictAnn).pretty(v._3))(checkOneLine(split("\n")(" |"))))(parentheses(beside(beside(checkOneLine(split("\n")(" " + v._4._1)))(checkOneLine(split("\n")(" ,"))))(checkOneLine(split("\n")(" " + v._4._2))))))(checkOneLine(split("\n")(" in"))))(prettyExpr1(dictAnn).pretty(v._5)))));
|
35126
35130
|
}
|
35127
35131
|
if (v.tag === "Lambda") {
|
35128
|
-
return
|
35132
|
+
return beside(checkOneLine(split("\n")(" fun")))(prettyClauses(dictAnn).pretty(v._1));
|
35129
35133
|
}
|
35130
35134
|
if (v.tag === "Project") {
|
35131
|
-
return beside(beside(beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._1))(prettySimple(dictAnn)(v._2)))(checkOneLine(split("\n")(" ."))))(checkOneLine(split("\n")(" " + v._3)));
|
35135
|
+
return beside(beside(beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._1))(prettySimple(isSimpleExpr1)(prettyExpr1(dictAnn))(v._2)))(checkOneLine(split("\n")(" ."))))(checkOneLine(split("\n")(" " + v._3)));
|
35132
35136
|
}
|
35133
35137
|
if (v.tag === "DProject") {
|
35134
|
-
return beside(beside(beside(beside(beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._1))(prettySimple(dictAnn)(v._2)))(checkOneLine(split("\n")(" ."))))(checkOneLine(split("\n")(" ["))))(prettySimple(dictAnn)(v._3)))(checkOneLine(split("\n")(" ]")));
|
35138
|
+
return beside(beside(beside(beside(beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._1))(prettySimple(isSimpleExpr1)(prettyExpr1(dictAnn))(v._2)))(checkOneLine(split("\n")(" ."))))(checkOneLine(split("\n")(" ["))))(prettySimple(isSimpleExpr1)(prettyExpr1(dictAnn))(v._3)))(checkOneLine(split("\n")(" ]")));
|
35135
35139
|
}
|
35136
35140
|
if (v.tag === "App") {
|
35137
35141
|
return beside(prettyDocOpt(prettyExpr1(dictAnn)).pretty(v._1))(prettyAppChain(dictAnn)($Expr2("App", v._1, v._2, v._3)));
|
@@ -35193,16 +35197,6 @@ var prettyBranch = (dictAnn) => ({
|
|
35193
35197
|
v._2._2
|
35194
35198
|
)))
|
35195
35199
|
});
|
35196
|
-
var prettySimple = (dictAnn) => (s) => {
|
35197
|
-
const v = exprType(s);
|
35198
|
-
if (v === "Simple") {
|
35199
|
-
return prettyExpr1(dictAnn).pretty(s);
|
35200
|
-
}
|
35201
|
-
if (v === "Expression") {
|
35202
|
-
return parentheses(prettyExpr1(dictAnn).pretty(s));
|
35203
|
-
}
|
35204
|
-
fail();
|
35205
|
-
};
|
35206
35200
|
var prettyDictEntries = (dictAnn) => (v) => (v1) => {
|
35207
35201
|
if (v1.tag === "Nil") {
|
35208
35202
|
return empty3;
|
@@ -35231,9 +35225,9 @@ var prettyBinApp = (dictAnn) => (v) => (v1) => {
|
|
35231
35225
|
};
|
35232
35226
|
var prettyAppChain = (dictAnn) => (v) => {
|
35233
35227
|
if (v.tag === "App") {
|
35234
|
-
return beside(prettyAppChain(dictAnn)(v._2))(prettySimple(dictAnn)(v._3));
|
35228
|
+
return beside(prettyAppChain(dictAnn)(v._2))(prettySimple(isSimpleExpr1)(prettyExpr1(dictAnn))(v._3));
|
35235
35229
|
}
|
35236
|
-
return prettySimple(dictAnn)(v);
|
35230
|
+
return prettySimple(isSimpleExpr1)(prettyExpr1(dictAnn))(v);
|
35237
35231
|
};
|
35238
35232
|
|
35239
35233
|
// output-es/Val/index.js
|
@@ -35267,7 +35261,7 @@ var unions13 = /* @__PURE__ */ (() => {
|
|
35267
35261
|
return go(Leaf2);
|
35268
35262
|
})();
|
35269
35263
|
var foldMap2 = /* @__PURE__ */ foldMap({ mempty: Leaf2, Semigroup0: () => ({ append: union3(ordDVertex$p) }) });
|
35270
|
-
var
|
35264
|
+
var identity28 = (x2) => x2;
|
35271
35265
|
var ordTuple3 = /* @__PURE__ */ ordTuple(ordInt);
|
35272
35266
|
var boundedLattice = { BoundedJoinSemilattice0: () => boundedJoinSemilatticeUni, BoundedMeetSemilattice1: () => boundedMeetSemilatticeUni };
|
35273
35267
|
var show3 = /* @__PURE__ */ (() => showSet(showString).show)();
|
@@ -35395,7 +35389,7 @@ var mapEnvStringVal = {
|
|
35395
35389
|
var highlightableVertex = {
|
35396
35390
|
highlightIf: (v) => (doc2) => beside(beside(doc2)(checkOneLine(split("\n")(" _"))))(checkOneLine(split("\n")(" \u27E8" + v + "\u27E9")))
|
35397
35391
|
};
|
35398
|
-
var highlightableUnit = { highlightIf: (v) =>
|
35392
|
+
var highlightableUnit = { highlightIf: (v) => identity28 };
|
35399
35393
|
var functorMatrixDim = { map: (f) => (m) => $Tuple(m._1, f(m._2)) };
|
35400
35394
|
var functorVal = { map: (f) => (m) => $Val(f(m._1), functorDocOpt(functorVal).map(f)(m._2), functorBaseVal.map(f)(m._3)) };
|
35401
35395
|
var functorMatrixRep = {
|
@@ -35450,7 +35444,7 @@ var functorEnvExpr = { map: (f) => (m) => $EnvExpr(_fmapObject(m._1, functorVal.
|
|
35450
35444
|
var foldableMatrixDim = { foldl: (f) => (z) => (m) => f(z)(m._2), foldr: (f) => (z) => (m) => f(m._2)(z), foldMap: (dictMonoid) => (f) => (m) => f(m._2) };
|
35451
35445
|
var traversableMatrixDim = {
|
35452
35446
|
traverse: (dictApplicative) => (f) => (m) => dictApplicative.Apply0().Functor0().map((v1) => v1)(traversableTuple.traverse(dictApplicative)(f)(m)),
|
35453
|
-
sequence: (dictApplicative) => (v) => traversableMatrixDim.traverse(dictApplicative)(
|
35447
|
+
sequence: (dictApplicative) => (v) => traversableMatrixDim.traverse(dictApplicative)(identity28)(v),
|
35454
35448
|
Functor0: () => functorMatrixDim,
|
35455
35449
|
Foldable1: () => foldableMatrixDim
|
35456
35450
|
};
|
@@ -35676,7 +35670,7 @@ var traversableVal = {
|
|
35676
35670
|
const Apply0 = dictApplicative.Apply0();
|
35677
35671
|
return (f) => (m) => Apply0.apply(Apply0.apply(Apply0.Functor0().map((v3) => (v4) => (v5) => $Val(v3, v4, v5))(f(m._1)))(traversableDocOpt(traversableVal).traverse(dictApplicative)(f)(m._2)))(traversableBaseVal.traverse(dictApplicative)(f)(m._3));
|
35678
35672
|
},
|
35679
|
-
sequence: (dictApplicative) => (v) => traversableVal.traverse(dictApplicative)(
|
35673
|
+
sequence: (dictApplicative) => (v) => traversableVal.traverse(dictApplicative)(identity28)(v),
|
35680
35674
|
Functor0: () => functorVal,
|
35681
35675
|
Foldable1: () => foldableVal
|
35682
35676
|
};
|
@@ -35712,7 +35706,7 @@ var traversableFun = {
|
|
35712
35706
|
fail();
|
35713
35707
|
};
|
35714
35708
|
},
|
35715
|
-
sequence: (dictApplicative) => (v) => traversableFun.traverse(dictApplicative)(
|
35709
|
+
sequence: (dictApplicative) => (v) => traversableFun.traverse(dictApplicative)(identity28)(v),
|
35716
35710
|
Functor0: () => functorFun,
|
35717
35711
|
Foldable1: () => foldableFun
|
35718
35712
|
};
|
@@ -35721,7 +35715,7 @@ var traversableEnv = {
|
|
35721
35715
|
const traverse8 = traversableDict.traverse(dictApplicative);
|
35722
35716
|
return (f) => (m) => dictApplicative.Apply0().Functor0().map((v1) => v1)(traverse8(traversableVal.traverse(dictApplicative)(f))(m));
|
35723
35717
|
},
|
35724
|
-
sequence: (dictApplicative) => (v) => traversableEnv.traverse(dictApplicative)(
|
35718
|
+
sequence: (dictApplicative) => (v) => traversableEnv.traverse(dictApplicative)(identity28)(v),
|
35725
35719
|
Functor0: () => functorEnv,
|
35726
35720
|
Foldable1: () => foldableEnv
|
35727
35721
|
};
|
@@ -35765,7 +35759,7 @@ var traversableBaseVal = {
|
|
35765
35759
|
fail();
|
35766
35760
|
};
|
35767
35761
|
},
|
35768
|
-
sequence: (dictApplicative) => (v) => traversableBaseVal.traverse(dictApplicative)(
|
35762
|
+
sequence: (dictApplicative) => (v) => traversableBaseVal.traverse(dictApplicative)(identity28)(v),
|
35769
35763
|
Functor0: () => functorBaseVal,
|
35770
35764
|
Foldable1: () => foldableBaseVal
|
35771
35765
|
};
|
@@ -36217,7 +36211,7 @@ var unary = (dictBoundedJoinSemilattice) => {
|
|
36217
36211
|
arity: 1,
|
36218
36212
|
op: (dictMonadWithGraphAlloc) => {
|
36219
36213
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
36220
|
-
return (dictMonadError) => (
|
36214
|
+
return (dictMonadError) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
36221
36215
|
if (v.tag === "Cons" && v._2.tag === "Nil") {
|
36222
36216
|
const $0 = v._1._2;
|
36223
36217
|
return $$new((a) => Val(a)($0))($$$Map("Two", Leaf2, v._1._1, void 0, Leaf2))(f.o.pack(f.fwd(f.i.unpack(v._1._3))));
|
@@ -36366,7 +36360,7 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
|
|
36366
36360
|
arity: 2,
|
36367
36361
|
op: (dictMonadWithGraphAlloc) => {
|
36368
36362
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
36369
|
-
return (dictMonadError) => (
|
36363
|
+
return (dictMonadError) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
36370
36364
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
36371
36365
|
const $0 = f.i.unpack(v._1._3);
|
36372
36366
|
const $1 = f.i.unpack(v._2._1._3);
|
@@ -36414,7 +36408,7 @@ var binary = (dictBoundedJoinSemilattice) => {
|
|
36414
36408
|
arity: 2,
|
36415
36409
|
op: (dictMonadWithGraphAlloc) => {
|
36416
36410
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
36417
|
-
return (dictMonadError) => (
|
36411
|
+
return (dictMonadError) => (dictMonadReader) => (dictLoadFile) => (v) => {
|
36418
36412
|
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
|
36419
36413
|
return $$new((a) => Val(a)(None))(insert3(ordVertex)(v._2._1._1)()($$$Map(
|
36420
36414
|
"Two",
|
@@ -38295,7 +38289,7 @@ var viewDocViewUnit = {
|
|
38295
38289
|
};
|
38296
38290
|
|
38297
38291
|
// output-es/App.View.LineChart/index.js
|
38298
|
-
var
|
38292
|
+
var identity29 = (x2) => x2;
|
38299
38293
|
var join = (v) => (v1) => {
|
38300
38294
|
if (v1.tag === "Inert") {
|
38301
38295
|
return v;
|
@@ -38349,7 +38343,7 @@ var viewLineChartUnit = {
|
|
38349
38343
|
const $3 = attrs(point2)(fromFoldable9((() => {
|
38350
38344
|
const $32 = definitely("index within bounds")(index(v3.points)(point$p.j));
|
38351
38345
|
const sel = join($32.x._2)($32.y._2);
|
38352
|
-
const fill$p = (isPersistent(sel) ? (a) => colorShade(a)(-30) :
|
38346
|
+
const fill$p = (isPersistent(sel) ? (a) => colorShade(a)(-30) : identity29)(nameCol(definitely("absurd")((() => {
|
38353
38347
|
const $4 = v3.name._1;
|
38354
38348
|
return findIndex((v$1) => v$1 === $4)(arrayMap((x2) => x2.name._1)($0));
|
38355
38349
|
})())));
|
@@ -38390,7 +38384,7 @@ var viewLineChartUnit = {
|
|
38390
38384
|
return [
|
38391
38385
|
$Tuple(
|
38392
38386
|
"stroke",
|
38393
|
-
(isTransient(sel) ? (a) => colorShade(a)(-30) :
|
38387
|
+
(isTransient(sel) ? (a) => colorShade(a)(-30) : identity29)((isPersistent(sel) ? (a) => colorShade(a)(-30) : identity29)(nameCol(definitely("absurd")((() => {
|
38394
38388
|
const $3 = v3.name._1;
|
38395
38389
|
return findIndex((v$1) => v$1 === $3)(arrayMap((x2) => x2.name._1)($0));
|
38396
38390
|
})()))))
|
@@ -38894,8 +38888,8 @@ var toStringWith = (v) => {
|
|
38894
38888
|
var $Filter = (tag) => tag;
|
38895
38889
|
var toUnfoldable10 = /* @__PURE__ */ toUnfoldable4(unfoldableArray);
|
38896
38890
|
var $$for = /* @__PURE__ */ (() => {
|
38897
|
-
const
|
38898
|
-
return (x2) => (f) =>
|
38891
|
+
const traverse22 = traversableArray.traverse(applicativeEffect);
|
38892
|
+
return (x2) => (f) => traverse22(f)(x2);
|
38899
38893
|
})();
|
38900
38894
|
var for_5 = /* @__PURE__ */ for_(applicativeEffect)(foldableArray);
|
38901
38895
|
var forWithIndex_4 = /* @__PURE__ */ forWithIndex_(applicativeEffect)(foldableWithIndexArray);
|
@@ -39168,9 +39162,9 @@ var viewTextUnit = {
|
|
39168
39162
|
const $0 = v1._1;
|
39169
39163
|
const $1 = select(":nth-child(1)")(rootElement);
|
39170
39164
|
return () => {
|
39171
|
-
const
|
39165
|
+
const elem3 = $1();
|
39172
39166
|
const listener = eventListener((x2) => redraw(selectionEventData$p(x2)._2))();
|
39173
|
-
const $2 = styles(
|
39167
|
+
const $2 = styles(elem3)(fromFoldable9(textAttrs(textualString)($0)))();
|
39174
39168
|
return for_2(["mousedown", "mouseenter", "mouseleave"])((ev) => on(ev)(listener)($2))();
|
39175
39169
|
};
|
39176
39170
|
}
|
@@ -39264,7 +39258,7 @@ var pack32 = (x2) => (v) => v(viewScatterPlotUnit)(x2);
|
|
39264
39258
|
var pack4 = (x2) => (v) => v(viewMultiViewUnit)(x2);
|
39265
39259
|
var pack5 = (x2) => (v) => v(viewParagraphUnit)(x2);
|
39266
39260
|
var pack6 = (x2) => (v) => v(viewLinkUnit)(x2);
|
39267
|
-
var
|
39261
|
+
var identity30 = (x2) => x2;
|
39268
39262
|
var pack7 = (x2) => (v) => v(viewTableViewUnit)(x2);
|
39269
39263
|
var pack8 = (x2) => (v) => v(viewMatrixViewUnit)(x2);
|
39270
39264
|
var fromFoldable11 = /* @__PURE__ */ (() => fromFoldableImpl(foldableList.foldr))();
|
@@ -39453,10 +39447,10 @@ var view = () => (v) => (v1) => (v2) => {
|
|
39453
39447
|
}
|
39454
39448
|
if (v1._3._1 === "Paragraph") {
|
39455
39449
|
const vws = arrayMap(view()(v))(reflectValSelStates\u{1D54A}Array.from()(v1._3._2._1));
|
39456
|
-
return pack5($Paragraph(false,
|
39450
|
+
return pack5($Paragraph(false, zipWith(apply)(vws)(arrayMap((v$1) => Nothing)(vws))));
|
39457
39451
|
}
|
39458
39452
|
if (v1._3._1 === "Nil" || v1._3._1 === ":") {
|
39459
|
-
const records = arrayMap(dict(
|
39453
|
+
const records = arrayMap(dict(identity30))(reflectValSelStates\u{1D54A}Array.from()(v1));
|
39460
39454
|
const colNames = headers(records);
|
39461
39455
|
return pack7({
|
39462
39456
|
title: v,
|
@@ -39472,7 +39466,7 @@ var view = () => (v) => (v1) => (v2) => {
|
|
39472
39466
|
}
|
39473
39467
|
}
|
39474
39468
|
if (v1._3._1 === "Nil" || v1._3._1 === ":") {
|
39475
|
-
const records = arrayMap(dict(
|
39469
|
+
const records = arrayMap(dict(identity30))(reflectValSelStates\u{1D54A}Array.from()(v1));
|
39476
39470
|
const colNames = headers(records);
|
39477
39471
|
return pack7({
|
39478
39472
|
title: v,
|
@@ -39921,6 +39915,7 @@ var greaterThanOrEq = /* @__PURE__ */ (() => {
|
|
39921
39915
|
return (a1) => (a2) => $0.compare(a1)(a2) !== "LT";
|
39922
39916
|
})();
|
39923
39917
|
var show32 = (v) => "(Tuple " + showIntImpl(v._1) + " " + showIntImpl(v._2) + ")";
|
39918
|
+
var traverse2 = /* @__PURE__ */ (() => traversableList.traverse(applicativeMaybe))();
|
39924
39919
|
var concatM = (dictMonad) => foldableList.foldr((() => {
|
39925
39920
|
const $0 = dictMonad.Bind1();
|
39926
39921
|
return (f) => (g) => (a) => $0.bind(f(a))(g);
|
@@ -40064,9 +40059,9 @@ var graphGC = (dictGraph) => {
|
|
40064
40059
|
};
|
40065
40060
|
var closeDefs = (dictMonadWithGraphAlloc) => {
|
40066
40061
|
const Monad0 = dictMonadWithGraphAlloc.MonadWithGraph2().Monad0();
|
40067
|
-
const traverse2 = traversableDict.traverse(Monad0.Applicative0());
|
40062
|
+
const traverse2$1 = traversableDict.traverse(Monad0.Applicative0());
|
40068
40063
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
40069
|
-
return (\u03B3) => (\u03C1) => (\u03B1s) => Monad0.Bind1().Apply0().Functor0().map(Env)(traverse2((\u03C3) => {
|
40064
|
+
return (\u03B3) => (\u03C1) => (\u03B1s) => Monad0.Bind1().Apply0().Functor0().map(Env)(traverse2$1((\u03C3) => {
|
40070
40065
|
const \u03C1$p = forDefs(\u03C1)(\u03C3);
|
40071
40066
|
return $$new((a) => Val(a)(None))(\u03B1s)($BaseVal(
|
40072
40067
|
"Fun",
|
@@ -40088,14 +40083,14 @@ var closeDefs = (dictMonadWithGraphAlloc) => {
|
|
40088
40083
|
var new$p = (dictMonadWithGraphAlloc) => {
|
40089
40084
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
40090
40085
|
const fresh = dictMonadWithGraphAlloc.MonadAlloc0().fresh;
|
40091
|
-
return (dictMonadReader) =>
|
40092
|
-
const Monad0 =
|
40086
|
+
return (dictMonadReader) => {
|
40087
|
+
const Monad0 = dictMonadReader.MonadAsk0().Monad0();
|
40093
40088
|
const Bind1 = Monad0.Bind1();
|
40094
40089
|
return (dictLoadFile) => (v) => (v1) => (v2) => (v3) => {
|
40095
40090
|
if (v2.tag === "None") {
|
40096
40091
|
return $$new((\u03B1s$p) => (u$p) => $Val(\u03B1s$p, None, u$p))(v1)(v3);
|
40097
40092
|
}
|
40098
|
-
return Bind1.bind(fresh)((\u03B1) => Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40093
|
+
return Bind1.bind(fresh)((\u03B1) => Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(v)((() => {
|
40099
40094
|
const $0 = {};
|
40100
40095
|
$0.this = $Val(\u03B1, None, v3);
|
40101
40096
|
return $0;
|
@@ -40107,8 +40102,8 @@ var new$p = (dictMonadWithGraphAlloc) => {
|
|
40107
40102
|
};
|
40108
40103
|
};
|
40109
40104
|
};
|
40110
|
-
var evalDocOpt = (dictMonadWithGraphAlloc) => (dictMonadReader) =>
|
40111
|
-
const Monad0 =
|
40105
|
+
var evalDocOpt = (dictMonadWithGraphAlloc) => (dictMonadReader) => {
|
40106
|
+
const Monad0 = dictMonadReader.MonadAsk0().Monad0();
|
40112
40107
|
const Applicative0 = Monad0.Applicative0();
|
40113
40108
|
const $0 = Monad0.Bind1().Apply0().Functor0();
|
40114
40109
|
const sequence2 = traversableList.traverse(Applicative0)(identity7);
|
@@ -40122,7 +40117,7 @@ var evalDocOpt = (dictMonadWithGraphAlloc) => (dictMonadReader) => (dictMonadAff
|
|
40122
40117
|
return Applicative0.pure($DocCommentElem("Token", v2._1));
|
40123
40118
|
}
|
40124
40119
|
if (v2.tag === "Unquote") {
|
40125
|
-
return $0.map(Unquote)($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40120
|
+
return $0.map(Unquote)($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v2._1)(setSet4.empty));
|
40126
40121
|
}
|
40127
40122
|
fail();
|
40128
40123
|
})(v1._1)));
|
@@ -40138,13 +40133,13 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40138
40133
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
40139
40134
|
const match1 = match(dictMonadWithGraphAlloc);
|
40140
40135
|
const closeDefs1 = closeDefs(dictMonadWithGraphAlloc);
|
40141
|
-
return (dictMonadReader) =>
|
40142
|
-
const Monad0 =
|
40136
|
+
return (dictMonadReader) => {
|
40137
|
+
const Monad0 = dictMonadReader.MonadAsk0().Monad0();
|
40143
40138
|
const Bind1 = Monad0.Bind1();
|
40144
40139
|
const $0 = Bind1.Apply0().Functor0();
|
40145
40140
|
const Applicative0 = Monad0.Applicative0();
|
40146
|
-
const
|
40147
|
-
const
|
40141
|
+
const traverse3 = traversableList.traverse(Applicative0);
|
40142
|
+
const traverse4 = traversablePair.traverse(Applicative0);
|
40148
40143
|
const sequence2 = traversableArray.traverse(Applicative0)(identity5);
|
40149
40144
|
return (dictLoadFile) => (v) => (v1) => (v2) => {
|
40150
40145
|
if (v1.tag === "Var") {
|
@@ -40154,32 +40149,23 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40154
40149
|
return withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)(v1._1)(v));
|
40155
40150
|
}
|
40156
40151
|
if (v1.tag === "Int") {
|
40157
|
-
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40158
|
-
"Int",
|
40159
|
-
v1._3
|
40160
|
-
));
|
40152
|
+
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(insert3(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Int", v1._3));
|
40161
40153
|
}
|
40162
40154
|
if (v1.tag === "Float") {
|
40163
|
-
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40164
|
-
"Float",
|
40165
|
-
v1._3
|
40166
|
-
));
|
40155
|
+
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(insert3(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Float", v1._3));
|
40167
40156
|
}
|
40168
40157
|
if (v1.tag === "Str") {
|
40169
|
-
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40170
|
-
"Str",
|
40171
|
-
v1._3
|
40172
|
-
));
|
40158
|
+
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(insert3(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Str", v1._3));
|
40173
40159
|
}
|
40174
40160
|
if (v1.tag === "Dictionary") {
|
40175
40161
|
const $1 = v1._2;
|
40176
40162
|
const $2 = v1._1;
|
40177
|
-
return Bind1.bind($0.map(unzip3)(
|
40178
|
-
const $3 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40163
|
+
return Bind1.bind($0.map(unzip3)(traverse3(traverse4((() => {
|
40164
|
+
const $3 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v);
|
40179
40165
|
return (a) => $3(a)(v2);
|
40180
40166
|
})()))(v1._3)))((v3) => {
|
40181
40167
|
const v4 = unzip(listMap((v$1) => $Tuple(v$1._3.tag === "Str" ? v$1._3._1 : typeError(v$1._3)("Str"), v$1._1))(v3._1));
|
40182
|
-
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40168
|
+
return new$p(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(insert3(ordVertex)($2)()(v2))($1)($BaseVal(
|
40183
40169
|
"Dictionary",
|
40184
40170
|
fromFoldable110(zipWith2(Tuple)(v4._1)(zipWith2(Tuple)(v4._2)(v3._2)))
|
40185
40171
|
));
|
@@ -40210,14 +40196,10 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40210
40196
|
return go$r;
|
40211
40197
|
};
|
40212
40198
|
return go(0)($3);
|
40213
|
-
})()))(() => Bind1.bind(
|
40214
|
-
const $5 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40199
|
+
})()))(() => Bind1.bind(traverse3((() => {
|
40200
|
+
const $5 = $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v);
|
40215
40201
|
return (a) => $5(a)(v2);
|
40216
|
-
})())($3))((vs) => new$p(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40217
|
-
"Constr",
|
40218
|
-
$1,
|
40219
|
-
vs
|
40220
|
-
))));
|
40202
|
+
})())($3))((vs) => new$p(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(insert3(ordVertex)($4)()(v2))($2)($BaseVal("Constr", $1, vs))));
|
40221
40203
|
}
|
40222
40204
|
if (v1.tag === "Matrix") {
|
40223
40205
|
const $1 = v1._2;
|
@@ -40225,7 +40207,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40225
40207
|
const $3 = v1._4._1;
|
40226
40208
|
const $4 = v1._4._2;
|
40227
40209
|
const $5 = v1._1;
|
40228
|
-
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40210
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v1._5)(v2))((v3) => {
|
40229
40211
|
const v5 = intPair.unpack(v3._3);
|
40230
40212
|
const $6 = v5._1._1;
|
40231
40213
|
const $7 = v5._2._1;
|
@@ -40236,7 +40218,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40236
40218
|
1
|
40237
40219
|
)) + "); got (" + show32($Tuple($6, $7)) + ")"))(() => Bind1.bind(sequence2(arrayBind(range(1)($6))((i) => [
|
40238
40220
|
sequence2(arrayBind(range(1)($7))((j) => [
|
40239
|
-
$$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40221
|
+
$$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(v)(disjointUnion2((() => {
|
40240
40222
|
const $10 = {};
|
40241
40223
|
$10[$3] = $Val($8, None, $BaseVal("Int", i));
|
40242
40224
|
return $10;
|
@@ -40246,7 +40228,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40246
40228
|
return $10;
|
40247
40229
|
})())))($2)(v2)
|
40248
40230
|
]))
|
40249
|
-
])))((vss) => new$p(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40231
|
+
])))((vss) => new$p(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(insert3(ordVertex)($5)()(v2))($1)($BaseVal(
|
40250
40232
|
"Matrix",
|
40251
40233
|
$Tuple(vss, $Tuple($Tuple($6, $8), $Tuple($7, $9)))
|
40252
40234
|
))));
|
@@ -40272,7 +40254,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40272
40254
|
if (v1.tag === "Project") {
|
40273
40255
|
const $1 = v1._1;
|
40274
40256
|
const $2 = v1._3;
|
40275
|
-
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40257
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v1._2)(v2))((v3) => {
|
40276
40258
|
if (v3._3.tag === "Dictionary") {
|
40277
40259
|
return Bind1.bind(withMsg2("Dict lookup")(orElse(MonadThrow0)('Key "' + $2 + '" not found')((() => {
|
40278
40260
|
const $3 = _lookup(Nothing, Just, $2, v3._3._1);
|
@@ -40280,7 +40262,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40280
40262
|
return $Maybe("Just", $3._1._2);
|
40281
40263
|
}
|
40282
40264
|
return Nothing;
|
40283
|
-
})())))((v$p) => concatDocs(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40265
|
+
})())))((v$p) => concatDocs(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v$p)($1));
|
40284
40266
|
}
|
40285
40267
|
return MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v3)).lines) + ", expected dictionary"));
|
40286
40268
|
});
|
@@ -40288,7 +40270,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40288
40270
|
if (v1.tag === "DProject") {
|
40289
40271
|
const $1 = v1._1;
|
40290
40272
|
const $2 = v1._3;
|
40291
|
-
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40273
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v1._2)(v2))((v3) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)($2)(v2))((v$p) => {
|
40292
40274
|
if (v3._3.tag === "Dictionary") {
|
40293
40275
|
if (v$p._3.tag === "Str") {
|
40294
40276
|
return Bind1.bind(withMsg2("Dict lookup")(orElse(MonadThrow0)('Key "' + v$p._3._1 + '" not found')((() => {
|
@@ -40297,7 +40279,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40297
40279
|
return $Maybe("Just", $3._1._2);
|
40298
40280
|
}
|
40299
40281
|
return Nothing;
|
40300
|
-
})())))((v$p$p) => concatDocs(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40282
|
+
})())))((v$p$p) => concatDocs(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v$p$p)($1));
|
40301
40283
|
}
|
40302
40284
|
return MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v$p)).lines) + ", expected string"));
|
40303
40285
|
}
|
@@ -40307,10 +40289,10 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40307
40289
|
if (v1.tag === "App") {
|
40308
40290
|
const $1 = v1._1;
|
40309
40291
|
const $2 = v1._3;
|
40310
|
-
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40292
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v1._2)(v2))((v3) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)($2)(v2))((v$p) => Bind1.bind(apply2(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v3)(v$p))((v4) => {
|
40311
40293
|
const $3 = v4._3;
|
40312
40294
|
const $4 = v4._1;
|
40313
|
-
return Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40295
|
+
return Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(v)((() => {
|
40314
40296
|
const $5 = {};
|
40315
40297
|
$5.this = v4;
|
40316
40298
|
return $5;
|
@@ -40320,24 +40302,24 @@ var $$eval = (dictMonadWithGraphAlloc) => {
|
|
40320
40302
|
if (v1.tag === "Let") {
|
40321
40303
|
const $1 = v1._2;
|
40322
40304
|
const $2 = v1._1._1;
|
40323
|
-
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40305
|
+
return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(v)(v1._1._2)(v2))((v3) => Bind1.bind(match1(v3)($2))((v4) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(v)(v4._1))($1)(v4._2._2)));
|
40324
40306
|
}
|
40325
40307
|
if (v1.tag === "LetRec") {
|
40326
40308
|
const $1 = v1._2;
|
40327
40309
|
const $2 = v1._1._1;
|
40328
|
-
return Bind1.bind(closeDefs1(v)(v1._1._2)(insert3(ordVertex)($2)()(v2)))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40310
|
+
return Bind1.bind(closeDefs1(v)(v1._1._2)(insert3(ordVertex)($2)()(v2)))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(v)(\u03B3$p))($1)(insert3(ordVertex)($2)()(v2)));
|
40329
40311
|
}
|
40330
40312
|
fail();
|
40331
40313
|
};
|
40332
40314
|
};
|
40333
40315
|
};
|
40334
|
-
var concatDocs = (dictMonadWithGraphAlloc) => (dictMonadReader) =>
|
40335
|
-
const Monad0 =
|
40316
|
+
var concatDocs = (dictMonadWithGraphAlloc) => (dictMonadReader) => {
|
40317
|
+
const Monad0 = dictMonadReader.MonadAsk0().Monad0();
|
40336
40318
|
return (dictLoadFile) => (\u03B3) => (v) => (doc2) => {
|
40337
40319
|
const $0 = v._3;
|
40338
40320
|
const $1 = v._2;
|
40339
40321
|
const $2 = v._1;
|
40340
|
-
return Monad0.Bind1().bind(evalDocOpt(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40322
|
+
return Monad0.Bind1().bind(evalDocOpt(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(\u03B3)((() => {
|
40341
40323
|
const $3 = {};
|
40342
40324
|
$3.this = $Val($2, None, $0);
|
40343
40325
|
return $3;
|
@@ -40350,8 +40332,8 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
40350
40332
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
40351
40333
|
const MonadError1 = dictMonadWithGraphAlloc.MonadError1();
|
40352
40334
|
const MonadThrow0 = MonadError1.MonadThrow0();
|
40353
|
-
return (dictMonadReader) =>
|
40354
|
-
const Bind1 =
|
40335
|
+
return (dictMonadReader) => {
|
40336
|
+
const Bind1 = dictMonadReader.MonadAsk0().Monad0().Bind1();
|
40355
40337
|
return (dictLoadFile) => (v) => (v1) => {
|
40356
40338
|
const $0 = (v2) => MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v2)).lines) + ", expected function"));
|
40357
40339
|
if (v._3.tag === "Fun") {
|
@@ -40359,7 +40341,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
40359
40341
|
const $1 = v._1;
|
40360
40342
|
const $2 = v._3._1._1;
|
40361
40343
|
const $3 = v._3._1._3;
|
40362
|
-
return Bind1.bind(closeDefs1($2)(v._3._1._2)($$$Map("Two", Leaf2, $1, void 0, Leaf2)))((\u03B32) => Bind1.bind(match1(v1)($3))((v3) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(
|
40344
|
+
return Bind1.bind(closeDefs1($2)(v._3._1._2)($$$Map("Two", Leaf2, $1, void 0, Leaf2)))((\u03B32) => Bind1.bind(match1(v1)($3))((v3) => $$eval(dictMonadWithGraphAlloc)(dictMonadReader)(dictLoadFile)(unionWith((v$1) => identity19)(unionWith((v$1) => identity19)($2)(\u03B32))(v3._1))(v3._2._1.tag === "ContExpr" ? v3._2._1._1 : throwException(error("Expression expected"))())(insert3(ordVertex)($1)()(v3._2._2))));
|
40363
40345
|
}
|
40364
40346
|
if (v._3._1.tag === "Foreign") {
|
40365
40347
|
const $1 = v._3._1._1._2;
|
@@ -40390,7 +40372,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
|
|
40390
40372
|
$Fun("Foreign", $Tuple(v._3._1._1._1, $1), vs$p)
|
40391
40373
|
));
|
40392
40374
|
}
|
40393
|
-
return $1._1.op(dictMonadWithGraphAlloc)(MonadError1)(
|
40375
|
+
return $1._1.op(dictMonadWithGraphAlloc)(MonadError1)(dictMonadReader)(dictLoadFile)(vs$p);
|
40394
40376
|
}
|
40395
40377
|
if (v._3._1.tag === "PartialConstr") {
|
40396
40378
|
const $1 = v._1;
|
@@ -40465,33 +40447,30 @@ var eval_module = (dictMonadWithGraphAlloc) => {
|
|
40465
40447
|
const match1 = match(dictMonadWithGraphAlloc);
|
40466
40448
|
const closeDefs1 = closeDefs(dictMonadWithGraphAlloc);
|
40467
40449
|
return (dictMonadReader) => {
|
40450
|
+
const Monad0 = dictMonadReader.MonadAsk0().Monad0();
|
40451
|
+
const $0 = Monad0.Bind1();
|
40468
40452
|
const eval2 = eval1(dictMonadReader);
|
40469
|
-
return (
|
40470
|
-
const
|
40471
|
-
|
40472
|
-
|
40473
|
-
|
40474
|
-
|
40475
|
-
|
40476
|
-
|
40477
|
-
if (v1.tag === "
|
40478
|
-
|
40453
|
+
return (dictLoadFile) => {
|
40454
|
+
const eval3 = eval2(dictLoadFile);
|
40455
|
+
return (\u03B3) => {
|
40456
|
+
const go = (v) => (v1) => (v2) => {
|
40457
|
+
if (v1.tag === "Nil") {
|
40458
|
+
return Monad0.Applicative0().pure(v);
|
40459
|
+
}
|
40460
|
+
if (v1.tag === "Cons") {
|
40461
|
+
if (v1._1.tag === "Left") {
|
40462
|
+
const $1 = v1._2;
|
40463
|
+
const $2 = v1._1._1._1;
|
40464
|
+
return $0.bind(eval3(unionWith((v$1) => identity19)(\u03B3)(v))(v1._1._1._2)(v2))((v3) => $0.bind(match1(v3)($2))((v4) => go(unionWith((v$1) => identity19)(v)(v4._1))($1)(v4._2._2)));
|
40479
40465
|
}
|
40480
|
-
if (v1.tag === "
|
40481
|
-
|
40482
|
-
|
40483
|
-
const $2 = v1._1._1._1;
|
40484
|
-
return $0.bind(eval4(unionWith((v$1) => identity18)(\u03B3)(v))(v1._1._1._2)(v2))((v3) => $0.bind(match1(v3)($2))((v4) => go(unionWith((v$1) => identity18)(v)(v4._1))($1)(v4._2._2)));
|
40485
|
-
}
|
40486
|
-
if (v1._1.tag === "Right") {
|
40487
|
-
const $1 = v1._2;
|
40488
|
-
return $0.bind(closeDefs1(unionWith((v$1) => identity18)(\u03B3)(v))(v1._1._1._2)(insert3(ordVertex)(v1._1._1._1)()(v2)))((\u03B3$p$p) => go(unionWith((v$1) => identity18)(v)(\u03B3$p$p))($1)(v2));
|
40489
|
-
}
|
40466
|
+
if (v1._1.tag === "Right") {
|
40467
|
+
const $1 = v1._2;
|
40468
|
+
return $0.bind(closeDefs1(unionWith((v$1) => identity19)(\u03B3)(v))(v1._1._1._2)(insert3(ordVertex)(v1._1._1._1)()(v2)))((\u03B3$p$p) => go(unionWith((v$1) => identity19)(v)(\u03B3$p$p))($1)(v2));
|
40490
40469
|
}
|
40491
|
-
|
40492
|
-
|
40493
|
-
return go(empty);
|
40470
|
+
}
|
40471
|
+
fail();
|
40494
40472
|
};
|
40473
|
+
return go(empty);
|
40495
40474
|
};
|
40496
40475
|
};
|
40497
40476
|
};
|
@@ -40500,26 +40479,95 @@ var eval_progCxt = (dictMonadWithGraphAlloc) => {
|
|
40500
40479
|
const eval_module1 = eval_module(dictMonadWithGraphAlloc);
|
40501
40480
|
const eval1 = $$eval(dictMonadWithGraphAlloc);
|
40502
40481
|
return (dictMonadReader) => {
|
40482
|
+
const Monad0 = dictMonadReader.MonadAsk0().Monad0();
|
40483
|
+
const $0 = Monad0.Bind1();
|
40503
40484
|
const eval_module2 = eval_module1(dictMonadReader);
|
40485
|
+
const $1 = Monad0.Applicative0();
|
40504
40486
|
const eval2 = eval1(dictMonadReader);
|
40505
|
-
|
40506
|
-
|
40507
|
-
const
|
40508
|
-
const
|
40509
|
-
|
40510
|
-
|
40511
|
-
|
40512
|
-
|
40513
|
-
const
|
40514
|
-
const
|
40515
|
-
return (
|
40516
|
-
const
|
40517
|
-
|
40518
|
-
|
40519
|
-
|
40520
|
-
|
40521
|
-
|
40522
|
-
|
40487
|
+
const concatM1 = concatM(Monad0);
|
40488
|
+
return (dictLoadFile) => {
|
40489
|
+
const eval_module3 = eval_module2(dictLoadFile);
|
40490
|
+
const eval3 = eval2(dictLoadFile);
|
40491
|
+
return (v) => (v1) => {
|
40492
|
+
const $2 = v.datasets;
|
40493
|
+
const $3 = v1.graph;
|
40494
|
+
const $4 = v1.modules;
|
40495
|
+
const $5 = v.primitives;
|
40496
|
+
const $6 = v1.roots;
|
40497
|
+
return $0.bind(foldM3(Monad0)((\u03B3s) => (name3) => {
|
40498
|
+
const v2 = definitely("deps evaluated")((() => {
|
40499
|
+
const $7 = lookup2(ordString)(name3)($3);
|
40500
|
+
if ($7.tag === "Just") {
|
40501
|
+
const $8 = traverse2((dep) => lookup2(ordString)(dep)(\u03B3s))($7._1);
|
40502
|
+
if ($8.tag === "Just") {
|
40503
|
+
const $9 = lookup2(ordString)(name3)($4);
|
40504
|
+
if ($9.tag === "Just") {
|
40505
|
+
return $Maybe("Just", $Tuple($9._1, $8._1));
|
40506
|
+
}
|
40507
|
+
if ($9.tag === "Nothing") {
|
40508
|
+
return Nothing;
|
40509
|
+
}
|
40510
|
+
fail();
|
40511
|
+
}
|
40512
|
+
if ($8.tag === "Nothing") {
|
40513
|
+
return Nothing;
|
40514
|
+
}
|
40515
|
+
fail();
|
40516
|
+
}
|
40517
|
+
if ($7.tag === "Nothing") {
|
40518
|
+
return Nothing;
|
40519
|
+
}
|
40520
|
+
fail();
|
40521
|
+
})());
|
40522
|
+
return $0.bind(eval_module3((() => {
|
40523
|
+
const go = (go$a0$copy) => (go$a1$copy) => {
|
40524
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
40525
|
+
while (go$c) {
|
40526
|
+
const b = go$a0, v$1 = go$a1;
|
40527
|
+
if (v$1.tag === "Nil") {
|
40528
|
+
go$c = false;
|
40529
|
+
go$r = b;
|
40530
|
+
continue;
|
40531
|
+
}
|
40532
|
+
if (v$1.tag === "Cons") {
|
40533
|
+
go$a0 = unionWith((v$2) => identity19)(b)(v$1._1);
|
40534
|
+
go$a1 = v$1._2;
|
40535
|
+
continue;
|
40536
|
+
}
|
40537
|
+
fail();
|
40538
|
+
}
|
40539
|
+
return go$r;
|
40540
|
+
};
|
40541
|
+
return go($5)(v2._2);
|
40542
|
+
})())(v2._1)(setSet4.empty))((\u03B3$p) => $1.pure(insert3(ordString)(name3)(\u03B3$p)(\u03B3s)));
|
40543
|
+
})(Leaf2)(v1.topsorted))((\u03B3s) => {
|
40544
|
+
const go = (go$a0$copy) => (go$a1$copy) => {
|
40545
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
40546
|
+
while (go$c) {
|
40547
|
+
const b = go$a0, v$1 = go$a1;
|
40548
|
+
if (v$1.tag === "Nil") {
|
40549
|
+
go$c = false;
|
40550
|
+
go$r = b;
|
40551
|
+
continue;
|
40552
|
+
}
|
40553
|
+
if (v$1.tag === "Cons") {
|
40554
|
+
go$a0 = unionWith((v$2) => identity19)(b)(v$1._1);
|
40555
|
+
go$a1 = v$1._2;
|
40556
|
+
continue;
|
40557
|
+
}
|
40558
|
+
fail();
|
40559
|
+
}
|
40560
|
+
return go$r;
|
40561
|
+
};
|
40562
|
+
return concatM1(listMap((v2) => (\u03B3) => {
|
40563
|
+
const $7 = v2._1;
|
40564
|
+
return $0.bind(eval3(\u03B3)(v2._2)(setSet4.empty))((v3) => $1.pure(unionWith((v$1) => identity19)(\u03B3)((() => {
|
40565
|
+
const $8 = {};
|
40566
|
+
$8[$7] = v3;
|
40567
|
+
return $8;
|
40568
|
+
})())));
|
40569
|
+
})(reverse2($2)))(go($5)(listMap((dep) => definitely("has env")(lookup2(ordString)(dep)(\u03B3s)))($6)));
|
40570
|
+
});
|
40523
40571
|
};
|
40524
40572
|
};
|
40525
40573
|
};
|
@@ -40534,25 +40582,20 @@ var graphEval = (dictMonadAff) => {
|
|
40534
40582
|
Applicative0: () => applicativeStateT(Monad0),
|
40535
40583
|
Bind1: () => bindStateT(Monad0)
|
40536
40584
|
})(graphGraphImpl);
|
40537
|
-
const
|
40538
|
-
const monadAffState1 = monadAffState(monadAffState2);
|
40539
|
-
const $1 = monadAffState2.MonadEffect0().Monad0();
|
40585
|
+
const $1 = monadAffState(dictMonadAff).MonadEffect0().Monad0();
|
40540
40586
|
const $2 = dictMonadAff.MonadEffect0().Monad0();
|
40541
40587
|
return (dictMonadReader) => {
|
40542
40588
|
const monadReaderStateT2 = monadReaderStateT(monadReaderStateT(dictMonadReader));
|
40543
40589
|
return (dictLoadFile) => (dictMonadError) => {
|
40544
|
-
const eval1 = $$eval(monadWithGraphAllocWithGr(dictMonadError))(monadReaderStateT2)(
|
40545
|
-
const
|
40590
|
+
const eval1 = $$eval(monadWithGraphAllocWithGr(dictMonadError))(monadReaderStateT2)((() => {
|
40591
|
+
const loadFileFromPath1 = dictLoadFile.loadFileFromPath(dictMonadError)(dictMonadAff);
|
40546
40592
|
return {
|
40547
|
-
|
40548
|
-
const $3 =
|
40549
|
-
return (
|
40550
|
-
|
40551
|
-
|
40552
|
-
|
40553
|
-
s
|
40554
|
-
)));
|
40555
|
-
};
|
40593
|
+
loadFileFromPath: (dictMonadError1) => (dictMonadAff1) => (x2) => {
|
40594
|
+
const $3 = loadFileFromPath1(x2);
|
40595
|
+
return (s) => $1.Bind1().bind((s$1) => $2.Bind1().bind($3)((x$1) => $2.Applicative0().pure($Tuple(x$1, s$1))))((x$1) => $1.Applicative0().pure($Tuple(
|
40596
|
+
x$1,
|
40597
|
+
s
|
40598
|
+
)));
|
40556
40599
|
}
|
40557
40600
|
};
|
40558
40601
|
})());
|
@@ -40583,6 +40626,87 @@ var graphEval = (dictMonadAff) => {
|
|
40583
40626
|
};
|
40584
40627
|
};
|
40585
40628
|
|
40629
|
+
// output-es/File/index.js
|
40630
|
+
var bindExceptT2 = /* @__PURE__ */ bindExceptT(monadAff);
|
40631
|
+
var applicativeExceptT2 = /* @__PURE__ */ applicativeExceptT(monadAff);
|
40632
|
+
var Folder = (x2) => x2;
|
40633
|
+
var show4 = /* @__PURE__ */ showArrayImpl(showStringImpl);
|
40634
|
+
var loadFileAff = {
|
40635
|
+
loadFileFromPath: (dictMonadError) => (dictMonadAff) => (v) => _bind(bindExceptT2.bind(dictMonadAff.liftAff(_bind(request(driver)({
|
40636
|
+
method: $Either("Left", HEAD),
|
40637
|
+
url: v,
|
40638
|
+
headers: [],
|
40639
|
+
content: Nothing,
|
40640
|
+
username: Nothing,
|
40641
|
+
password: Nothing,
|
40642
|
+
withCredentials: false,
|
40643
|
+
responseFormat: $ResponseFormat("String", identity),
|
40644
|
+
timeout: Nothing
|
40645
|
+
}))((resp) => _pure((() => {
|
40646
|
+
if (resp.tag === "Right") {
|
40647
|
+
if (resp._1.status === 200) {
|
40648
|
+
return $Either("Right", $Tuple(resp._1, v));
|
40649
|
+
}
|
40650
|
+
return $Either("Left", RequestFailedError);
|
40651
|
+
}
|
40652
|
+
if (resp.tag === "Left") {
|
40653
|
+
return $Either("Left", resp._1);
|
40654
|
+
}
|
40655
|
+
fail();
|
40656
|
+
})()))))((v1) => {
|
40657
|
+
const $0 = v1._2;
|
40658
|
+
return bindExceptT2.bind(applicativeExceptT2.pure())(() => bindExceptT2.bind(dictMonadAff.liftAff(request(driver)({
|
40659
|
+
method: $Either("Left", GET),
|
40660
|
+
url: $0,
|
40661
|
+
headers: [],
|
40662
|
+
content: Nothing,
|
40663
|
+
username: Nothing,
|
40664
|
+
password: Nothing,
|
40665
|
+
withCredentials: false,
|
40666
|
+
responseFormat: $ResponseFormat("String", identity),
|
40667
|
+
timeout: Nothing
|
40668
|
+
})))((contents) => applicativeExceptT2.pure(contents.body)));
|
40669
|
+
}))((result) => _pure((() => {
|
40670
|
+
if (result.tag === "Left") {
|
40671
|
+
return Nothing;
|
40672
|
+
}
|
40673
|
+
if (result.tag === "Right") {
|
40674
|
+
return $Maybe("Just", result._1);
|
40675
|
+
}
|
40676
|
+
fail();
|
40677
|
+
})()))
|
40678
|
+
};
|
40679
|
+
var prependFolder = (v) => (v1) => v + "/" + v1;
|
40680
|
+
var loadFile = (dictLoadFile) => (dictMonad) => {
|
40681
|
+
const $0 = dictMonad.Applicative0();
|
40682
|
+
return (dictMonadError) => {
|
40683
|
+
const loadFileFromPath2 = dictLoadFile.loadFileFromPath(dictMonadError);
|
40684
|
+
return (dictMonadAff) => {
|
40685
|
+
const loadFileFromPath3 = loadFileFromPath2(dictMonadAff);
|
40686
|
+
return (folders) => (file) => {
|
40687
|
+
const paths = arrayApply(arrayMap(prependFolder)(folders))([file]);
|
40688
|
+
return dictMonad.Bind1().bind(foldM(dictMonad)((v) => (v1) => {
|
40689
|
+
if (v.tag === "Just") {
|
40690
|
+
return $0.pure($Maybe("Just", v._1));
|
40691
|
+
}
|
40692
|
+
if (v.tag === "Nothing") {
|
40693
|
+
return loadFileFromPath3(v1);
|
40694
|
+
}
|
40695
|
+
fail();
|
40696
|
+
})(Nothing)(paths))((result) => {
|
40697
|
+
if (result.tag === "Just") {
|
40698
|
+
return $0.pure(result._1);
|
40699
|
+
}
|
40700
|
+
if (result.tag === "Nothing") {
|
40701
|
+
return throwException(error("File not found in any path: " + show4(paths)))();
|
40702
|
+
}
|
40703
|
+
fail();
|
40704
|
+
});
|
40705
|
+
};
|
40706
|
+
};
|
40707
|
+
};
|
40708
|
+
};
|
40709
|
+
|
40586
40710
|
// output-es/Data.CodePoint.Unicode/index.js
|
40587
40711
|
var isUpper = (x2) => checkAttr([512, 524288])(x2);
|
40588
40712
|
var isSpace = (c) => {
|
@@ -40744,7 +40868,7 @@ var toLowerSimple = /* @__PURE__ */ convert(uTowlower);
|
|
40744
40868
|
var toUpperSimple = /* @__PURE__ */ convert(uTowupper);
|
40745
40869
|
|
40746
40870
|
// output-es/Parsing.Token/index.js
|
40747
|
-
var
|
40871
|
+
var identity31 = (x2) => x2;
|
40748
40872
|
var choice3 = /* @__PURE__ */ choice(foldableArray);
|
40749
40873
|
var toUnfoldable15 = /* @__PURE__ */ toUnfoldable2(unfoldableArray);
|
40750
40874
|
var theReservedNames = (v) => {
|
@@ -41057,10 +41181,10 @@ var makeTokenParser = (v) => {
|
|
41057
41181
|
if ($132) {
|
41058
41182
|
return $42(v4$1, $122);
|
41059
41183
|
}
|
41060
|
-
return $52(v2,
|
41184
|
+
return $52(v2, identity31);
|
41061
41185
|
});
|
41062
41186
|
},
|
41063
|
-
(state2, a) => $22((v2$1) => $52(state2,
|
41187
|
+
(state2, a) => $22((v2$1) => $52(state2, identity31))
|
41064
41188
|
)));
|
41065
41189
|
});
|
41066
41190
|
},
|
@@ -42326,7 +42450,7 @@ var onlyIf = (b) => (a) => {
|
|
42326
42450
|
};
|
42327
42451
|
var choose2 = /* @__PURE__ */ choose(altParserT);
|
42328
42452
|
var fanin3 = /* @__PURE__ */ fanin(categoryFn)(choiceFn);
|
42329
|
-
var
|
42453
|
+
var identity32 = (x2) => x2;
|
42330
42454
|
var operators = (binaryOp) => fromFoldable20(listMap(arrayMap((v) => $Operator(
|
42331
42455
|
"Infix",
|
42332
42456
|
(() => {
|
@@ -42350,6 +42474,10 @@ var operators = (binaryOp) => fromFoldable20(listMap(arrayMap((v) => $Operator(
|
|
42350
42474
|
}
|
42351
42475
|
fail();
|
42352
42476
|
})(foldableMap.foldr(Cons)(Nil)(opDefs))))));
|
42477
|
+
var letters = ($$char) => {
|
42478
|
+
const $0 = some(alternativeParserT)(lazyParserT)($$char);
|
42479
|
+
return (state1, more, lift12, $$throw2, done) => more((v1) => $0(state1, more, lift12, $$throw2, (state2, a) => more((v2) => done(state2, fromCharArray(a)))));
|
42480
|
+
};
|
42353
42481
|
var languageDef = /* @__PURE__ */ (() => {
|
42354
42482
|
const opChar = oneOf([":", "!", "#", "$", "%", "&", "*", "+", ".", "/", "<", "=", ">", "?", "@", "\\", "^", "|", "-", "~"]);
|
42355
42483
|
return {
|
@@ -42403,7 +42531,7 @@ var languageDef = /* @__PURE__ */ (() => {
|
|
42403
42531
|
})(),
|
42404
42532
|
opStart: opChar,
|
42405
42533
|
opLetter: opChar,
|
42406
|
-
reservedNames: ["as", "else", "fun", "if", "in", "let", "match", "then"],
|
42534
|
+
reservedNames: ["as", "else", "fun", "if", "in", "let", "match", "then", "import"],
|
42407
42535
|
reservedOpNames: ["|", "..", "=", "<-", "->"],
|
42408
42536
|
caseSensitive: true
|
42409
42537
|
};
|
@@ -42438,6 +42566,34 @@ var keyword2 = (str$p) => {
|
|
42438
42566
|
}
|
42439
42567
|
return throwException(error(str$p + " is not a reserved word"))();
|
42440
42568
|
};
|
42569
|
+
var imports_ = /* @__PURE__ */ manyRec2(/* @__PURE__ */ (() => {
|
42570
|
+
const $0 = keyword2("import");
|
42571
|
+
const $1 = joinWith("/");
|
42572
|
+
const $2 = sepBy1(token.identifier)(token.reservedOp("."));
|
42573
|
+
return (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => $0(
|
42574
|
+
state1,
|
42575
|
+
more,
|
42576
|
+
lift12,
|
42577
|
+
$$throw2,
|
42578
|
+
(state2, a) => more((v2$1) => more((v3) => more((v1$1) => $2(
|
42579
|
+
state2,
|
42580
|
+
more,
|
42581
|
+
lift12,
|
42582
|
+
$$throw2,
|
42583
|
+
(state2$1, a$1) => more((v2$2) => {
|
42584
|
+
const $3 = $1(fromFoldable111(a$1));
|
42585
|
+
return more((v4) => done(state2$1, $3));
|
42586
|
+
})
|
42587
|
+
))))
|
42588
|
+
)));
|
42589
|
+
})());
|
42590
|
+
var withImports = (p) => topLevel((state1, more, lift12, $$throw2, done) => more((v1) => imports_(
|
42591
|
+
state1,
|
42592
|
+
more,
|
42593
|
+
lift12,
|
42594
|
+
$$throw2,
|
42595
|
+
(state2, a) => more((v2) => more((v1$1) => p(state2, more, lift12, $$throw2, (state2$1, a$1) => more((v2$1) => done(state2$1, $Tuple(a$1, a))))))
|
42596
|
+
)));
|
42441
42597
|
var ident = (state1, more, lift12, $$throw2, done) => more((v1) => token.identifier(
|
42442
42598
|
state1,
|
42443
42599
|
more,
|
@@ -42739,17 +42895,8 @@ var varDefs = (expr$p) => {
|
|
42739
42895
|
)));
|
42740
42896
|
};
|
42741
42897
|
var commentToken = /* @__PURE__ */ (() => {
|
42742
|
-
const $0 =
|
42743
|
-
return (state1, more, lift12, $$throw2, done) => more((v1) => more((
|
42744
|
-
state1,
|
42745
|
-
more,
|
42746
|
-
lift12,
|
42747
|
-
$$throw2,
|
42748
|
-
(state2, a) => more((v2) => {
|
42749
|
-
const $1 = fromCharArray(a);
|
42750
|
-
return more((v2$1) => done(state2, $DocCommentElem("Token", $1)));
|
42751
|
-
})
|
42752
|
-
)));
|
42898
|
+
const $0 = letters(docCommentLetter);
|
42899
|
+
return (state1, more, lift12, $$throw2, done) => more((v1) => $0(state1, more, lift12, $$throw2, (state2, a) => more((v2) => done(state2, $DocCommentElem("Token", a)))));
|
42753
42900
|
})();
|
42754
42901
|
var commentExpr = (expr$p) => (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => string3("$")(
|
42755
42902
|
state1,
|
@@ -43429,10 +43576,10 @@ var expr_$lazy = /* @__PURE__ */ binding(() => {
|
|
43429
43576
|
if ($47) {
|
43430
43577
|
return $42($ParseState(v4$5._1, v4$5._2, false), $46);
|
43431
43578
|
}
|
43432
|
-
return $43($ParseState($29, $30, false),
|
43579
|
+
return $43($ParseState($29, $30, false), identity32);
|
43433
43580
|
});
|
43434
43581
|
},
|
43435
|
-
(state2, a) => $25((v2$3) => $43(state2,
|
43582
|
+
(state2, a) => $25((v2$3) => $43(state2, identity32))
|
43436
43583
|
)));
|
43437
43584
|
});
|
43438
43585
|
},
|
@@ -43473,10 +43620,10 @@ var expr_$lazy = /* @__PURE__ */ binding(() => {
|
|
43473
43620
|
if ($45) {
|
43474
43621
|
return $40($ParseState(v4$4._1, v4$4._2, false), $44);
|
43475
43622
|
}
|
43476
|
-
return $41($ParseState($29, $30, false),
|
43623
|
+
return $41($ParseState($29, $30, false), identity32);
|
43477
43624
|
});
|
43478
43625
|
},
|
43479
|
-
(state2, a) => $25((v2$3) => $41(state2,
|
43626
|
+
(state2, a) => $25((v2$3) => $41(state2, identity32))
|
43480
43627
|
)));
|
43481
43628
|
});
|
43482
43629
|
},
|
@@ -43820,78 +43967,23 @@ var expr_$lazy = /* @__PURE__ */ binding(() => {
|
|
43820
43967
|
return go;
|
43821
43968
|
});
|
43822
43969
|
var expr_ = /* @__PURE__ */ expr_$lazy();
|
43823
|
-
var module_ = /* @__PURE__ */ (() => {
|
43824
|
-
const $0 =
|
43825
|
-
|
43826
|
-
return (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => $02(
|
43827
|
-
state1,
|
43828
|
-
more,
|
43829
|
-
lift12,
|
43830
|
-
$$throw2,
|
43831
|
-
(state2, a) => more((v2$1) => more((v3) => token.semi(state2, more, lift12, $$throw2, (state3, a$1) => more((v4) => done(state3, a)))))
|
43832
|
-
)));
|
43833
|
-
})());
|
43834
|
-
return (state1, more, lift12, $$throw2, done) => more((v1) => $0(
|
43970
|
+
var module_ = /* @__PURE__ */ withImports(/* @__PURE__ */ (() => {
|
43971
|
+
const $0 = sepBy_try(defs(expr_))(token.semi);
|
43972
|
+
return (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => more((v1$1) => $0(
|
43835
43973
|
state1,
|
43836
43974
|
more,
|
43837
43975
|
lift12,
|
43838
43976
|
$$throw2,
|
43839
|
-
(state2, a) => more((v2) =>
|
43840
|
-
|
43841
|
-
|
43842
|
-
|
43843
|
-
|
43844
|
-
|
43845
|
-
var AtIndex = (value0) => (value1) => $JsonDecodeError("AtIndex", value0, value1);
|
43846
|
-
var AtKey = (value0) => (value1) => $JsonDecodeError("AtKey", value0, value1);
|
43847
|
-
var Named = (value0) => (value1) => $JsonDecodeError("Named", value0, value1);
|
43848
|
-
var MissingValue = /* @__PURE__ */ $JsonDecodeError("MissingValue");
|
43849
|
-
var showJsonDecodeError = {
|
43850
|
-
show: (v) => {
|
43851
|
-
if (v.tag === "TypeMismatch") {
|
43852
|
-
return "(TypeMismatch " + showStringImpl(v._1) + ")";
|
43853
|
-
}
|
43854
|
-
if (v.tag === "UnexpectedValue") {
|
43855
|
-
return "(UnexpectedValue " + stringify(v._1) + ")";
|
43856
|
-
}
|
43857
|
-
if (v.tag === "AtIndex") {
|
43858
|
-
return "(AtIndex " + showIntImpl(v._1) + " " + showJsonDecodeError.show(v._2) + ")";
|
43859
|
-
}
|
43860
|
-
if (v.tag === "AtKey") {
|
43861
|
-
return "(AtKey " + showStringImpl(v._1) + " " + showJsonDecodeError.show(v._2) + ")";
|
43862
|
-
}
|
43863
|
-
if (v.tag === "Named") {
|
43864
|
-
return "(Named " + showStringImpl(v._1) + " " + showJsonDecodeError.show(v._2) + ")";
|
43865
|
-
}
|
43866
|
-
if (v.tag === "MissingValue") {
|
43867
|
-
return "MissingValue";
|
43868
|
-
}
|
43869
|
-
fail();
|
43870
|
-
}
|
43871
|
-
};
|
43872
|
-
|
43873
|
-
// output-es/Data.Argonaut.Decode.Parser/index.js
|
43874
|
-
var parseJson = (x2) => {
|
43875
|
-
const $0 = _jsonParser(Left, Right, x2);
|
43876
|
-
if ($0.tag === "Left") {
|
43877
|
-
return $Either("Left", $JsonDecodeError("TypeMismatch", "JSON"));
|
43878
|
-
}
|
43879
|
-
if ($0.tag === "Right") {
|
43880
|
-
return $Either("Right", $0._1);
|
43881
|
-
}
|
43882
|
-
fail();
|
43883
|
-
};
|
43977
|
+
(state2, a) => more((v2$1) => {
|
43978
|
+
const $1 = $Module(bindList.bind(a)(identity13));
|
43979
|
+
return more((v2$2) => more((v3) => token.semi(state2, more, lift12, $$throw2, (state3, a$1) => more((v4) => done(state3, $1)))));
|
43980
|
+
})
|
43981
|
+
))));
|
43982
|
+
})());
|
43884
43983
|
|
43885
43984
|
// output-es/Primitive.Defs/index.js
|
43886
43985
|
var foldM4 = (dictMonad) => (f) => (b0) => foldableDict.foldl((b) => (a) => dictMonad.Bind1().bind(b)((a$1) => f(a$1)(a)))(dictMonad.Applicative0().pure(b0));
|
43887
43986
|
var disjointUnion3 = /* @__PURE__ */ disjointUnion(mapDictString);
|
43888
|
-
var fromFoldable21 = /* @__PURE__ */ foldlArray((m) => (a) => insert3(ordVertex)(a)()(m))(Leaf2);
|
43889
|
-
var pretty = /* @__PURE__ */ (() => prettyVal(highlightableVertex).pretty)();
|
43890
|
-
var toUnfoldable16 = /* @__PURE__ */ (() => {
|
43891
|
-
const $0 = toArrayWithKey(Tuple);
|
43892
|
-
return (x2) => toUnfoldable(unfoldableArray)($0(x2));
|
43893
|
-
})();
|
43894
|
-
var fromFoldable112 = /* @__PURE__ */ fromFoldable(foldableArray);
|
43895
43987
|
var unary2 = /* @__PURE__ */ unary(boundedJoinSemilatticeUni);
|
43896
43988
|
var binary2 = /* @__PURE__ */ binary(boundedJoinSemilatticeUni);
|
43897
43989
|
var binaryZero2 = /* @__PURE__ */ binaryZero(boundedJoinSemilatticeUni);
|
@@ -43916,7 +44008,7 @@ var matrixUpdate = /* @__PURE__ */ $Tuple(
|
|
43916
44008
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
43917
44009
|
return (dictMonadError) => {
|
43918
44010
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
43919
|
-
return (
|
44011
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
43920
44012
|
if (v.tag === "Cons" && v._1._3.tag === "Matrix" && v._2.tag === "Cons" && v._2._1._3.tag === "Constr" && v._2._1._3._2.tag === "Cons" && v._2._1._3._2._1._3.tag === "Int" && v._2._1._3._2._2.tag === "Cons" && v._2._1._3._2._2._1._3.tag === "Int" && v._2._1._3._2._2._2.tag === "Nil" && v._2._2.tag === "Cons" && v._2._2._2.tag === "Nil" && v._2._1._3._1 === "Pair") {
|
43921
44013
|
const $0 = v._2._2._1;
|
43922
44014
|
return $$new((a) => Val(a)(None))($$$Map("Two", Leaf2, v._1._1, void 0, Leaf2))($BaseVal(
|
@@ -43935,12 +44027,12 @@ var matrixLookup = /* @__PURE__ */ $Tuple(
|
|
43935
44027
|
/* @__PURE__ */ $ForeignOp$p({
|
43936
44028
|
arity: 2,
|
43937
44029
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
43938
|
-
const
|
43939
|
-
return (
|
44030
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44031
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
43940
44032
|
if (v.tag === "Cons" && v._1._3.tag === "Matrix" && v._2.tag === "Cons" && v._2._1._3.tag === "Constr" && v._2._1._3._2.tag === "Cons" && v._2._1._3._2._1._3.tag === "Int" && v._2._1._3._2._2.tag === "Cons" && v._2._1._3._2._2._1._3.tag === "Int" && v._2._1._3._2._2._2.tag === "Nil" && v._2._2.tag === "Nil" && v._2._1._3._1 === "Pair") {
|
43941
|
-
return
|
44033
|
+
return MonadThrow0.Monad0().Applicative0().pure(matrixGet(v._2._1._3._2._1._3._1)(v._2._1._3._2._2._1._3._1)(v._1._3._1));
|
43942
44034
|
}
|
43943
|
-
return
|
44035
|
+
return MonadThrow0.throwError(error("Matrix and pair of integers expected"));
|
43944
44036
|
};
|
43945
44037
|
}
|
43946
44038
|
})
|
@@ -43968,12 +44060,12 @@ var error_ = /* @__PURE__ */ $Tuple(
|
|
43968
44060
|
/* @__PURE__ */ $ForeignOp$p({
|
43969
44061
|
arity: 1,
|
43970
44062
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
43971
|
-
const
|
43972
|
-
return (
|
44063
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44064
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
43973
44065
|
if (v.tag === "Cons" && v._1._3.tag === "Str" && v._2.tag === "Nil") {
|
43974
|
-
return
|
44066
|
+
return MonadThrow0.Monad0().Applicative0().pure(throwException(error(v._1._3._1))());
|
43975
44067
|
}
|
43976
|
-
return
|
44068
|
+
return MonadThrow0.throwError(error("String expected"));
|
43977
44069
|
};
|
43978
44070
|
}
|
43979
44071
|
})
|
@@ -43986,28 +44078,26 @@ var dims = /* @__PURE__ */ $Tuple(
|
|
43986
44078
|
op: (dictMonadWithGraphAlloc) => {
|
43987
44079
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
43988
44080
|
return (dictMonadError) => {
|
43989
|
-
const
|
43990
|
-
|
43991
|
-
|
43992
|
-
|
43993
|
-
|
43994
|
-
|
43995
|
-
|
43996
|
-
|
43997
|
-
|
43998
|
-
|
43999
|
-
|
44000
|
-
|
44001
|
-
|
44002
|
-
|
44003
|
-
|
44004
|
-
|
44005
|
-
|
44006
|
-
|
44007
|
-
|
44008
|
-
|
44009
|
-
return $$throw2("Matrix expected");
|
44010
|
-
};
|
44081
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44082
|
+
const $0 = MonadThrow0.Monad0().Bind1();
|
44083
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
44084
|
+
if (v.tag === "Cons" && v._1._3.tag === "Matrix" && v._2.tag === "Nil") {
|
44085
|
+
const $1 = v._1._3._1._2._2._1;
|
44086
|
+
const $2 = v._1._1;
|
44087
|
+
const $3 = v._1._3._1._2._2._2;
|
44088
|
+
return $0.bind($$new((a) => Val(a)(None))($$$Map("Two", Leaf2, v._1._3._1._2._1._2, void 0, Leaf2))($BaseVal(
|
44089
|
+
"Int",
|
44090
|
+
v._1._3._1._2._1._1
|
44091
|
+
)))((v1) => $0.bind($$new((a) => Val(a)(None))($$$Map("Two", Leaf2, $3, void 0, Leaf2))($BaseVal(
|
44092
|
+
"Int",
|
44093
|
+
$1
|
44094
|
+
)))((v2) => $$new((a) => Val(a)(None))($$$Map("Two", Leaf2, $2, void 0, Leaf2))($BaseVal(
|
44095
|
+
"Constr",
|
44096
|
+
"Pair",
|
44097
|
+
$List("Cons", v1, $List("Cons", v2, Nil))
|
44098
|
+
))));
|
44099
|
+
}
|
44100
|
+
return MonadThrow0.throwError(error("Matrix expected"));
|
44011
44101
|
};
|
44012
44102
|
};
|
44013
44103
|
}
|
@@ -44021,29 +44111,27 @@ var dict_map = /* @__PURE__ */ $Tuple(
|
|
44021
44111
|
const apply3 = apply2(dictMonadWithGraphAlloc);
|
44022
44112
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
44023
44113
|
return (dictMonadError) => {
|
44024
|
-
const
|
44025
|
-
|
44026
|
-
|
44027
|
-
|
44028
|
-
|
44029
|
-
|
44030
|
-
|
44031
|
-
|
44032
|
-
|
44033
|
-
|
44034
|
-
|
44035
|
-
|
44036
|
-
|
44037
|
-
|
44038
|
-
|
44039
|
-
|
44040
|
-
|
44041
|
-
|
44042
|
-
|
44043
|
-
|
44044
|
-
|
44045
|
-
return $$throw2("Function and dictionary expected");
|
44046
|
-
};
|
44114
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44115
|
+
const Monad0 = MonadThrow0.Monad0();
|
44116
|
+
const Bind1 = Monad0.Bind1();
|
44117
|
+
const traverse1 = traversableDict.traverse(Monad0.Applicative0());
|
44118
|
+
return (dictMonadReader) => {
|
44119
|
+
const apply1 = apply3(dictMonadReader);
|
44120
|
+
return (dictLoadFile) => {
|
44121
|
+
const apply22 = apply1(dictLoadFile);
|
44122
|
+
return (v) => {
|
44123
|
+
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
44124
|
+
const $0 = v._1;
|
44125
|
+
const $1 = v._2._1._1;
|
44126
|
+
return Bind1.bind(traverse1((v2) => {
|
44127
|
+
const $2 = v2._1;
|
44128
|
+
return Bind1.Apply0().Functor0().map((v3) => $Tuple($2, v3))(apply22($0)(v2._2));
|
44129
|
+
})(v._2._1._3._1))((d$p) => $$new((a) => Val(a)(None))($$$Map("Two", Leaf2, $1, void 0, Leaf2))($BaseVal(
|
44130
|
+
"Dictionary",
|
44131
|
+
d$p
|
44132
|
+
)));
|
44133
|
+
}
|
44134
|
+
return MonadThrow0.throwError(error("Function and dictionary expected"));
|
44047
44135
|
};
|
44048
44136
|
};
|
44049
44137
|
};
|
@@ -44059,42 +44147,40 @@ var dict_intersectionWith = /* @__PURE__ */ $Tuple(
|
|
44059
44147
|
const apply3 = apply2(dictMonadWithGraphAlloc);
|
44060
44148
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
44061
44149
|
return (dictMonadError) => {
|
44062
|
-
const
|
44063
|
-
|
44064
|
-
|
44065
|
-
|
44066
|
-
|
44067
|
-
|
44068
|
-
|
44069
|
-
|
44070
|
-
|
44071
|
-
|
44072
|
-
|
44073
|
-
|
44074
|
-
|
44075
|
-
|
44076
|
-
|
44077
|
-
|
44078
|
-
|
44079
|
-
|
44080
|
-
|
44081
|
-
return Bind1.bind(Bind1.bind(apply22($1)(v2._2))((a) => apply22(a)($4)))((v4) => Bind1.bind($$new((a) => Val(a)(None))(insert3(ordVertex)($6)()($$$Map(
|
44082
|
-
"Two",
|
44083
|
-
Leaf2,
|
44084
|
-
$5,
|
44085
|
-
void 0,
|
44086
|
-
Leaf2
|
44087
|
-
)))(v4._3))((v5) => Applicative0.pure($Tuple(v5._1, v4))));
|
44088
|
-
})(v._2._1._3._1)(v._2._2._1._3._1)))))((v$p) => $$new((a) => Val(a)(None))(insert3(ordVertex)($3)()($$$Map(
|
44150
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44151
|
+
const Monad0 = MonadThrow0.Monad0();
|
44152
|
+
const Bind1 = Monad0.Bind1();
|
44153
|
+
const Applicative0 = Monad0.Applicative0();
|
44154
|
+
const $0 = Bind1.Apply0().Functor0();
|
44155
|
+
return (dictMonadReader) => {
|
44156
|
+
const apply1 = apply3(dictMonadReader);
|
44157
|
+
return (dictLoadFile) => {
|
44158
|
+
const apply22 = apply1(dictLoadFile);
|
44159
|
+
return (v) => {
|
44160
|
+
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Cons" && v._2._2._1._3.tag === "Dictionary" && v._2._2._2.tag === "Nil") {
|
44161
|
+
const $1 = v._1;
|
44162
|
+
const $2 = v._2._1._1;
|
44163
|
+
const $3 = v._2._2._1._1;
|
44164
|
+
return Bind1.bind($0.map(Dictionary3)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity20)(intersectionWith_Object((v2) => (v3) => {
|
44165
|
+
const $4 = v3._2;
|
44166
|
+
const $5 = v2._1;
|
44167
|
+
const $6 = v3._1;
|
44168
|
+
return Bind1.bind(Bind1.bind(apply22($1)(v2._2))((a) => apply22(a)($4)))((v4) => Bind1.bind($$new((a) => Val(a)(None))(insert3(ordVertex)($6)()($$$Map(
|
44089
44169
|
"Two",
|
44090
44170
|
Leaf2,
|
44091
|
-
$
|
44171
|
+
$5,
|
44092
44172
|
void 0,
|
44093
44173
|
Leaf2
|
44094
|
-
)))(
|
44095
|
-
}
|
44096
|
-
|
44097
|
-
|
44174
|
+
)))(v4._3))((v5) => Applicative0.pure($Tuple(v5._1, v4))));
|
44175
|
+
})(v._2._1._3._1)(v._2._2._1._3._1)))))((v$p) => $$new((a) => Val(a)(None))(insert3(ordVertex)($3)()($$$Map(
|
44176
|
+
"Two",
|
44177
|
+
Leaf2,
|
44178
|
+
$2,
|
44179
|
+
void 0,
|
44180
|
+
Leaf2
|
44181
|
+
)))(v$p));
|
44182
|
+
}
|
44183
|
+
return MonadThrow0.throwError(error("Function and two dictionaries expected"));
|
44098
44184
|
};
|
44099
44185
|
};
|
44100
44186
|
};
|
@@ -44108,7 +44194,7 @@ var dict_get = /* @__PURE__ */ $Tuple(
|
|
44108
44194
|
arity: 2,
|
44109
44195
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
44110
44196
|
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44111
|
-
return (
|
44197
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
44112
44198
|
if (v.tag === "Cons" && v._1._3.tag === "Str" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
44113
44199
|
return orElse(MonadThrow0)('Key "' + v._1._3._1 + '" not found')((() => {
|
44114
44200
|
const $0 = _lookup(Nothing, Just, v._1._3._1, v._2._1._3._1);
|
@@ -44130,23 +44216,21 @@ var dict_foldl = /* @__PURE__ */ $Tuple(
|
|
44130
44216
|
op: (dictMonadWithGraphAlloc) => {
|
44131
44217
|
const apply3 = apply2(dictMonadWithGraphAlloc);
|
44132
44218
|
return (dictMonadError) => {
|
44133
|
-
const
|
44134
|
-
|
44135
|
-
|
44136
|
-
|
44137
|
-
|
44138
|
-
|
44139
|
-
|
44140
|
-
|
44141
|
-
|
44142
|
-
|
44143
|
-
|
44144
|
-
|
44145
|
-
|
44146
|
-
|
44147
|
-
|
44148
|
-
return $$throw2("Function, value and dictionary expected");
|
44149
|
-
};
|
44219
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44220
|
+
const Monad0 = MonadThrow0.Monad0();
|
44221
|
+
return (dictMonadReader) => {
|
44222
|
+
const apply1 = apply3(dictMonadReader);
|
44223
|
+
return (dictLoadFile) => {
|
44224
|
+
const apply22 = apply1(dictLoadFile);
|
44225
|
+
return (v) => {
|
44226
|
+
if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Cons" && v._2._2._1._3.tag === "Dictionary" && v._2._2._2.tag === "Nil") {
|
44227
|
+
const $0 = v._1;
|
44228
|
+
return foldM4(Monad0)((u1) => (v2) => {
|
44229
|
+
const $1 = v2._2;
|
44230
|
+
return Monad0.Bind1().bind(apply22($0)(u1))((a) => apply22(a)($1));
|
44231
|
+
})(v._2._1)(v._2._2._1._3._1);
|
44232
|
+
}
|
44233
|
+
return MonadThrow0.throwError(error("Function, value and dictionary expected"));
|
44150
44234
|
};
|
44151
44235
|
};
|
44152
44236
|
};
|
@@ -44162,7 +44246,7 @@ var dict_disjointUnion = /* @__PURE__ */ $Tuple(
|
|
44162
44246
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
44163
44247
|
return (dictMonadError) => {
|
44164
44248
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
44165
|
-
return (
|
44249
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
44166
44250
|
if (v.tag === "Cons" && v._1._3.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
44167
44251
|
return $$new((a) => Val(a)(None))(insert3(ordVertex)(v._2._1._1)()($$$Map(
|
44168
44252
|
"Two",
|
@@ -44186,7 +44270,7 @@ var dict_difference = /* @__PURE__ */ $Tuple(
|
|
44186
44270
|
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
44187
44271
|
return (dictMonadError) => {
|
44188
44272
|
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
44189
|
-
return (
|
44273
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
44190
44274
|
if (v.tag === "Cons" && v._1._3.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
|
44191
44275
|
return $$new((a) => Val(a)(None))(insert3(ordVertex)(v._2._1._1)()($$$Map(
|
44192
44276
|
"Two",
|
@@ -44207,103 +44291,18 @@ var debugLog = /* @__PURE__ */ $Tuple(
|
|
44207
44291
|
/* @__PURE__ */ $ForeignOp$p({
|
44208
44292
|
arity: 1,
|
44209
44293
|
op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
|
44210
|
-
const
|
44211
|
-
return (
|
44294
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
44295
|
+
return (dictMonadReader) => (dictLoadFile) => (v) => {
|
44212
44296
|
if (v.tag === "Cons" && v._2.tag === "Nil") {
|
44213
44297
|
const $0 = v._1;
|
44214
|
-
return
|
44298
|
+
return MonadThrow0.Monad0().Applicative0().pure(_trace($0, (v$1) => $0));
|
44215
44299
|
}
|
44216
|
-
return
|
44300
|
+
return MonadThrow0.throwError(error("Single value expected"));
|
44217
44301
|
};
|
44218
44302
|
}
|
44219
44303
|
})
|
44220
44304
|
);
|
44221
|
-
var
|
44222
|
-
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
44223
|
-
return (v) => {
|
44224
|
-
if (v.tag === "Nil") {
|
44225
|
-
return $$new((a) => Val(a)(None))(Leaf2)($BaseVal("Constr", "Nil", Nil));
|
44226
|
-
}
|
44227
|
-
if (v.tag === "Cons") {
|
44228
|
-
const $0 = v._1;
|
44229
|
-
return dictMonadWithGraphAlloc.MonadWithGraph2().Monad0().Bind1().bind(arrVtoVal$p(dictMonadWithGraphAlloc)(v._2))((tailV) => $$new((a) => Val(a)(None))(fromFoldable21([
|
44230
|
-
$0._1,
|
44231
|
-
tailV._1
|
44232
|
-
]))($BaseVal("Constr", ":", $List("Cons", $0, $List("Cons", tailV, Nil)))));
|
44233
|
-
}
|
44234
|
-
fail();
|
44235
|
-
};
|
44236
|
-
};
|
44237
|
-
var fromJsonVal$p = (dictMonadWithGraphAlloc) => {
|
44238
|
-
const $$throw2 = $$throw(dictMonadWithGraphAlloc.MonadError1().MonadThrow0());
|
44239
|
-
const Monad0 = dictMonadWithGraphAlloc.MonadWithGraph2().Monad0();
|
44240
|
-
const $0 = Monad0.Bind1();
|
44241
|
-
const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
|
44242
|
-
const Applicative0 = Monad0.Applicative0();
|
44243
|
-
const traverse2 = traversableArray.traverse(Applicative0);
|
44244
|
-
const arrVtoVal$p1 = arrVtoVal$p(dictMonadWithGraphAlloc);
|
44245
|
-
return caseJson((v) => $$throw2("Error, Null JSON value cannot be converted to Val Vertex"))((b) => $0.bind($$new((a) => Val(a)(None))(Leaf2)($BaseVal(
|
44246
|
-
"Constr",
|
44247
|
-
b ? "True" : "False",
|
44248
|
-
Nil
|
44249
|
-
)))((v) => Applicative0.pure(spyWhen(true)("Processing boolean")((x2) => intercalate4("\n")(pretty(x2).lines))(v))))((n) => $0.bind((() => {
|
44250
|
-
const v = fromNumber(n);
|
44251
|
-
if (v.tag === "Just") {
|
44252
|
-
return $$new((a) => Val(a)(None))(Leaf2)($BaseVal("Int", v._1));
|
44253
|
-
}
|
44254
|
-
if (v.tag === "Nothing") {
|
44255
|
-
return $$new((a) => Val(a)(None))(Leaf2)($BaseVal("Float", n));
|
44256
|
-
}
|
44257
|
-
fail();
|
44258
|
-
})())((v) => Applicative0.pure(spyWhen(true)("Processing number")((x2) => intercalate4("\n")(pretty(x2).lines))(v))))((s) => $0.bind($$new((a) => Val(a)(None))(Leaf2)($BaseVal(
|
44259
|
-
"Str",
|
44260
|
-
s
|
44261
|
-
)))((v) => Applicative0.pure(spyWhen(true)("Processing string")((x2) => intercalate4("\n")(pretty(x2).lines))(v))))((arr) => $0.bind(traverse2(fromJsonVal$p(dictMonadWithGraphAlloc))(arr))((vs) => $0.bind(arrVtoVal$p1(toUnfoldable(unfoldableList)(vs)))((v) => Applicative0.pure(spyWhen(true)("Processing array")((x2) => intercalate4("\n")(pretty(x2).lines))(v)))))((obj) => $0.bind(traverse2((v) => {
|
44262
|
-
const $1 = v._1;
|
44263
|
-
return $0.bind(fromJsonVal$p(dictMonadWithGraphAlloc)(v._2))((vv) => Applicative0.pure($Tuple($1, $Tuple(vv._1, vv))));
|
44264
|
-
})(toUnfoldable16(obj)))((entries) => $0.bind($$new((a) => Val(a)(None))(fromFoldable21(arrayMap((v) => v._2._1)(entries)))($BaseVal(
|
44265
|
-
"Dictionary",
|
44266
|
-
fromFoldable112(entries)
|
44267
|
-
)))((v) => Applicative0.pure(spyWhen(true)("Processing object")((x2) => intercalate4("\n")(pretty(x2).lines))(v)))));
|
44268
|
-
};
|
44269
|
-
var loadJson = /* @__PURE__ */ $Tuple(
|
44270
|
-
"loadJson",
|
44271
|
-
/* @__PURE__ */ $ForeignOp$p({
|
44272
|
-
arity: 1,
|
44273
|
-
op: (dictMonadWithGraphAlloc) => {
|
44274
|
-
const fromJsonVal$p1 = fromJsonVal$p(dictMonadWithGraphAlloc);
|
44275
|
-
return (dictMonadError) => {
|
44276
|
-
const $$throw2 = $$throw(dictMonadError.MonadThrow0());
|
44277
|
-
return (dictMonadAff) => {
|
44278
|
-
const $0 = dictMonadAff.MonadEffect0().Monad0().Bind1();
|
44279
|
-
return (dictMonadReader) => {
|
44280
|
-
const ask = dictMonadReader.MonadAsk0().ask;
|
44281
|
-
return (dictLoadFile) => {
|
44282
|
-
const loadFile = dictLoadFile.loadFile(dictMonadError)(dictMonadAff);
|
44283
|
-
return (v) => {
|
44284
|
-
if (v.tag === "Cons" && v._1._3.tag === "Str" && v._2.tag === "Nil") {
|
44285
|
-
const $1 = v._1._3._1;
|
44286
|
-
return $0.bind(ask)((v1) => $0.bind(loadFile(v1.fluidSrcPaths)($1))((str) => {
|
44287
|
-
const v2 = parseJson(str);
|
44288
|
-
if (v2.tag === "Left") {
|
44289
|
-
return $$throw2("Failed to parse JSON: " + showJsonDecodeError.show(v2._1));
|
44290
|
-
}
|
44291
|
-
if (v2.tag === "Right") {
|
44292
|
-
return fromJsonVal$p1(v2._1);
|
44293
|
-
}
|
44294
|
-
fail();
|
44295
|
-
}));
|
44296
|
-
}
|
44297
|
-
return $$throw2("String expected");
|
44298
|
-
};
|
44299
|
-
};
|
44300
|
-
};
|
44301
|
-
};
|
44302
|
-
};
|
44303
|
-
}
|
44304
|
-
})
|
44305
|
-
);
|
44306
|
-
var primitives = /* @__PURE__ */ fromFoldable112([
|
44305
|
+
var primitives = /* @__PURE__ */ fromFoldable(foldableArray)([
|
44307
44306
|
/* @__PURE__ */ $Tuple(
|
44308
44307
|
":",
|
44309
44308
|
/* @__PURE__ */ $Val(void 0, None, /* @__PURE__ */ $BaseVal("Fun", /* @__PURE__ */ $Fun("PartialConstr", ":", Nil)))
|
@@ -44312,7 +44311,6 @@ var primitives = /* @__PURE__ */ fromFoldable112([
|
|
44312
44311
|
/* @__PURE__ */ extern1(debugLog),
|
44313
44312
|
/* @__PURE__ */ extern1(dims),
|
44314
44313
|
/* @__PURE__ */ extern1(error_),
|
44315
|
-
/* @__PURE__ */ extern1(loadJson),
|
44316
44314
|
/* @__PURE__ */ unary2("floor")({ i: number5, o: $$int, fwd: floor2 }),
|
44317
44315
|
/* @__PURE__ */ unary2("log")({ i: intOrNumber, o: number5, fwd: log3 }),
|
44318
44316
|
/* @__PURE__ */ unary2("numToStr")({ i: intOrNumber, o: string2, fwd: numToStr }),
|
@@ -44384,7 +44382,7 @@ var unions4 = /* @__PURE__ */ (() => {
|
|
44384
44382
|
};
|
44385
44383
|
return go(Leaf2);
|
44386
44384
|
})();
|
44387
|
-
var
|
44385
|
+
var identity33 = (x2) => x2;
|
44388
44386
|
var verticesProgCxtVertex = {
|
44389
44387
|
vertices: (v) => union7(unions13(listMap(verticesValVertex.vertices)(mapObjectString.values(v.primitives))))(union7(unions4(listMap(verticesModuleVertex.vertices)(v.mods)))(unions4(listMap((x2) => verticesExprVertex.vertices(x2._2))(v.datasets))))
|
44390
44388
|
};
|
@@ -44461,13 +44459,47 @@ var traversableProgCxt = {
|
|
44461
44459
|
const traverse9 = traversableEnv.traverse(dictApplicative);
|
44462
44460
|
return (f) => (m) => Apply0.apply(Apply0.apply(Apply0.Functor0().map((v1) => (v2) => (v3) => ({ primitives: v3, mods: v2, datasets: v1 }))(traverse5(traversableTuple.traverse(dictApplicative)(traverse7(f)))(m.datasets)))(traverse5(traverse8(f))(m.mods)))(traverse9(f)(m.primitives));
|
44463
44461
|
},
|
44464
|
-
sequence: (dictApplicative) => (v) => traversableProgCxt.traverse(dictApplicative)(
|
44462
|
+
sequence: (dictApplicative) => (v) => traversableProgCxt.traverse(dictApplicative)(identity33)(v),
|
44465
44463
|
Functor0: () => functorProgCxt,
|
44466
44464
|
Foldable1: () => foldableProgCxt
|
44467
44465
|
};
|
44468
44466
|
|
44469
44467
|
// output-es/Module/index.js
|
44468
|
+
var all3 = /* @__PURE__ */ (() => foldableList.foldMap((() => {
|
44469
|
+
const semigroupConj1 = { append: (v) => (v1) => v && v1 };
|
44470
|
+
return { mempty: true, Semigroup0: () => semigroupConj1 };
|
44471
|
+
})()))();
|
44472
|
+
var elem2 = /* @__PURE__ */ (() => {
|
44473
|
+
const any1 = foldableList.foldMap((() => {
|
44474
|
+
const semigroupDisj1 = { append: (v) => (v1) => v || v1 };
|
44475
|
+
return { mempty: false, Semigroup0: () => semigroupDisj1 };
|
44476
|
+
})());
|
44477
|
+
return (x2) => any1(($0) => x2 === $0);
|
44478
|
+
})();
|
44479
|
+
var fromFoldable21 = /* @__PURE__ */ (() => foldableSet.foldr(Cons)(Nil))();
|
44470
44480
|
var boundedLattice2 = { BoundedJoinSemilattice0: () => boundedJoinSemilatticeUni, BoundedMeetSemilattice1: () => boundedMeetSemilatticeUni };
|
44481
|
+
var unions5 = /* @__PURE__ */ (() => {
|
44482
|
+
const go = (go$a0$copy) => (go$a1$copy) => {
|
44483
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
44484
|
+
while (go$c) {
|
44485
|
+
const b = go$a0, v = go$a1;
|
44486
|
+
if (v.tag === "Nil") {
|
44487
|
+
go$c = false;
|
44488
|
+
go$r = b;
|
44489
|
+
continue;
|
44490
|
+
}
|
44491
|
+
if (v.tag === "Cons") {
|
44492
|
+
go$a0 = unionWith2(ordDVertex$p)($$const)(b)(v._1);
|
44493
|
+
go$a1 = v._2;
|
44494
|
+
continue;
|
44495
|
+
}
|
44496
|
+
fail();
|
44497
|
+
}
|
44498
|
+
return go$r;
|
44499
|
+
};
|
44500
|
+
return go(Leaf2);
|
44501
|
+
})();
|
44502
|
+
var union8 = /* @__PURE__ */ (() => setSet(ordDVertex$p).union)();
|
44471
44503
|
var concatM2 = (dictMonad) => foldrArray((() => {
|
44472
44504
|
const $0 = dictMonad.Bind1();
|
44473
44505
|
return (f) => (g) => (a) => $0.bind(f(a))(g);
|
@@ -44489,76 +44521,146 @@ var parse = (dictMonadError) => {
|
|
44489
44521
|
};
|
44490
44522
|
};
|
44491
44523
|
};
|
44492
|
-
var
|
44493
|
-
const $0 = parse(dictMonadError);
|
44494
|
-
return (a) => $0(a)(topLevel(expr_));
|
44495
|
-
})());
|
44496
|
-
var module_2 = (dictMonadAff) => {
|
44524
|
+
var loadModuleGraph = (dictMonadAff) => {
|
44497
44525
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
44498
|
-
const
|
44499
|
-
const
|
44526
|
+
const $0 = Monad0.Bind1();
|
44527
|
+
const $1 = Monad0.Applicative0();
|
44500
44528
|
return (dictMonadError) => {
|
44501
44529
|
const parse1 = parse(dictMonadError);
|
44502
44530
|
const desugarModuleFwd = moduleFwd(dictMonadError)(boundedLattice2);
|
44503
|
-
return (
|
44504
|
-
const
|
44505
|
-
return (
|
44506
|
-
const
|
44507
|
-
return
|
44508
|
-
|
44509
|
-
|
44510
|
-
|
44511
|
-
|
44531
|
+
return (dictMonadReader) => {
|
44532
|
+
const ask = dictMonadReader.MonadAsk0().ask;
|
44533
|
+
return (dictLoadFile) => {
|
44534
|
+
const loadFile2 = loadFile(dictLoadFile)(Monad0)(dictMonadError)(dictMonadAff);
|
44535
|
+
return (roots) => {
|
44536
|
+
const collectModules = (visited) => (graph) => (modules) => (imports) => {
|
44537
|
+
if (imports.tag === "Nil") {
|
44538
|
+
return $1.pure($Tuple(graph, modules));
|
44539
|
+
}
|
44540
|
+
if (imports.tag === "Cons") {
|
44541
|
+
if ((() => {
|
44542
|
+
const $2 = lookup2(ordString)(imports._1)(visited);
|
44543
|
+
if ($2.tag === "Nothing") {
|
44544
|
+
return false;
|
44545
|
+
}
|
44546
|
+
if ($2.tag === "Just") {
|
44547
|
+
return true;
|
44548
|
+
}
|
44549
|
+
fail();
|
44550
|
+
})()) {
|
44551
|
+
return collectModules(visited)(graph)(modules)(imports._2);
|
44552
|
+
}
|
44553
|
+
return $0.bind($0.bind(ask)((v) => $0.bind(loadFile2(v.fluidSrcPaths)(imports._1 + ".fld"))((src) => $0.bind(parse1(src)(module_))((v1) => {
|
44554
|
+
const $2 = v1._2;
|
44555
|
+
return $0.bind(desugarModuleFwd(v1._1))((mod$p) => $1.pure($Tuple(
|
44556
|
+
mod$p,
|
44557
|
+
imports._1 === "lib/prelude" ? $2 : $List("Cons", "lib/prelude", $2)
|
44558
|
+
)));
|
44559
|
+
}))))((v) => collectModules(insert3(ordString)(imports._1)()(visited))(insert3(ordString)(imports._1)(v._2)(graph))(insert3(ordString)(imports._1)(v._1)(modules))(foldableList.foldr(Cons)(imports._2)(v._2)));
|
44560
|
+
}
|
44561
|
+
fail();
|
44562
|
+
};
|
44563
|
+
return $0.bind(collectModules(Leaf2)(Leaf2)(Leaf2)(roots))((v) => {
|
44564
|
+
const $2 = v._1;
|
44565
|
+
return $1.pure({
|
44566
|
+
roots,
|
44567
|
+
topsorted: (() => {
|
44568
|
+
const go = (go$a0$copy) => (go$a1$copy) => {
|
44569
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
44570
|
+
while (go$c) {
|
44571
|
+
const v$1 = go$a0, v1 = go$a1;
|
44572
|
+
if (v$1.tag === "Nil") {
|
44573
|
+
go$c = false;
|
44574
|
+
go$r = reverse2(v1);
|
44575
|
+
continue;
|
44576
|
+
}
|
44577
|
+
const v2 = find(foldableList)((mod) => {
|
44578
|
+
const v22 = lookup2(ordString)(mod)($2);
|
44579
|
+
if (v22.tag === "Nothing") {
|
44580
|
+
return true;
|
44581
|
+
}
|
44582
|
+
if (v22.tag === "Just") {
|
44583
|
+
return all3((dep) => !elem2(dep)(v$1))(v22._1);
|
44584
|
+
}
|
44585
|
+
fail();
|
44586
|
+
})(v$1);
|
44587
|
+
if (v2.tag === "Nothing") {
|
44588
|
+
go$c = false;
|
44589
|
+
go$r = throwException(error("Modules contain circular imports"))();
|
44590
|
+
continue;
|
44591
|
+
}
|
44592
|
+
if (v2.tag === "Just") {
|
44593
|
+
go$a0 = deleteBy2(eqStringImpl)(v2._1)(v$1);
|
44594
|
+
go$a1 = $List("Cons", v2._1, v1);
|
44595
|
+
continue;
|
44596
|
+
}
|
44597
|
+
fail();
|
44598
|
+
}
|
44599
|
+
return go$r;
|
44600
|
+
};
|
44601
|
+
return go(fromFoldable21(functorMap.map((v$1) => {
|
44602
|
+
})($2)))(Nil);
|
44603
|
+
})(),
|
44604
|
+
graph: $2,
|
44605
|
+
modules: v._2
|
44606
|
+
});
|
44607
|
+
});
|
44608
|
+
};
|
44512
44609
|
};
|
44513
44610
|
};
|
44514
44611
|
};
|
44515
44612
|
};
|
44516
44613
|
var initialConfig = (dictMonadAff) => {
|
44517
44614
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
44518
|
-
const
|
44519
|
-
const
|
44520
|
-
const
|
44521
|
-
const fresh1 = $
|
44522
|
-
const
|
44523
|
-
const
|
44615
|
+
const $0 = bindStateT(Monad0);
|
44616
|
+
const $1 = monadAllocAllocT(Monad0);
|
44617
|
+
const Applicative0 = $1.Monad0().Applicative0();
|
44618
|
+
const fresh1 = $1.fresh;
|
44619
|
+
const alloc1 = traversableProgCxt.traverse(Applicative0)((v) => fresh1);
|
44620
|
+
const applicativeStateT2 = applicativeStateT(Monad0);
|
44621
|
+
const traverse1 = traversableMap.traverse(applicativeStateT2);
|
44622
|
+
const alloc2 = traversableModule.traverse(Applicative0)((v) => fresh1);
|
44524
44623
|
const runWithGraphT_spy2 = runWithGraphT_spy({
|
44525
44624
|
Applicative0: () => applicativeStateT(Monad0),
|
44526
44625
|
Bind1: () => bindStateT(Monad0)
|
44527
44626
|
})(graphGraphImpl);
|
44528
|
-
const
|
44529
|
-
const monadAffState1 = monadAffState(monadAffState2);
|
44530
|
-
const $2 = monadAffState2.MonadEffect0().Monad0();
|
44627
|
+
const $2 = monadAffState(dictMonadAff).MonadEffect0().Monad0();
|
44531
44628
|
const $3 = dictMonadAff.MonadEffect0().Monad0();
|
44532
44629
|
return (dictMonadError) => {
|
44533
44630
|
const eval_progCxt2 = eval_progCxt(monadWithGraphAllocWithGr(dictMonadError));
|
44534
44631
|
return (dictMonadReader) => {
|
44535
|
-
const eval_progCxt1 = eval_progCxt2(monadReaderStateT(monadReaderStateT(dictMonadReader)))
|
44632
|
+
const eval_progCxt1 = eval_progCxt2(monadReaderStateT(monadReaderStateT(dictMonadReader)));
|
44536
44633
|
return (dictLoadFile) => {
|
44537
44634
|
const eval_progCxt22 = eval_progCxt1((() => {
|
44538
|
-
const
|
44635
|
+
const loadFileFromPath1 = dictLoadFile.loadFileFromPath(dictMonadError)(dictMonadAff);
|
44539
44636
|
return {
|
44540
|
-
|
44541
|
-
const $4 =
|
44542
|
-
return (
|
44543
|
-
|
44544
|
-
|
44545
|
-
|
44546
|
-
s
|
44547
|
-
)));
|
44548
|
-
};
|
44637
|
+
loadFileFromPath: (dictMonadError1) => (dictMonadAff1) => (x2) => {
|
44638
|
+
const $4 = loadFileFromPath1(x2);
|
44639
|
+
return (s) => $2.Bind1().bind((s$1) => $3.Bind1().bind($4)((x$1) => $3.Applicative0().pure($Tuple(x$1, s$1))))((x$1) => $2.Applicative0().pure($Tuple(
|
44640
|
+
x$1,
|
44641
|
+
s
|
44642
|
+
)));
|
44549
44643
|
}
|
44550
44644
|
};
|
44551
44645
|
})());
|
44552
|
-
return (dictFV) => (e) => (progCxt) =>
|
44646
|
+
return (dictFV) => (e) => (progCxt) => (moduleCxt) => Monad0.Bind1().bind(runAllocT(Monad0)($0.bind(alloc1(progCxt))((progCxt$p) => $0.bind(traverse1(alloc2)(moduleCxt.modules))((modules$p) => $0.bind(runWithGraphT_spy2(eval_progCxt22(progCxt$p)({
|
44647
|
+
modules: modules$p,
|
44648
|
+
graph: moduleCxt.graph,
|
44649
|
+
roots: moduleCxt.roots,
|
44650
|
+
topsorted: moduleCxt.topsorted
|
44651
|
+
}))(union8(verticesProgCxtVertex.vertices(progCxt$p))(unions5(listMap(verticesModuleVertex.vertices)(foldableMap.foldr(Cons)(Nil)(modules$p))))))((v) => applicativeStateT2.pure($Tuple(
|
44553
44652
|
progCxt$p,
|
44554
|
-
(
|
44555
|
-
|
44556
|
-
|
44557
|
-
const $
|
44558
|
-
return (
|
44559
|
-
|
44560
|
-
|
44561
|
-
|
44653
|
+
$Tuple(
|
44654
|
+
modules$p,
|
44655
|
+
(() => {
|
44656
|
+
const $4 = dictFV.fv(e);
|
44657
|
+
return filterWithKey((x2) => {
|
44658
|
+
const $5 = setSet(ordString).member(x2)($4);
|
44659
|
+
return (v$1) => $5;
|
44660
|
+
})(v._2);
|
44661
|
+
})()
|
44662
|
+
)
|
44663
|
+
))))))(0))((v) => Monad0.Applicative0().pure({ n: v._1, progCxt: v._2._2._1, "\u03B3": v._2._2._2._2 }));
|
44562
44664
|
};
|
44563
44665
|
};
|
44564
44666
|
};
|
@@ -44566,37 +44668,46 @@ var initialConfig = (dictMonadAff) => {
|
|
44566
44668
|
var prepConfig = (dictMonadAff) => {
|
44567
44669
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
44568
44670
|
const $0 = Monad0.Bind1();
|
44671
|
+
const loadModuleGraph1 = loadModuleGraph(dictMonadAff);
|
44569
44672
|
const initialConfig1 = initialConfig(dictMonadAff);
|
44570
44673
|
return (dictMonadError) => {
|
44674
|
+
const loadModuleGraph2 = loadModuleGraph1(dictMonadError);
|
44571
44675
|
const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
|
44572
44676
|
const initialConfig2 = initialConfig1(dictMonadError);
|
44573
44677
|
return (dictMonadReader) => {
|
44574
|
-
const
|
44678
|
+
const loadModuleGraph3 = loadModuleGraph2(dictMonadReader);
|
44575
44679
|
const initialConfig3 = initialConfig2(dictMonadReader);
|
44576
44680
|
return (dictLoadFile) => {
|
44681
|
+
const loadModuleGraph4 = loadModuleGraph3(dictLoadFile);
|
44577
44682
|
const initialConfig4 = initialConfig3(dictLoadFile)(fVExpr);
|
44578
|
-
return (
|
44579
|
-
|
44580
|
-
e
|
44581
|
-
|
44582
|
-
|
44683
|
+
return (progCxt) => (fluidSrc) => $0.bind(parse(dictMonadError)(fluidSrc)(withImports(expr_)))((v) => {
|
44684
|
+
const $1 = v._1;
|
44685
|
+
return $0.bind(loadModuleGraph4($List("Cons", "lib/prelude", v._2)))((moduleCxt) => $0.bind(desug1($1))((e) => $0.bind(initialConfig4(e)(progCxt)(moduleCxt))((gconfig) => Monad0.Applicative0().pure({
|
44686
|
+
s: $1,
|
44687
|
+
e,
|
44688
|
+
gconfig
|
44689
|
+
}))));
|
44690
|
+
});
|
44583
44691
|
};
|
44584
44692
|
};
|
44585
44693
|
};
|
44586
44694
|
};
|
44587
44695
|
var datasetAs = (dictMonadAff) => {
|
44588
44696
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
44589
|
-
const
|
44697
|
+
const Bind1 = Monad0.Bind1();
|
44590
44698
|
return (dictMonadError) => {
|
44591
44699
|
const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
|
44592
|
-
return (dictLoadFile) =>
|
44593
|
-
const
|
44594
|
-
|
44595
|
-
|
44596
|
-
|
44597
|
-
|
44598
|
-
|
44599
|
-
|
44700
|
+
return (dictLoadFile) => {
|
44701
|
+
const loadFile2 = loadFile(dictLoadFile)(Monad0)(dictMonadError)(dictMonadAff);
|
44702
|
+
return (folders) => (v) => (v1) => {
|
44703
|
+
const $0 = v1.datasets;
|
44704
|
+
const $1 = v._1;
|
44705
|
+
return Bind1.bind(loadFile2(folders)(v._2))((src) => Bind1.bind(Bind1.bind(Bind1.Apply0().Functor0().map(fst)(parse(dictMonadError)(src)(withImports(expr_))))(desug1))((e\u03B1) => Monad0.Applicative0().pure({
|
44706
|
+
primitives: v1.primitives,
|
44707
|
+
mods: v1.mods,
|
44708
|
+
datasets: $List("Cons", $Tuple($1, e\u03B1), $0)
|
44709
|
+
})));
|
44710
|
+
};
|
44600
44711
|
};
|
44601
44712
|
};
|
44602
44713
|
};
|
@@ -44604,21 +44715,18 @@ var loadProgCxt = (dictMonadAff) => {
|
|
44604
44715
|
const Monad0 = dictMonadAff.MonadEffect0().Monad0();
|
44605
44716
|
const $0 = Monad0.Bind1();
|
44606
44717
|
const concatM1 = concatM2(Monad0);
|
44607
|
-
const module_1 = module_2(dictMonadAff);
|
44608
44718
|
const datasetAs1 = datasetAs(dictMonadAff);
|
44609
44719
|
return (dictMonadError) => {
|
44610
|
-
const module_22 = module_1(dictMonadError);
|
44611
44720
|
const datasetAs2 = datasetAs1(dictMonadError);
|
44612
44721
|
return (dictMonadReader) => {
|
44613
44722
|
const ask = dictMonadReader.MonadAsk0().ask;
|
44614
44723
|
return (dictLoadFile) => {
|
44615
|
-
const module_3 = module_22(dictLoadFile);
|
44616
44724
|
const datasetAs3 = datasetAs2(dictLoadFile);
|
44617
|
-
return (
|
44725
|
+
return (datasets) => $0.bind(ask)((v) => $0.bind(Monad0.Applicative0().pure({
|
44618
44726
|
primitives,
|
44619
44727
|
mods: Nil,
|
44620
44728
|
datasets: Nil
|
44621
|
-
}))(concatM1(arrayMap(
|
44729
|
+
}))(concatM1(arrayMap((() => {
|
44622
44730
|
const $1 = datasetAs3(v.fluidSrcPaths);
|
44623
44731
|
return (x2) => $1($Tuple(x2._1, x2._2));
|
44624
44732
|
})())(datasets))));
|
@@ -44632,7 +44740,7 @@ var fromFoldable25 = /* @__PURE__ */ fromFoldable(foldableSet);
|
|
44632
44740
|
var ordVal2 = /* @__PURE__ */ ordVal(ordVertex);
|
44633
44741
|
var botOf2 = /* @__PURE__ */ (() => ({ botOf: functorSelStates.map((v) => false) }))();
|
44634
44742
|
var select\u{1D539}s = /* @__PURE__ */ (() => select\u03B1s\u{1D539}Vertex(applyVal)(foldableVal)["select\u{1D539}s"])();
|
44635
|
-
var
|
44743
|
+
var fromFoldable112 = /* @__PURE__ */ fromFoldable(foldableDict);
|
44636
44744
|
var fromFoldable26 = /* @__PURE__ */ foldlArray((m) => (a) => insert3(ordString)(a)()(m))(Leaf2);
|
44637
44745
|
var graphGC2 = /* @__PURE__ */ graphGC(graphGraphImpl);
|
44638
44746
|
var graphGC1 = /* @__PURE__ */ graphGC2(applyVal)(applyEnvExpr)(foldableVal)(foldableEnvExpr);
|
@@ -44953,7 +45061,7 @@ var selectInput = (x2) => (\u03B4v) => (v) => {
|
|
44953
45061
|
inerts: v.inerts
|
44954
45062
|
};
|
44955
45063
|
};
|
44956
|
-
var rebuild\u03B9 = (inerts) => (\u03B1s) => (\u03B9) =>
|
45064
|
+
var rebuild\u03B9 = (inerts) => (\u03B1s) => (\u03B9) => fromFoldable112(intersectionWith_Object(apply)(_fmapObject(
|
44957
45065
|
_fmapObject(\u03B9, (v) => select\u{1D539}s(v)(inerts)),
|
44958
45066
|
(inert) => (v) => $Tuple(v._1, applyVal.apply(applyVal.apply(functorVal.map(selStates)(inert))(v._2.persistent))(v._2.transient))
|
44959
45067
|
))(_fmapObject(\u03B9, (v) => $Tuple(v._1, { persistent: select\u{1D539}s(v)(\u03B1s.persistent), transient: select\u{1D539}s(v)(\u03B1s.transient) }))));
|
@@ -44983,16 +45091,15 @@ var loadFig = (dictMonadAff) => {
|
|
44983
45091
|
const loadProgCxt3 = loadProgCxt22(dictLoadFile);
|
44984
45092
|
const prepConfig3 = prepConfig22(dictLoadFile);
|
44985
45093
|
const graphEval22 = graphEval1(dictLoadFile)(dictMonadError);
|
44986
|
-
return (v) => {
|
44987
|
-
const $1 = v.
|
44988
|
-
const $2 = v.
|
44989
|
-
|
44990
|
-
|
44991
|
-
const $4 = v1.s;
|
45094
|
+
return (v) => (fluidSrc) => {
|
45095
|
+
const $1 = v.inputs;
|
45096
|
+
const $2 = v.linking;
|
45097
|
+
return $0.bind(loadProgCxt3(v.datasets))((progCxt) => $0.bind(prepConfig3(progCxt)(fluidSrc))((v1) => {
|
45098
|
+
const $3 = v1.s;
|
44992
45099
|
return $0.bind(graphEval22(v1.gconfig)(v1.e))((v2) => {
|
44993
|
-
const $
|
44994
|
-
const $
|
44995
|
-
const $
|
45100
|
+
const $4 = v2.g;
|
45101
|
+
const $5 = v2["out\u03B1"];
|
45102
|
+
const $6 = v2["in\u03B1"]._1;
|
44996
45103
|
const opEval = {
|
44997
45104
|
g: $GraphImpl({ out: v2.g._1.in_, in_: v2.g._1.out, sinks: v2.g._1.sources, sources: v2.g._1.sinks, vertices: v2.g._1.vertices }),
|
44998
45105
|
graph_fwd: v2.graph_fwd,
|
@@ -45000,86 +45107,86 @@ var loadFig = (dictMonadAff) => {
|
|
45000
45107
|
"in\u03B1": v2["out\u03B1"],
|
45001
45108
|
"out\u03B1": v2["in\u03B1"]
|
45002
45109
|
};
|
45003
|
-
const inputs$p = fromFoldable26($
|
45110
|
+
const inputs$p = fromFoldable26($1);
|
45004
45111
|
const v3 = functorEnvExpr.map((v$1) => {
|
45005
45112
|
})(v2["in\u03B1"]);
|
45006
|
-
const $
|
45007
|
-
const $
|
45008
|
-
const $
|
45009
|
-
const $
|
45010
|
-
return (v$1) => $
|
45011
|
-
})($
|
45012
|
-
const $
|
45013
|
-
const $
|
45113
|
+
const $7 = unrestrictGC(boundedMeetSemilatticeBoo)(v3._1)(inputs$p);
|
45114
|
+
const $8 = unprojExpr(boundedMeetSemilatticeBoo)($EnvExpr(v3._1, v3._2));
|
45115
|
+
const $9 = filterWithKey((x2) => {
|
45116
|
+
const $92 = setSet(ordString).member(x2)(inputs$p);
|
45117
|
+
return (v$1) => $92;
|
45118
|
+
})($6);
|
45119
|
+
const $10 = _fmapObject($6, functorVal.map((v$1) => false));
|
45120
|
+
const $11 = functorVal.map((v$1) => false)($5);
|
45014
45121
|
const graphgc_op = graphGC1(opEval);
|
45015
45122
|
const graphgc = graphGC22(v2);
|
45016
|
-
const inertFwd = verticesGraphImpl.vertices(graphgc.fwd($
|
45017
|
-
const inertBwd = setSet5.difference(verticesGraphImpl.vertices($
|
45018
|
-
const $
|
45019
|
-
const $
|
45020
|
-
const $
|
45021
|
-
const $
|
45022
|
-
const demands = lift1($
|
45023
|
-
const $
|
45024
|
-
return $Tuple($
|
45123
|
+
const inertFwd = verticesGraphImpl.vertices(graphgc.fwd($8.fwd($7.fwd($10)))._2);
|
45124
|
+
const inertBwd = setSet5.difference(verticesGraphImpl.vertices($4))(verticesGraphImpl.vertices(graphgc.bwd(functorVal.map((v$1) => true)($5))._2));
|
45125
|
+
const $12 = select\u03B1s\u{1D539}Vertex2["select\u{1D539}s"]($6)(inertBwd);
|
45126
|
+
const $13 = select\u{1D539}s($5)(inertFwd);
|
45127
|
+
const $14 = _fmapObject($12, functorVal.map(selState));
|
45128
|
+
const $15 = functorVal.map(selState)($13);
|
45129
|
+
const demands = lift1($14)((v6) => {
|
45130
|
+
const $16 = graphgc.bwd(v6);
|
45131
|
+
return $Tuple($7.bwd($8.bwd($16._1)), $16._2);
|
45025
45132
|
});
|
45026
|
-
const demandedBy = lift2($
|
45133
|
+
const demandedBy = lift2($15)((\u03B31) => graphgc_op.bwd(deMorgan((x2) => $8.fwd($7.fwd(x2)))(\u03B31)));
|
45027
45134
|
return Monad0.Applicative0().pure({
|
45028
45135
|
spec: v,
|
45029
|
-
s: $
|
45136
|
+
s: $3,
|
45030
45137
|
"\u03B3": intersectionWith_Object(apply)(_fmapObject(
|
45031
45138
|
intersectionWith_Object(apply)(_fmapObject(
|
45032
|
-
_fmapObject($
|
45139
|
+
_fmapObject($12, functorVal.map(selStates)),
|
45033
45140
|
applyVal.apply
|
45034
|
-
))($
|
45141
|
+
))($10),
|
45035
45142
|
applyVal.apply
|
45036
|
-
))($
|
45037
|
-
v: applyVal.apply(applyVal.apply(functorVal.map(selStates)($
|
45143
|
+
))($10),
|
45144
|
+
v: applyVal.apply(applyVal.apply(functorVal.map(selStates)($13))($11))($11),
|
45038
45145
|
"\u03B9": empty,
|
45039
45146
|
linkedOutputs: (selType) => (v6) => {
|
45040
45147
|
const v$p = functorVal.map(getSel(selType))(v6);
|
45041
45148
|
const v7 = demands(v$p);
|
45042
|
-
return $Tuple(v7._1, $Tuple($
|
45149
|
+
return $Tuple(v7._1, $Tuple($2 ? demandedBy(v7._1)._1 : v$p, verticesGraphImpl.vertices(v7._2)));
|
45043
45150
|
},
|
45044
45151
|
linkedInputs: (selType) => (\u03B31) => {
|
45045
45152
|
const \u03B3$p = _fmapObject(\u03B31, functorVal.map(getSel(selType)));
|
45046
45153
|
const v6 = demandedBy(\u03B3$p);
|
45047
|
-
return $Tuple($
|
45154
|
+
return $Tuple($2 ? demands(v6._1)._1 : \u03B3$p, $Tuple(v6._1, verticesGraphImpl.vertices(v6._2)));
|
45048
45155
|
},
|
45049
45156
|
linkIntermediates: (\u03B9) => {
|
45050
45157
|
const \u03B1s = select\u03B1s\u{1D539}Vertex2["select\u03B1s"](_fmapObject(
|
45051
45158
|
\u03B9,
|
45052
45159
|
functorVal.map((x2) => {
|
45053
|
-
const $
|
45054
|
-
if ($
|
45160
|
+
const $16 = getSel(Transient)(x2);
|
45161
|
+
if ($16.tag === "Inert") {
|
45055
45162
|
return false;
|
45056
45163
|
}
|
45057
|
-
if ($
|
45058
|
-
return $
|
45164
|
+
if ($16.tag === "Reactive") {
|
45165
|
+
return $16._1;
|
45059
45166
|
}
|
45060
45167
|
fail();
|
45061
45168
|
})
|
45062
|
-
))(\u03B9from\u03B1s(graphGraphImpl)($
|
45169
|
+
))(\u03B9from\u03B1s(graphGraphImpl)($4)(mapObjectString.keys(\u03B9)));
|
45063
45170
|
return $Tuple(
|
45064
|
-
intersectionWith_Object(apply)(_fmapObject($
|
45171
|
+
intersectionWith_Object(apply)(_fmapObject($14, applyVal.apply))(select\u03B1s\u{1D539}Vertex2["select\u{1D539}s"]($6)(verticesGraphImpl.vertices(bwdSlice3($Tuple(
|
45065
45172
|
\u03B1s,
|
45066
45173
|
v2.g
|
45067
45174
|
))))),
|
45068
45175
|
$Tuple(
|
45069
|
-
applyVal.apply($
|
45176
|
+
applyVal.apply($15)(select\u{1D539}s($5)(verticesGraphImpl.vertices(bwdSlice3($Tuple(\u03B1s, opEval.g))))),
|
45070
45177
|
map2(ordDVertex$p)((\u03B1) => $Tuple(
|
45071
45178
|
\u03B1,
|
45072
|
-
definitely("in graph")(_lookup(Nothing, Just, \u03B1, $
|
45179
|
+
definitely("in graph")(_lookup(Nothing, Just, \u03B1, $4._1.out))._2
|
45073
45180
|
))(\u03B1s)
|
45074
45181
|
)
|
45075
45182
|
);
|
45076
45183
|
},
|
45077
45184
|
dir: { persistent: LinkedOutputs, transient: LinkedOutputs },
|
45078
|
-
in_views: _fmapObject($
|
45185
|
+
in_views: _fmapObject($9, (v$1) => Nothing),
|
45079
45186
|
out_view: Nothing,
|
45080
45187
|
intermediate_views: empty,
|
45081
45188
|
in_roots: fold((z) => (v$1) => (a) => insert3(ordVertex)(a)()(z))(Leaf2)(_fmapObject(
|
45082
|
-
$
|
45189
|
+
$9,
|
45083
45190
|
(v6) => v6._1
|
45084
45191
|
)),
|
45085
45192
|
inerts: intersection3(inertFwd)(inertBwd)
|
@@ -45244,6 +45351,36 @@ var drawFile = (v) => {
|
|
45244
45351
|
};
|
45245
45352
|
};
|
45246
45353
|
|
45354
|
+
// output-es/Data.Argonaut.Decode.Error/index.js
|
45355
|
+
var $JsonDecodeError = (tag, _1, _2) => ({ tag, _1, _2 });
|
45356
|
+
var AtIndex = (value0) => (value1) => $JsonDecodeError("AtIndex", value0, value1);
|
45357
|
+
var AtKey = (value0) => (value1) => $JsonDecodeError("AtKey", value0, value1);
|
45358
|
+
var Named = (value0) => (value1) => $JsonDecodeError("Named", value0, value1);
|
45359
|
+
var MissingValue = /* @__PURE__ */ $JsonDecodeError("MissingValue");
|
45360
|
+
var showJsonDecodeError = {
|
45361
|
+
show: (v) => {
|
45362
|
+
if (v.tag === "TypeMismatch") {
|
45363
|
+
return "(TypeMismatch " + showStringImpl(v._1) + ")";
|
45364
|
+
}
|
45365
|
+
if (v.tag === "UnexpectedValue") {
|
45366
|
+
return "(UnexpectedValue " + stringify(v._1) + ")";
|
45367
|
+
}
|
45368
|
+
if (v.tag === "AtIndex") {
|
45369
|
+
return "(AtIndex " + showIntImpl(v._1) + " " + showJsonDecodeError.show(v._2) + ")";
|
45370
|
+
}
|
45371
|
+
if (v.tag === "AtKey") {
|
45372
|
+
return "(AtKey " + showStringImpl(v._1) + " " + showJsonDecodeError.show(v._2) + ")";
|
45373
|
+
}
|
45374
|
+
if (v.tag === "Named") {
|
45375
|
+
return "(Named " + showStringImpl(v._1) + " " + showJsonDecodeError.show(v._2) + ")";
|
45376
|
+
}
|
45377
|
+
if (v.tag === "MissingValue") {
|
45378
|
+
return "MissingValue";
|
45379
|
+
}
|
45380
|
+
fail();
|
45381
|
+
}
|
45382
|
+
};
|
45383
|
+
|
45247
45384
|
// output-es/Data.Argonaut.Decode.Decoders/index.js
|
45248
45385
|
var traverseWithIndex = /* @__PURE__ */ (() => traversableWithIndexArray.traverseWithIndex(applicativeEither))();
|
45249
45386
|
var decodeJArray = (x2) => {
|
@@ -45384,69 +45521,6 @@ var gDecodeJsonCons = (dictDecodeJsonField) => (dictGDecodeJson) => (dictIsSymbo
|
|
45384
45521
|
}
|
45385
45522
|
});
|
45386
45523
|
|
45387
|
-
// output-es/File/index.js
|
45388
|
-
var Folder = (x2) => x2;
|
45389
|
-
|
45390
|
-
// output-es/Module.Web/index.js
|
45391
|
-
var findM = (xs) => (f) => (base2) => foldrArray((x2) => (acc) => applyAff.apply(_map(altEither.alt)(acc))(f(x2)))(_pure(base2))(xs);
|
45392
|
-
var loadFileWebT = (dictMonadThrow) => {
|
45393
|
-
const Monad0 = dictMonadThrow.Monad0();
|
45394
|
-
const bind1 = bindReaderT(Monad0.Bind1()).bind;
|
45395
|
-
const monadWebT1 = monadReaderT(Monad0);
|
45396
|
-
const bindExceptT2 = bindExceptT(monadWebT1);
|
45397
|
-
const applicativeExceptT2 = applicativeExceptT(monadWebT1);
|
45398
|
-
const $0 = Monad0.Applicative0();
|
45399
|
-
return {
|
45400
|
-
loadFile: (dictMonadError) => (dictMonadAff) => (folders) => (v) => bind1(bindExceptT2.bind(dictMonadAff.liftAff(findM(arrayMap((() => {
|
45401
|
-
const $1 = v + ".fld";
|
45402
|
-
return (a) => a + "/" + $1;
|
45403
|
-
})())(folders))((v1) => _bind(request(driver)({
|
45404
|
-
method: $Either("Left", HEAD),
|
45405
|
-
url: v1,
|
45406
|
-
headers: [],
|
45407
|
-
content: Nothing,
|
45408
|
-
username: Nothing,
|
45409
|
-
password: Nothing,
|
45410
|
-
withCredentials: false,
|
45411
|
-
responseFormat: $ResponseFormat("String", identity),
|
45412
|
-
timeout: Nothing
|
45413
|
-
}))((resp) => _pure((() => {
|
45414
|
-
if (resp.tag === "Right") {
|
45415
|
-
if (resp._1.status === 200) {
|
45416
|
-
return $Either("Right", $Tuple(resp._1, v1));
|
45417
|
-
}
|
45418
|
-
return $Either("Left", RequestFailedError);
|
45419
|
-
}
|
45420
|
-
if (resp.tag === "Left") {
|
45421
|
-
return $Either("Left", resp._1);
|
45422
|
-
}
|
45423
|
-
fail();
|
45424
|
-
})())))($Either("Left", RequestFailedError))))((v1) => {
|
45425
|
-
const $1 = v1._2;
|
45426
|
-
return bindExceptT2.bind(applicativeExceptT2.pure())(() => bindExceptT2.bind(dictMonadAff.liftAff(request(driver)({
|
45427
|
-
method: $Either("Left", GET),
|
45428
|
-
url: $1,
|
45429
|
-
headers: [],
|
45430
|
-
content: Nothing,
|
45431
|
-
username: Nothing,
|
45432
|
-
password: Nothing,
|
45433
|
-
withCredentials: false,
|
45434
|
-
responseFormat: $ResponseFormat("String", identity),
|
45435
|
-
timeout: Nothing
|
45436
|
-
})))((contents) => applicativeExceptT2.pure(contents.body)));
|
45437
|
-
}))((result) => {
|
45438
|
-
if (result.tag === "Left") {
|
45439
|
-
return monadThrowReaderT(dictMonadThrow).throwError(error(printError(result._1)));
|
45440
|
-
}
|
45441
|
-
if (result.tag === "Right") {
|
45442
|
-
const $1 = $0.pure(result._1);
|
45443
|
-
return (v$1) => $1;
|
45444
|
-
}
|
45445
|
-
fail();
|
45446
|
-
})
|
45447
|
-
};
|
45448
|
-
};
|
45449
|
-
|
45450
45524
|
// output-es/App.LoadFigure/index.js
|
45451
45525
|
var gDecodeJsonCons2 = /* @__PURE__ */ gDecodeJsonCons(/* @__PURE__ */ (() => {
|
45452
45526
|
const $0 = decodeArray(caseJsonString($Either(
|
@@ -45494,39 +45568,27 @@ var decodeJson = /* @__PURE__ */ (() => decodeRecord(gDecodeJsonCons((() => {
|
|
45494
45568
|
return Nothing;
|
45495
45569
|
}
|
45496
45570
|
};
|
45497
|
-
})())(
|
45498
|
-
decodeJsonField: (j) => {
|
45499
|
-
if (j.tag === "Just") {
|
45500
|
-
return $Maybe(
|
45501
|
-
"Just",
|
45502
|
-
_caseJson(
|
45503
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
45504
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
45505
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
45506
|
-
Right,
|
45507
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
45508
|
-
(v) => $Either("Left", $JsonDecodeError("TypeMismatch", "String")),
|
45509
|
-
j._1
|
45510
|
-
)
|
45511
|
-
);
|
45512
|
-
}
|
45513
|
-
return Nothing;
|
45514
|
-
}
|
45515
|
-
})(gDecodeJsonCons2(gDecodeJsonCons2(gDecodeJsonCons2(gDecodeJsonCons1(gDecodeJsonCons1(gDecodeJsonNil)({ reflectSymbol: () => "query" })()())({
|
45571
|
+
})())(gDecodeJsonCons2(gDecodeJsonCons2(gDecodeJsonCons1(gDecodeJsonCons1(gDecodeJsonNil)({ reflectSymbol: () => "query" })()())({
|
45516
45572
|
reflectSymbol: () => "linking"
|
45517
|
-
})()())({ reflectSymbol: () => "inputs" })()())({ reflectSymbol: () => "
|
45518
|
-
|
45519
|
-
|
45520
|
-
|
45521
|
-
|
45522
|
-
|
45523
|
-
|
45524
|
-
var
|
45573
|
+
})()())({ reflectSymbol: () => "inputs" })()())({ reflectSymbol: () => "fluidSrcPath" })()())({ reflectSymbol: () => "datasets" })()())().decodeJson)();
|
45574
|
+
var loadFig2 = /* @__PURE__ */ loadFig(/* @__PURE__ */ monadAffReader(monadAffAff))(/* @__PURE__ */ monadErrorReaderT(monadErrorAff))(/* @__PURE__ */ monadReaderReaderT(monadAff))({
|
45575
|
+
loadFileFromPath: (dictMonadError1) => (dictMonadAff1) => (x2) => {
|
45576
|
+
const $0 = loadFileAff.loadFileFromPath(monadErrorAff)(monadAffAff)(x2);
|
45577
|
+
return (v) => $0;
|
45578
|
+
}
|
45579
|
+
});
|
45580
|
+
var loadSpec = (filename) => _bind($$get(driver)($ResponseFormat("Json", identity))(filename))((result) => {
|
45581
|
+
if (result.tag === "Left") {
|
45582
|
+
return throwException(error("Json fetching failed with " + printError(result._1)))();
|
45583
|
+
}
|
45584
|
+
if (result.tag === "Right") {
|
45585
|
+
return _pure(result._1.body);
|
45586
|
+
}
|
45587
|
+
fail();
|
45588
|
+
});
|
45525
45589
|
var figSpecFromJson = (v) => ({
|
45526
45590
|
fluidSrcPaths: arrayMap(Folder)(v.fluidSrcPath),
|
45527
45591
|
datasets: v.datasets,
|
45528
|
-
imports: v.imports,
|
45529
|
-
file: v.file,
|
45530
45592
|
inputs: v.inputs,
|
45531
45593
|
query: v.query ? $Maybe(
|
45532
45594
|
"Just",
|
@@ -45546,25 +45608,79 @@ var figSpecFromJson = (v) => ({
|
|
45546
45608
|
) : Nothing,
|
45547
45609
|
linking: v.linking
|
45548
45610
|
});
|
45549
|
-
var
|
45550
|
-
|
45551
|
-
|
45552
|
-
|
45611
|
+
var loadFigureSpecSrc = (jsonSpec) => (fluidSrc) => runAffs_((v) => drawFig(v._1)(v._2))([
|
45612
|
+
(() => {
|
45613
|
+
const v = decodeJson(jsonSpec);
|
45614
|
+
if (v.tag === "Left") {
|
45615
|
+
return throwException(error("JSON decoding failed with " + showJsonDecodeError.show(v._1)))();
|
45553
45616
|
}
|
45554
|
-
if (
|
45555
|
-
const
|
45556
|
-
|
45557
|
-
|
45617
|
+
if (v.tag === "Right") {
|
45618
|
+
const v1 = figSpecFromJson(v._1);
|
45619
|
+
return _map((v2) => $Tuple("fig", v2))(loadFig2(v1)(fluidSrc)({ fluidSrcPaths: v1.fluidSrcPaths }));
|
45620
|
+
}
|
45621
|
+
fail();
|
45622
|
+
})()
|
45623
|
+
]);
|
45624
|
+
var loadFigureSpec = (jsonSpec) => (srcFile) => {
|
45625
|
+
const $0 = _makeFiber(
|
45626
|
+
ffiUtil,
|
45627
|
+
_bind(loadFileAff.loadFileFromPath(monadErrorAff)(monadAffAff)(srcFile))((fluidSrc) => _liftEffect(loadFigureSpecSrc(jsonSpec)(definitely("absurd")(fluidSrc))))
|
45628
|
+
);
|
45629
|
+
return () => {
|
45630
|
+
const fiber = $0();
|
45631
|
+
fiber.run();
|
45632
|
+
};
|
45633
|
+
};
|
45634
|
+
var loadFigure = (specFile) => (srcFile) => {
|
45635
|
+
const $0 = _makeFiber(ffiUtil, _bind(loadSpec(specFile))((jsonSpec) => _liftEffect(loadFigureSpec(jsonSpec)(srcFile))));
|
45636
|
+
return () => {
|
45637
|
+
const fiber = $0();
|
45638
|
+
fiber.run();
|
45639
|
+
};
|
45640
|
+
};
|
45641
|
+
var loadFigureSrc = (specFile) => (fluidSrc) => {
|
45642
|
+
const $0 = _makeFiber(ffiUtil, _bind(loadSpec(specFile))((jsonSpec) => _liftEffect(loadFigureSpecSrc(jsonSpec)(fluidSrc))));
|
45643
|
+
return () => {
|
45644
|
+
const fiber = $0();
|
45645
|
+
fiber.run();
|
45646
|
+
};
|
45647
|
+
};
|
45648
|
+
var drawCode2 = (file) => {
|
45649
|
+
const $0 = split("/")(file);
|
45650
|
+
const $1 = index($0)($0.length - 1 | 0);
|
45651
|
+
const filename = (() => {
|
45652
|
+
if ($1.tag === "Just") {
|
45653
|
+
const $22 = index(split(".")($1._1))(0);
|
45654
|
+
if ($22.tag === "Just") {
|
45655
|
+
if ($22._1 === "") {
|
45656
|
+
return Nothing;
|
45657
|
+
}
|
45658
|
+
return $Maybe("Just", $22._1);
|
45558
45659
|
}
|
45559
|
-
if (
|
45560
|
-
|
45561
|
-
return _map((v2) => $Tuple("fig", v2))(loadFig2(v1)({ fluidSrcPaths: v1.fluidSrcPaths }));
|
45660
|
+
if ($22.tag === "Nothing") {
|
45661
|
+
return Nothing;
|
45562
45662
|
}
|
45663
|
+
fail();
|
45664
|
+
}
|
45665
|
+
if ($1.tag === "Nothing") {
|
45666
|
+
return Nothing;
|
45563
45667
|
}
|
45564
45668
|
fail();
|
45565
|
-
})
|
45566
|
-
|
45567
|
-
|
45669
|
+
})();
|
45670
|
+
const errNotFound = "drawCode: File not found: " + file;
|
45671
|
+
const errEmptyName = "drawCode: Filename cannot be empty: " + file;
|
45672
|
+
const $2 = _makeFiber(
|
45673
|
+
ffiUtil,
|
45674
|
+
_bind(loadFileAff.loadFileFromPath(monadErrorAff)(monadAffAff)(file))((fluidSrc) => _liftEffect(drawFile($Tuple(
|
45675
|
+
definitely(errEmptyName)(filename),
|
45676
|
+
definitely(errNotFound)(fluidSrc)
|
45677
|
+
))))
|
45678
|
+
);
|
45679
|
+
return () => {
|
45680
|
+
const fiber = $2();
|
45681
|
+
fiber.run();
|
45682
|
+
};
|
45683
|
+
};
|
45568
45684
|
export {
|
45569
45685
|
decodeJson,
|
45570
45686
|
drawCode2 as drawCode,
|
@@ -45573,8 +45689,8 @@ export {
|
|
45573
45689
|
gDecodeJsonCons1,
|
45574
45690
|
loadFig2 as loadFig,
|
45575
45691
|
loadFigure,
|
45576
|
-
|
45577
|
-
|
45578
|
-
|
45579
|
-
|
45692
|
+
loadFigureSpec,
|
45693
|
+
loadFigureSpecSrc,
|
45694
|
+
loadFigureSrc,
|
45695
|
+
loadSpec
|
45580
45696
|
};
|