@explorable-viz/fluid 0.7.75 → 0.7.77

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