@explorable-viz/fluid 0.7.95 → 0.7.96

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.
@@ -264,17 +264,8 @@ var pureE = function(a) {
264
264
  return a;
265
265
  };
266
266
  };
267
- var bindE = function(a) {
268
- return function(f) {
269
- return function() {
270
- return f(a())();
271
- };
272
- };
273
- };
274
267
 
275
268
  // output-es/Effect/index.js
276
- var monadEffect = { Applicative0: () => applicativeEffect, Bind1: () => bindEffect };
277
- var bindEffect = { bind: bindE, Apply0: () => applyEffect };
278
269
  var applyEffect = {
279
270
  apply: (f) => (a) => () => {
280
271
  const f$p = f();
@@ -2662,6 +2653,17 @@ var applyStateT = (dictMonad) => {
2662
2653
  };
2663
2654
  };
2664
2655
  var applicativeStateT = (dictMonad) => ({ pure: (a) => (s) => dictMonad.Applicative0().pure($Tuple(a, s)), Apply0: () => applyStateT(dictMonad) });
2656
+ var monadEffectState = (dictMonadEffect) => {
2657
+ const Monad0 = dictMonadEffect.Monad0();
2658
+ const monadStateT1 = { Applicative0: () => applicativeStateT(Monad0), Bind1: () => bindStateT(Monad0) };
2659
+ return {
2660
+ liftEffect: (x) => {
2661
+ const $0 = dictMonadEffect.liftEffect(x);
2662
+ return (s) => Monad0.Bind1().bind($0)((x$1) => Monad0.Applicative0().pure($Tuple(x$1, s)));
2663
+ },
2664
+ Monad0: () => monadStateT1
2665
+ };
2666
+ };
2665
2667
  var monadRecStateT = (dictMonadRec) => {
2666
2668
  const Monad0 = dictMonadRec.Monad0();
2667
2669
  const monadStateT1 = { Applicative0: () => applicativeStateT(Monad0), Bind1: () => bindStateT(Monad0) };
@@ -2700,6 +2702,20 @@ var monadErrorStateT = (dictMonadError) => {
2700
2702
 
2701
2703
  // output-es/Effect.Aff.Class/index.js
2702
2704
  var monadAffAff = { liftAff: (x) => x, MonadEffect0: () => monadEffectAff };
2705
+ var monadAffState = (dictMonadAff) => {
2706
+ const MonadEffect0 = dictMonadAff.MonadEffect0();
2707
+ const monadEffectState2 = monadEffectState(MonadEffect0);
2708
+ return {
2709
+ liftAff: (() => {
2710
+ const $0 = MonadEffect0.Monad0();
2711
+ return (x) => {
2712
+ const $1 = dictMonadAff.liftAff(x);
2713
+ return (s) => $0.Bind1().bind($1)((x$1) => $0.Applicative0().pure($Tuple(x$1, s)));
2714
+ };
2715
+ })(),
2716
+ MonadEffect0: () => monadEffectState2
2717
+ };
2718
+ };
2703
2719
 
2704
2720
  // output-es/Effect.Console/foreign.js
2705
2721
  var log = function(s) {
@@ -10144,8 +10160,8 @@ var dataTypes = /* @__PURE__ */ foldrArray(Cons)(Nil)([
10144
10160
  /* @__PURE__ */ dataType("View")([
10145
10161
  /* @__PURE__ */ $Tuple("BarChart", 1),
10146
10162
  /* @__PURE__ */ $Tuple("LineChart", 1),
10147
- /* @__PURE__ */ $Tuple("Paragraph", 1),
10148
10163
  /* @__PURE__ */ $Tuple("MultiView", 1),
10164
+ /* @__PURE__ */ $Tuple("Paragraph", 1),
10149
10165
  /* @__PURE__ */ $Tuple("ScatterPlot", 1)
10150
10166
  ]),
10151
10167
  /* @__PURE__ */ dataType("Point")([/* @__PURE__ */ $Tuple("Point", 2)]),
@@ -17961,7 +17977,7 @@ var unary = (dictBoundedJoinSemilattice) => {
17961
17977
  arity: 1,
17962
17978
  op: (dictMonadWithGraphAlloc) => {
17963
17979
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
17964
- return (dictMonadError) => (v) => {
17980
+ return (dictMonadError) => (dictLoadFile) => (v) => {
17965
17981
  if (v.tag === "Cons" && v._2.tag === "Nil") {
17966
17982
  const $0 = v._1._2;
17967
17983
  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))));
@@ -18110,7 +18126,7 @@ var binaryZero = (dictBoundedJoinSemilattice) => {
18110
18126
  arity: 2,
18111
18127
  op: (dictMonadWithGraphAlloc) => {
18112
18128
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
18113
- return (dictMonadError) => (v) => {
18129
+ return (dictMonadError) => (dictLoadFile) => (v) => {
18114
18130
  if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
18115
18131
  const $0 = f.i.unpack(v._1._3);
18116
18132
  const $1 = f.i.unpack(v._2._1._3);
@@ -18158,7 +18174,7 @@ var binary = (dictBoundedJoinSemilattice) => {
18158
18174
  arity: 2,
18159
18175
  op: (dictMonadWithGraphAlloc) => {
18160
18176
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
18161
- return (dictMonadError) => (v) => {
18177
+ return (dictMonadError) => (dictLoadFile) => (v) => {
18162
18178
  if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._2.tag === "Nil") {
18163
18179
  return $$new((a) => Val(a)(None))(insert(ordVertex)(v._2._1._1)()($$$Map(
18164
18180
  "Two",
@@ -18362,11 +18378,11 @@ var new$p = (dictMonadWithGraphAlloc) => {
18362
18378
  const Monad0 = MonadWithGraph2.Monad0();
18363
18379
  const Bind1 = Monad0.Bind1();
18364
18380
  const fresh = dictMonadWithGraphAlloc.MonadAlloc0().fresh;
18365
- return (v) => (v1) => (v2) => (v3) => {
18381
+ return (dictLoadFile) => (v) => (v1) => (v2) => (v3) => {
18366
18382
  if (v2.tag === "None") {
18367
18383
  return $$new((\u03B1s$p) => (u$p) => $Val(\u03B1s$p, None, u$p))(v1)(v3);
18368
18384
  }
18369
- return Bind1.bind(fresh)((\u03B1) => Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity13)(v)((() => {
18385
+ return Bind1.bind(fresh)((\u03B1) => Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(dictLoadFile)(unionWith2((v$1) => identity13)(v)((() => {
18370
18386
  const $0 = {};
18371
18387
  $0.this = $Val(\u03B1, None, v3);
18372
18388
  return $0;
@@ -18378,7 +18394,7 @@ var evalDocOpt = (dictMonadWithGraphAlloc) => {
18378
18394
  const Applicative0 = Monad0.Applicative0();
18379
18395
  const $0 = Monad0.Bind1().Apply0().Functor0();
18380
18396
  const sequence2 = traversableList.traverse(Applicative0)(identity5);
18381
- return (v) => (v1) => {
18397
+ return (dictLoadFile) => (v) => (v1) => {
18382
18398
  if (v1.tag === "None") {
18383
18399
  return Applicative0.pure(None);
18384
18400
  }
@@ -18388,7 +18404,7 @@ var evalDocOpt = (dictMonadWithGraphAlloc) => {
18388
18404
  return Applicative0.pure($DocCommentElem("Token", v2._1));
18389
18405
  }
18390
18406
  if (v2.tag === "Unquote") {
18391
- return $0.map(Unquote)($$eval(dictMonadWithGraphAlloc)(v)(v2._1)(setSet4.empty));
18407
+ return $0.map(Unquote)($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v2._1)(setSet4.empty));
18392
18408
  }
18393
18409
  fail();
18394
18410
  })(v1._1)));
@@ -18411,7 +18427,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18411
18427
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
18412
18428
  const match1 = match(dictMonadWithGraphAlloc);
18413
18429
  const closeDefs1 = closeDefs(dictMonadWithGraphAlloc);
18414
- return (v) => (v1) => (v2) => {
18430
+ return (dictLoadFile) => (v) => (v1) => (v2) => {
18415
18431
  if (v1.tag === "Var") {
18416
18432
  return withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)(v1._1)(v));
18417
18433
  }
@@ -18419,23 +18435,23 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18419
18435
  return withMsg2("Variable lookup")(lookup$p(MonadThrow0)(showString)(mapEnvStringVal)(v1._1)(v));
18420
18436
  }
18421
18437
  if (v1.tag === "Int") {
18422
- return new$p(dictMonadWithGraphAlloc)(v)(insert(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Int", v1._3));
18438
+ return new$p(dictMonadWithGraphAlloc)(dictLoadFile)(v)(insert(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Int", v1._3));
18423
18439
  }
18424
18440
  if (v1.tag === "Float") {
18425
- return new$p(dictMonadWithGraphAlloc)(v)(insert(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Float", v1._3));
18441
+ return new$p(dictMonadWithGraphAlloc)(dictLoadFile)(v)(insert(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Float", v1._3));
18426
18442
  }
18427
18443
  if (v1.tag === "Str") {
18428
- return new$p(dictMonadWithGraphAlloc)(v)(insert(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Str", v1._3));
18444
+ return new$p(dictMonadWithGraphAlloc)(dictLoadFile)(v)(insert(ordVertex)(v1._1)()(v2))(v1._2)($BaseVal("Str", v1._3));
18429
18445
  }
18430
18446
  if (v1.tag === "Dictionary") {
18431
18447
  const $1 = v1._2;
18432
18448
  const $2 = v1._1;
18433
18449
  return Bind1.bind($0.map(unzip3)(traverse2(traverse3((() => {
18434
- const $3 = $$eval(dictMonadWithGraphAlloc)(v);
18450
+ const $3 = $$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v);
18435
18451
  return (a) => $3(a)(v2);
18436
18452
  })()))(v1._3)))((v3) => {
18437
18453
  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));
18438
- return new$p(dictMonadWithGraphAlloc)(v)(insert(ordVertex)($2)()(v2))($1)($BaseVal(
18454
+ return new$p(dictMonadWithGraphAlloc)(dictLoadFile)(v)(insert(ordVertex)($2)()(v2))($1)($BaseVal(
18439
18455
  "Dictionary",
18440
18456
  fromFoldable17(zipWith2(Tuple)(v4._1)(zipWith2(Tuple)(v4._2)(v3._2)))
18441
18457
  ));
@@ -18467,9 +18483,9 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18467
18483
  };
18468
18484
  return go(0)($3);
18469
18485
  })()))(() => Bind1.bind(traverse2((() => {
18470
- const $5 = $$eval(dictMonadWithGraphAlloc)(v);
18486
+ const $5 = $$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v);
18471
18487
  return (a) => $5(a)(v2);
18472
- })())($3))((vs) => new$p(dictMonadWithGraphAlloc)(v)(insert(ordVertex)($4)()(v2))($2)($BaseVal("Constr", $1, vs))));
18488
+ })())($3))((vs) => new$p(dictMonadWithGraphAlloc)(dictLoadFile)(v)(insert(ordVertex)($4)()(v2))($2)($BaseVal("Constr", $1, vs))));
18473
18489
  }
18474
18490
  if (v1.tag === "Matrix") {
18475
18491
  const $1 = v1._2;
@@ -18477,7 +18493,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18477
18493
  const $3 = v1._4._1;
18478
18494
  const $4 = v1._4._2;
18479
18495
  const $5 = v1._1;
18480
- return Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)(v1._5)(v2))((v3) => {
18496
+ return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v1._5)(v2))((v3) => {
18481
18497
  const v5 = intPair.unpack(v3._3);
18482
18498
  const $6 = v5._1._1;
18483
18499
  const $7 = v5._2._1;
@@ -18488,7 +18504,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18488
18504
  $7
18489
18505
  )) + ")"))(() => Bind1.bind(sequence2(arrayBind(range(1)($6))((i) => [
18490
18506
  sequence2(arrayBind(range(1)($7))((j) => [
18491
- $$eval(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity13)(v)(disjointUnion2((() => {
18507
+ $$eval(dictMonadWithGraphAlloc)(dictLoadFile)(unionWith2((v$1) => identity13)(v)(disjointUnion2((() => {
18492
18508
  const $10 = {};
18493
18509
  $10[$3] = $Val($8, None, $BaseVal("Int", i));
18494
18510
  return $10;
@@ -18498,7 +18514,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18498
18514
  return $10;
18499
18515
  })())))($2)(v2)
18500
18516
  ]))
18501
- ])))((vss) => new$p(dictMonadWithGraphAlloc)(v)(insert(ordVertex)($5)()(v2))($1)($BaseVal(
18517
+ ])))((vss) => new$p(dictMonadWithGraphAlloc)(dictLoadFile)(v)(insert(ordVertex)($5)()(v2))($1)($BaseVal(
18502
18518
  "Matrix",
18503
18519
  $Tuple(vss, $Tuple($Tuple($6, $8), $Tuple($7, $9)))
18504
18520
  ))));
@@ -18524,7 +18540,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18524
18540
  if (v1.tag === "Project") {
18525
18541
  const $1 = v1._1;
18526
18542
  const $2 = v1._3;
18527
- return Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)(v1._2)(v2))((v3) => {
18543
+ return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v1._2)(v2))((v3) => {
18528
18544
  if (v3._3.tag === "Dictionary") {
18529
18545
  return Bind1.bind(withMsg2("Dict lookup")(orElse(MonadThrow0)('Key "' + $2 + '" not found')((() => {
18530
18546
  const $3 = _lookup(Nothing, Just, $2, v3._3._1);
@@ -18532,7 +18548,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18532
18548
  return $Maybe("Just", $3._1._2);
18533
18549
  }
18534
18550
  return Nothing;
18535
- })())))((v$p) => concatDocs(dictMonadWithGraphAlloc)(v)(v$p)($1));
18551
+ })())))((v$p) => concatDocs(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v$p)($1));
18536
18552
  }
18537
18553
  return MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v3)).lines) + ", expected dictionary"));
18538
18554
  });
@@ -18540,7 +18556,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18540
18556
  if (v1.tag === "DProject") {
18541
18557
  const $1 = v1._1;
18542
18558
  const $2 = v1._3;
18543
- return Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)(v1._2)(v2))((v3) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)($2)(v2))((v$p) => {
18559
+ return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v1._2)(v2))((v3) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)($2)(v2))((v$p) => {
18544
18560
  if (v3._3.tag === "Dictionary") {
18545
18561
  if (v$p._3.tag === "Str") {
18546
18562
  return Bind1.bind(withMsg2("Dict lookup")(orElse(MonadThrow0)('Key "' + v$p._3._1 + '" not found')((() => {
@@ -18549,7 +18565,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18549
18565
  return $Maybe("Just", $3._1._2);
18550
18566
  }
18551
18567
  return Nothing;
18552
- })())))((v$p$p) => concatDocs(dictMonadWithGraphAlloc)(v)(v$p$p)($1));
18568
+ })())))((v$p$p) => concatDocs(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v$p$p)($1));
18553
18569
  }
18554
18570
  return MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v$p)).lines) + ", expected string"));
18555
18571
  }
@@ -18559,10 +18575,10 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18559
18575
  if (v1.tag === "App") {
18560
18576
  const $1 = v1._1;
18561
18577
  const $2 = v1._3;
18562
- return Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)(v1._2)(v2))((v3) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)($2)(v2))((v$p) => Bind1.bind(apply2(dictMonadWithGraphAlloc)(v3)(v$p))((v4) => {
18578
+ return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v1._2)(v2))((v3) => Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)($2)(v2))((v$p) => Bind1.bind(apply2(dictMonadWithGraphAlloc)(dictLoadFile)(v3)(v$p))((v4) => {
18563
18579
  const $3 = v4._3;
18564
18580
  const $4 = v4._1;
18565
- return Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity13)(v)((() => {
18581
+ return Bind1.bind(evalDocOpt(dictMonadWithGraphAlloc)(dictLoadFile)(unionWith2((v$1) => identity13)(v)((() => {
18566
18582
  const $5 = {};
18567
18583
  $5.this = v4;
18568
18584
  return $5;
@@ -18572,23 +18588,23 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18572
18588
  if (v1.tag === "Let") {
18573
18589
  const $1 = v1._2;
18574
18590
  const $2 = v1._1._1;
18575
- return Bind1.bind($$eval(dictMonadWithGraphAlloc)(v)(v1._1._2)(v2))((v3) => Bind1.bind(match1(v3)($2))((v4) => $$eval(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity13)(v)(v4._1))($1)(v4._2._2)));
18591
+ return Bind1.bind($$eval(dictMonadWithGraphAlloc)(dictLoadFile)(v)(v1._1._2)(v2))((v3) => Bind1.bind(match1(v3)($2))((v4) => $$eval(dictMonadWithGraphAlloc)(dictLoadFile)(unionWith2((v$1) => identity13)(v)(v4._1))($1)(v4._2._2)));
18576
18592
  }
18577
18593
  if (v1.tag === "LetRec") {
18578
18594
  const $1 = v1._2;
18579
18595
  const $2 = v1._1._1;
18580
- return Bind1.bind(closeDefs1(v)(v1._1._2)(insert(ordVertex)($2)()(v2)))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity13)(v)(\u03B3$p))($1)(insert(ordVertex)($2)()(v2)));
18596
+ return Bind1.bind(closeDefs1(v)(v1._1._2)(insert(ordVertex)($2)()(v2)))((\u03B3$p) => $$eval(dictMonadWithGraphAlloc)(dictLoadFile)(unionWith2((v$1) => identity13)(v)(\u03B3$p))($1)(insert(ordVertex)($2)()(v2)));
18581
18597
  }
18582
18598
  fail();
18583
18599
  };
18584
18600
  };
18585
18601
  var concatDocs = (dictMonadWithGraphAlloc) => {
18586
18602
  const Monad0 = dictMonadWithGraphAlloc.MonadWithGraph2().Monad0();
18587
- return (\u03B3) => (v) => (doc) => {
18603
+ return (dictLoadFile) => (\u03B3) => (v) => (doc) => {
18588
18604
  const $0 = v._3;
18589
18605
  const $1 = v._2;
18590
18606
  const $2 = v._1;
18591
- return Monad0.Bind1().bind(evalDocOpt(dictMonadWithGraphAlloc)(unionWith2((v$1) => identity13)(\u03B3)((() => {
18607
+ return Monad0.Bind1().bind(evalDocOpt(dictMonadWithGraphAlloc)(dictLoadFile)(unionWith2((v$1) => identity13)(\u03B3)((() => {
18592
18608
  const $3 = {};
18593
18609
  $3.this = $Val($2, None, $0);
18594
18610
  return $3;
@@ -18602,14 +18618,14 @@ var apply2 = (dictMonadWithGraphAlloc) => {
18602
18618
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
18603
18619
  const MonadError1 = dictMonadWithGraphAlloc.MonadError1();
18604
18620
  const MonadThrow0 = MonadError1.MonadThrow0();
18605
- return (v) => (v1) => {
18621
+ return (dictLoadFile) => (v) => (v1) => {
18606
18622
  const $0 = (v2) => MonadThrow0.throwError(error("Found " + intercalate4("\n")(removeDocWS(prettyVal(highlightableVertex).pretty(v2)).lines) + ", expected function"));
18607
18623
  if (v._3.tag === "Fun") {
18608
18624
  if (v._3._1.tag === "Closure") {
18609
18625
  const $1 = v._1;
18610
18626
  const $2 = v._3._1._1;
18611
18627
  const $3 = v._3._1._3;
18612
- 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)(unionWith2((v$1) => identity13)(unionWith2((v$1) => identity13)($2)(\u03B32))(v3._1))(v3._2._1.tag === "ContExpr" ? v3._2._1._1 : throwException(error("Expression expected"))())(insert(ordVertex)($1)()(v3._2._2))));
18628
+ 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)(dictLoadFile)(unionWith2((v$1) => identity13)(unionWith2((v$1) => identity13)($2)(\u03B32))(v3._1))(v3._2._1.tag === "ContExpr" ? v3._2._1._1 : throwException(error("Expression expected"))())(insert(ordVertex)($1)()(v3._2._2))));
18613
18629
  }
18614
18630
  if (v._3._1.tag === "Foreign") {
18615
18631
  const $1 = v._3._1._1._2;
@@ -18640,7 +18656,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
18640
18656
  $Fun("Foreign", $Tuple(v._3._1._1._1, $1), vs$p)
18641
18657
  ));
18642
18658
  }
18643
- return $1._1.op(dictMonadWithGraphAlloc)(MonadError1)(vs$p);
18659
+ return $1._1.op(dictMonadWithGraphAlloc)(MonadError1)(dictLoadFile)(vs$p);
18644
18660
  }
18645
18661
  if (v._3._1.tag === "PartialConstr") {
18646
18662
  const $1 = v._1;
@@ -18711,25 +18727,28 @@ var eval_module = (dictMonadWithGraphAlloc) => {
18711
18727
  const eval1 = $$eval(dictMonadWithGraphAlloc);
18712
18728
  const match1 = match(dictMonadWithGraphAlloc);
18713
18729
  const closeDefs1 = closeDefs(dictMonadWithGraphAlloc);
18714
- return (\u03B3) => {
18715
- const go = (v) => (v1) => (v2) => {
18716
- if (v1.tag === "Nil") {
18717
- return Monad0.Applicative0().pure(v);
18718
- }
18719
- if (v1.tag === "Cons") {
18720
- if (v1._1.tag === "Left") {
18721
- const $1 = v1._2;
18722
- const $2 = v1._1._1._1;
18723
- return $0.bind(eval1(unionWith2((v$1) => identity13)(\u03B3)(v))(v1._1._1._2)(v2))((v3) => $0.bind(match1(v3)($2))((v4) => go(unionWith2((v$1) => identity13)(v)(v4._1))($1)(v4._2._2)));
18730
+ return (dictLoadFile) => {
18731
+ const eval2 = eval1(dictLoadFile);
18732
+ return (\u03B3) => {
18733
+ const go = (v) => (v1) => (v2) => {
18734
+ if (v1.tag === "Nil") {
18735
+ return Monad0.Applicative0().pure(v);
18724
18736
  }
18725
- if (v1._1.tag === "Right") {
18726
- const $1 = v1._2;
18727
- return $0.bind(closeDefs1(unionWith2((v$1) => identity13)(\u03B3)(v))(v1._1._1._2)(insert(ordVertex)(v1._1._1._1)()(v2)))((\u03B3$p$p) => go(unionWith2((v$1) => identity13)(v)(\u03B3$p$p))($1)(v2));
18737
+ if (v1.tag === "Cons") {
18738
+ if (v1._1.tag === "Left") {
18739
+ const $1 = v1._2;
18740
+ const $2 = v1._1._1._1;
18741
+ return $0.bind(eval2(unionWith2((v$1) => identity13)(\u03B3)(v))(v1._1._1._2)(v2))((v3) => $0.bind(match1(v3)($2))((v4) => go(unionWith2((v$1) => identity13)(v)(v4._1))($1)(v4._2._2)));
18742
+ }
18743
+ if (v1._1.tag === "Right") {
18744
+ const $1 = v1._2;
18745
+ return $0.bind(closeDefs1(unionWith2((v$1) => identity13)(\u03B3)(v))(v1._1._1._2)(insert(ordVertex)(v1._1._1._1)()(v2)))((\u03B3$p$p) => go(unionWith2((v$1) => identity13)(v)(\u03B3$p$p))($1)(v2));
18746
+ }
18728
18747
  }
18729
- }
18730
- fail();
18748
+ fail();
18749
+ };
18750
+ return go(empty);
18731
18751
  };
18732
- return go(empty);
18733
18752
  };
18734
18753
  };
18735
18754
  var eval_progCxt = (dictMonadWithGraphAlloc) => {
@@ -18739,18 +18758,21 @@ var eval_progCxt = (dictMonadWithGraphAlloc) => {
18739
18758
  const $1 = Monad0.Applicative0();
18740
18759
  const eval1 = $$eval(dictMonadWithGraphAlloc);
18741
18760
  const concatM1 = concatM(Monad0);
18742
- return (v) => concatM1(foldableList.foldr(Cons)(listMap((v1) => (\u03B3) => {
18743
- const $2 = v1._1;
18744
- return $0.bind(eval1(\u03B3)(v1._2)(setSet4.empty))((v2) => $1.pure(unionWith2((v$1) => identity13)(\u03B3)((() => {
18745
- const $3 = {};
18746
- $3[$2] = v2;
18747
- return $3;
18748
- })())));
18749
- })(reverse2(v.datasets)))(listMap((mod) => (\u03B3) => $0.bind(eval_module1(\u03B3)(mod)(setSet4.empty))((\u03B3$p) => $1.pure(unionWith2((v$1) => identity13)(\u03B3)(\u03B3$p))))(reverse2(v.mods))))(v.primitives);
18761
+ return (dictLoadFile) => {
18762
+ const eval_module2 = eval_module1(dictLoadFile);
18763
+ const eval2 = eval1(dictLoadFile);
18764
+ return (v) => concatM1(foldableList.foldr(Cons)(listMap((v1) => (\u03B3) => {
18765
+ const $2 = v1._1;
18766
+ return $0.bind(eval2(\u03B3)(v1._2)(setSet4.empty))((v2) => $1.pure(unionWith2((v$1) => identity13)(\u03B3)((() => {
18767
+ const $3 = {};
18768
+ $3[$2] = v2;
18769
+ return $3;
18770
+ })())));
18771
+ })(reverse2(v.datasets)))(listMap((mod) => (\u03B3) => $0.bind(eval_module2(\u03B3)(mod)(setSet4.empty))((\u03B3$p) => $1.pure(unionWith2((v$1) => identity13)(\u03B3)(\u03B3$p))))(reverse2(v.mods))))(v.primitives);
18772
+ };
18750
18773
  };
18751
- var graphEval = (dictMonadError) => {
18752
- const MonadThrow0 = dictMonadError.MonadThrow0();
18753
- const Monad0 = MonadThrow0.Monad0();
18774
+ var graphEval = (dictMonadAff) => {
18775
+ const Monad0 = dictMonadAff.MonadEffect0().Monad0();
18754
18776
  const bindStateT2 = bindStateT(Monad0);
18755
18777
  const $0 = monadAllocAllocT(Monad0);
18756
18778
  const fresh1 = $0.fresh;
@@ -18759,29 +18781,47 @@ var graphEval = (dictMonadError) => {
18759
18781
  Applicative0: () => applicativeStateT(Monad0),
18760
18782
  Bind1: () => bindStateT(Monad0)
18761
18783
  })(graphGraphImpl);
18762
- const eval1 = $$eval(monadWithGraphAllocWithGr(dictMonadError));
18763
- const check2 = check(monadThrowStateT(MonadThrow0));
18764
- return (v) => (e) => {
18765
- const $1 = v["\u03B3"];
18766
- const $2 = spyFunWhen(false)("fwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(fwdSlice2);
18767
- const $3 = spyFunWhen(false)("bwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(bwdSlice2);
18768
- return Monad0.Bind1().bind(runAllocT(Monad0)(bindStateT2.bind(alloc(e))((e\u03B1) => bindStateT2.bind(runWithGraphT_spy2(eval1($1)(e\u03B1)(Leaf2))(verticesEnvExprVertex.vertices($EnvExpr(
18769
- $1,
18770
- e\u03B1
18771
- ))))((v1) => {
18772
- const $4 = v1._1;
18773
- const $5 = v1._2;
18774
- return bindStateT2.bind(check2(difference2(ordDVertex$p)(verticesValVertex.vertices($5))(verticesGraphImpl.vertices($4)).tag === "Leaf")("outputs in graph"))(() => applicativeStateT(Monad0).pure($Tuple(
18775
- $4,
18776
- $Tuple($EnvExpr($1, e\u03B1), $5)
18777
- )));
18778
- })))(v.n))((v1) => Monad0.Applicative0().pure({
18779
- g: v1._2._2._1,
18780
- graph_fwd: (a) => (b) => $2($Tuple(a, b)),
18781
- graph_bwd: (a) => (b) => $3($Tuple(a, b)),
18782
- "in\u03B1": v1._2._2._2._1,
18783
- "out\u03B1": v1._2._2._2._2
18784
- }));
18784
+ const $1 = monadAffState(dictMonadAff).MonadEffect0().Monad0();
18785
+ const $2 = dictMonadAff.MonadEffect0().Monad0();
18786
+ return (dictLoadFile) => (dictMonadError) => {
18787
+ const eval1 = $$eval(monadWithGraphAllocWithGr(dictMonadError))((() => {
18788
+ const loadFile1 = dictLoadFile.loadFile(dictMonadError)(dictMonadAff);
18789
+ return {
18790
+ loadFile: (dictMonadError1) => (dictMonadAff1) => (folders) => {
18791
+ const $3 = loadFile1(folders);
18792
+ return (x) => {
18793
+ const $4 = $3(x);
18794
+ return (s) => $1.Bind1().bind((s$1) => $2.Bind1().bind($4)((x$1) => $2.Applicative0().pure($Tuple(x$1, s$1))))((x$1) => $1.Applicative0().pure($Tuple(
18795
+ x$1,
18796
+ s
18797
+ )));
18798
+ };
18799
+ }
18800
+ };
18801
+ })());
18802
+ const check2 = check(monadThrowStateT(dictMonadError.MonadThrow0()));
18803
+ return (v) => (e) => {
18804
+ const $3 = v["\u03B3"];
18805
+ const $4 = spyFunWhen(false)("fwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(fwdSlice2);
18806
+ const $5 = spyFunWhen(false)("bwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(bwdSlice2);
18807
+ return Monad0.Bind1().bind(runAllocT(Monad0)(bindStateT2.bind(alloc(e))((e\u03B1) => bindStateT2.bind(runWithGraphT_spy2(eval1($3)(e\u03B1)(Leaf2))(verticesEnvExprVertex.vertices($EnvExpr(
18808
+ $3,
18809
+ e\u03B1
18810
+ ))))((v1) => {
18811
+ const $6 = v1._1;
18812
+ const $7 = v1._2;
18813
+ return bindStateT2.bind(check2(difference2(ordDVertex$p)(verticesValVertex.vertices($7))(verticesGraphImpl.vertices($6)).tag === "Leaf")("outputs in graph"))(() => applicativeStateT(Monad0).pure($Tuple(
18814
+ $6,
18815
+ $Tuple($EnvExpr($3, e\u03B1), $7)
18816
+ )));
18817
+ })))(v.n))((v1) => Monad0.Applicative0().pure({
18818
+ g: v1._2._2._1,
18819
+ graph_fwd: (a) => (b) => $4($Tuple(a, b)),
18820
+ graph_bwd: (a) => (b) => $5($Tuple(a, b)),
18821
+ "in\u03B1": v1._2._2._2._1,
18822
+ "out\u03B1": v1._2._2._2._2
18823
+ }));
18824
+ };
18785
18825
  };
18786
18826
  };
18787
18827
 
@@ -19618,6 +19658,9 @@ var monoidRecord = () => (dictMonoidRecord) => {
19618
19658
  return { mempty: dictMonoidRecord.memptyRecord($$Proxy), Semigroup0: () => semigroupRecord1 };
19619
19659
  };
19620
19660
 
19661
+ // output-es/File/index.js
19662
+ var Folder = (x) => x;
19663
+
19621
19664
  // output-es/Data.CodePoint.Unicode/index.js
19622
19665
  var isUpper = (x) => checkAttr([512, 524288])(x);
19623
19666
  var isSpace = (c) => {
@@ -22928,7 +22971,7 @@ var matrixUpdate = /* @__PURE__ */ $Tuple(
22928
22971
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
22929
22972
  return (dictMonadError) => {
22930
22973
  const $$throw2 = $$throw(dictMonadError.MonadThrow0());
22931
- return (v) => {
22974
+ return (dictLoadFile) => (v) => {
22932
22975
  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") {
22933
22976
  const $0 = v._2._2._1;
22934
22977
  return $$new((a) => Val(a)(None))($$$Map("Two", Leaf2, v._1._1, void 0, Leaf2))($BaseVal(
@@ -22948,7 +22991,7 @@ var matrixLookup = /* @__PURE__ */ $Tuple(
22948
22991
  arity: 2,
22949
22992
  op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
22950
22993
  const MonadThrow0 = dictMonadError.MonadThrow0();
22951
- return (v) => {
22994
+ return (dictLoadFile) => (v) => {
22952
22995
  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") {
22953
22996
  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));
22954
22997
  }
@@ -22981,7 +23024,7 @@ var error_ = /* @__PURE__ */ $Tuple(
22981
23024
  arity: 1,
22982
23025
  op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
22983
23026
  const MonadThrow0 = dictMonadError.MonadThrow0();
22984
- return (v) => {
23027
+ return (dictLoadFile) => (v) => {
22985
23028
  if (v.tag === "Cons" && v._1._3.tag === "Str" && v._2.tag === "Nil") {
22986
23029
  return MonadThrow0.Monad0().Applicative0().pure(throwException(error(v._1._3._1))());
22987
23030
  }
@@ -23000,7 +23043,7 @@ var dims = /* @__PURE__ */ $Tuple(
23000
23043
  return (dictMonadError) => {
23001
23044
  const MonadThrow0 = dictMonadError.MonadThrow0();
23002
23045
  const $0 = MonadThrow0.Monad0().Bind1();
23003
- return (v) => {
23046
+ return (dictLoadFile) => (v) => {
23004
23047
  if (v.tag === "Cons" && v._1._3.tag === "Matrix" && v._2.tag === "Nil") {
23005
23048
  const $1 = v._1._3._1._2._2._1;
23006
23049
  const $2 = v._1._1;
@@ -23035,19 +23078,22 @@ var dict_map = /* @__PURE__ */ $Tuple(
23035
23078
  const Monad0 = MonadThrow0.Monad0();
23036
23079
  const Bind1 = Monad0.Bind1();
23037
23080
  const traverse1 = traversableDict.traverse(Monad0.Applicative0());
23038
- return (v) => {
23039
- if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
23040
- const $0 = v._1;
23041
- const $1 = v._2._1._1;
23042
- return Bind1.bind(traverse1((v2) => {
23043
- const $2 = v2._1;
23044
- return Bind1.Apply0().Functor0().map((v3) => $Tuple($2, v3))(apply5($0)(v2._2));
23045
- })(v._2._1._3._1))((d$p) => $$new((a) => Val(a)(None))($$$Map("Two", Leaf2, $1, void 0, Leaf2))($BaseVal(
23046
- "Dictionary",
23047
- d$p
23048
- )));
23049
- }
23050
- return MonadThrow0.throwError(error("Function and dictionary expected"));
23081
+ return (dictLoadFile) => {
23082
+ const apply12 = apply5(dictLoadFile);
23083
+ return (v) => {
23084
+ if (v.tag === "Cons" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
23085
+ const $0 = v._1;
23086
+ const $1 = v._2._1._1;
23087
+ return Bind1.bind(traverse1((v2) => {
23088
+ const $2 = v2._1;
23089
+ return Bind1.Apply0().Functor0().map((v3) => $Tuple($2, v3))(apply12($0)(v2._2));
23090
+ })(v._2._1._3._1))((d$p) => $$new((a) => Val(a)(None))($$$Map("Two", Leaf2, $1, void 0, Leaf2))($BaseVal(
23091
+ "Dictionary",
23092
+ d$p
23093
+ )));
23094
+ }
23095
+ return MonadThrow0.throwError(error("Function and dictionary expected"));
23096
+ };
23051
23097
  };
23052
23098
  };
23053
23099
  }
@@ -23066,31 +23112,34 @@ var dict_intersectionWith = /* @__PURE__ */ $Tuple(
23066
23112
  const Bind1 = Monad0.Bind1();
23067
23113
  const Applicative0 = Monad0.Applicative0();
23068
23114
  const $0 = Bind1.Apply0().Functor0();
23069
- return (v) => {
23070
- 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") {
23071
- const $1 = v._1;
23072
- const $2 = v._2._1._1;
23073
- const $3 = v._2._2._1._1;
23074
- return Bind1.bind($0.map(Dictionary3)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity14)(intersectionWith_Object((v2) => (v3) => {
23075
- const $4 = v3._2;
23076
- const $5 = v2._1;
23077
- const $6 = v3._1;
23078
- return Bind1.bind(Bind1.bind(apply5($1)(v2._2))((a) => apply5(a)($4)))((v4) => Bind1.bind($$new((a) => Val(a)(None))(insert(ordVertex)($6)()($$$Map(
23115
+ return (dictLoadFile) => {
23116
+ const apply12 = apply5(dictLoadFile);
23117
+ return (v) => {
23118
+ 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") {
23119
+ const $1 = v._1;
23120
+ const $2 = v._2._1._1;
23121
+ const $3 = v._2._2._1._1;
23122
+ return Bind1.bind($0.map(Dictionary3)($0.map(DictRep)(traversableDict.traverse(Applicative0)(identity14)(intersectionWith_Object((v2) => (v3) => {
23123
+ const $4 = v3._2;
23124
+ const $5 = v2._1;
23125
+ const $6 = v3._1;
23126
+ return Bind1.bind(Bind1.bind(apply12($1)(v2._2))((a) => apply12(a)($4)))((v4) => Bind1.bind($$new((a) => Val(a)(None))(insert(ordVertex)($6)()($$$Map(
23127
+ "Two",
23128
+ Leaf2,
23129
+ $5,
23130
+ void 0,
23131
+ Leaf2
23132
+ )))(v4._3))((v5) => Applicative0.pure($Tuple(v5._1, v4))));
23133
+ })(v._2._1._3._1)(v._2._2._1._3._1)))))((v$p) => $$new((a) => Val(a)(None))(insert(ordVertex)($3)()($$$Map(
23079
23134
  "Two",
23080
23135
  Leaf2,
23081
- $5,
23136
+ $2,
23082
23137
  void 0,
23083
23138
  Leaf2
23084
- )))(v4._3))((v5) => Applicative0.pure($Tuple(v5._1, v4))));
23085
- })(v._2._1._3._1)(v._2._2._1._3._1)))))((v$p) => $$new((a) => Val(a)(None))(insert(ordVertex)($3)()($$$Map(
23086
- "Two",
23087
- Leaf2,
23088
- $2,
23089
- void 0,
23090
- Leaf2
23091
- )))(v$p));
23092
- }
23093
- return MonadThrow0.throwError(error("Function and two dictionaries expected"));
23139
+ )))(v$p));
23140
+ }
23141
+ return MonadThrow0.throwError(error("Function and two dictionaries expected"));
23142
+ };
23094
23143
  };
23095
23144
  };
23096
23145
  }
@@ -23102,7 +23151,7 @@ var dict_get = /* @__PURE__ */ $Tuple(
23102
23151
  arity: 2,
23103
23152
  op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
23104
23153
  const MonadThrow0 = dictMonadError.MonadThrow0();
23105
- return (v) => {
23154
+ return (dictLoadFile) => (v) => {
23106
23155
  if (v.tag === "Cons" && v._1._3.tag === "Str" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
23107
23156
  return orElse(MonadThrow0)('Key "' + v._1._3._1 + '" not found')((() => {
23108
23157
  const $0 = _lookup(Nothing, Just, v._1._3._1, v._2._1._3._1);
@@ -23126,15 +23175,18 @@ var dict_foldl = /* @__PURE__ */ $Tuple(
23126
23175
  return (dictMonadError) => {
23127
23176
  const MonadThrow0 = dictMonadError.MonadThrow0();
23128
23177
  const Monad0 = MonadThrow0.Monad0();
23129
- return (v) => {
23130
- 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") {
23131
- const $0 = v._1;
23132
- return foldM4(Monad0)((u1) => (v2) => {
23133
- const $1 = v2._2;
23134
- return Monad0.Bind1().bind(apply5($0)(u1))((a) => apply5(a)($1));
23135
- })(v._2._1)(v._2._2._1._3._1);
23136
- }
23137
- return MonadThrow0.throwError(error("Function, value and dictionary expected"));
23178
+ return (dictLoadFile) => {
23179
+ const apply12 = apply5(dictLoadFile);
23180
+ return (v) => {
23181
+ 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") {
23182
+ const $0 = v._1;
23183
+ return foldM4(Monad0)((u1) => (v2) => {
23184
+ const $1 = v2._2;
23185
+ return Monad0.Bind1().bind(apply12($0)(u1))((a) => apply12(a)($1));
23186
+ })(v._2._1)(v._2._2._1._3._1);
23187
+ }
23188
+ return MonadThrow0.throwError(error("Function, value and dictionary expected"));
23189
+ };
23138
23190
  };
23139
23191
  };
23140
23192
  }
@@ -23148,7 +23200,7 @@ var dict_disjointUnion = /* @__PURE__ */ $Tuple(
23148
23200
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
23149
23201
  return (dictMonadError) => {
23150
23202
  const $$throw2 = $$throw(dictMonadError.MonadThrow0());
23151
- return (v) => {
23203
+ return (dictLoadFile) => (v) => {
23152
23204
  if (v.tag === "Cons" && v._1._3.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
23153
23205
  return $$new((a) => Val(a)(None))(insert(ordVertex)(v._2._1._1)()($$$Map(
23154
23206
  "Two",
@@ -23172,7 +23224,7 @@ var dict_difference = /* @__PURE__ */ $Tuple(
23172
23224
  const $$new = dictMonadWithGraphAlloc.new(typeNameVal);
23173
23225
  return (dictMonadError) => {
23174
23226
  const $$throw2 = $$throw(dictMonadError.MonadThrow0());
23175
- return (v) => {
23227
+ return (dictLoadFile) => (v) => {
23176
23228
  if (v.tag === "Cons" && v._1._3.tag === "Dictionary" && v._2.tag === "Cons" && v._2._1._3.tag === "Dictionary" && v._2._2.tag === "Nil") {
23177
23229
  return $$new((a) => Val(a)(None))(insert(ordVertex)(v._2._1._1)()($$$Map(
23178
23230
  "Two",
@@ -23194,7 +23246,7 @@ var debugLog = /* @__PURE__ */ $Tuple(
23194
23246
  arity: 1,
23195
23247
  op: (dictMonadWithGraphAlloc) => (dictMonadError) => {
23196
23248
  const MonadThrow0 = dictMonadError.MonadThrow0();
23197
- return (v) => {
23249
+ return (dictLoadFile) => (v) => {
23198
23250
  if (v.tag === "Cons" && v._2.tag === "Nil") {
23199
23251
  const $0 = v._1;
23200
23252
  return MonadThrow0.Monad0().Applicative0().pure(_trace($0, (v$1) => $0));
@@ -23290,6 +23342,7 @@ var verticesProgCxtVertex = {
23290
23342
  };
23291
23343
  var functorProgCxt = {
23292
23344
  map: (f) => (m) => ({
23345
+ fluidSrcPaths: m.fluidSrcPaths,
23293
23346
  primitives: _fmapObject(m.primitives, functorVal.map(f)),
23294
23347
  mods: listMap(functorModule.map(f))(m.mods),
23295
23348
  datasets: listMap((m$1) => $Tuple(m$1._1, functorExpr.map(f)(m$1._2)))(m.datasets)
@@ -23359,7 +23412,7 @@ var traversableProgCxt = {
23359
23412
  const traverse7 = traversableExpr.traverse(dictApplicative);
23360
23413
  const traverse8 = traversableModule.traverse(dictApplicative);
23361
23414
  const traverse9 = traversableEnv.traverse(dictApplicative);
23362
- 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));
23415
+ return (f) => (m) => Apply0.apply(Apply0.apply(Apply0.Functor0().map((v1) => (v2) => (v3) => ({ fluidSrcPaths: m.fluidSrcPaths, primitives: v3, mods: v2, datasets: v1 }))(traverse5(traversableTuple.traverse(dictApplicative)(traverse7(f)))(m.datasets)))(traverse5(traverse8(f))(m.mods)))(traverse9(f)(m.primitives));
23363
23416
  },
23364
23417
  sequence: (dictApplicative) => (v) => traversableProgCxt.traverse(dictApplicative)(identity25)(v),
23365
23418
  Functor0: () => functorProgCxt,
@@ -23372,7 +23425,6 @@ var concatM2 = (dictMonad) => foldrArray((() => {
23372
23425
  const $0 = dictMonad.Bind1();
23373
23426
  return (f) => (g) => (a) => $0.bind(f(a))(g);
23374
23427
  })())(dictMonad.Applicative0().pure);
23375
- var Folder = (x) => x;
23376
23428
  var parse = (dictMonadError) => {
23377
23429
  const $0 = dictMonadError.MonadThrow0();
23378
23430
  const $1 = $0.Monad0().Applicative0().pure;
@@ -23390,7 +23442,7 @@ var parse = (dictMonadError) => {
23390
23442
  };
23391
23443
  };
23392
23444
  };
23393
- var parseProgram = (loadFile2) => (folders) => (file) => (dictMonadAff) => (dictMonadError) => dictMonadAff.MonadEffect0().Monad0().Bind1().bind(loadFile2(folders)(file)(dictMonadAff)(dictMonadError))((() => {
23445
+ var parseProgram = (dictLoadFile) => (folders) => (file) => (dictMonadAff) => (dictMonadError) => dictMonadAff.MonadEffect0().Monad0().Bind1().bind(dictLoadFile.loadFile(dictMonadError)(dictMonadAff)(folders)(file))((() => {
23394
23446
  const $0 = parse(dictMonadError);
23395
23447
  return (a) => $0(a)(topLevel(expr_));
23396
23448
  })());
@@ -23401,18 +23453,22 @@ var module_2 = (dictMonadAff) => {
23401
23453
  return (dictMonadError) => {
23402
23454
  const parse1 = parse(dictMonadError);
23403
23455
  const desugarModuleFwd = moduleFwd(dictMonadError)(boundedLattice2);
23404
- return (loadFile2) => (folders) => (file) => (v) => {
23405
- const $0 = v.mods;
23406
- return Bind1.bind(Applicative0.pure())(() => Bind1.bind(loadFile2(folders)(file)(dictMonadAff)(dictMonadError))((src) => Bind1.bind(Bind1.bind(parse1(src)(module_))(desugarModuleFwd))((mod) => Applicative0.pure({
23407
- primitives: v.primitives,
23408
- mods: $List("Cons", mod, $0),
23409
- datasets: v.datasets
23410
- }))));
23456
+ return (dictLoadFile) => {
23457
+ const loadFile = dictLoadFile.loadFile(dictMonadError)(dictMonadAff);
23458
+ return (folders) => (file) => (v) => {
23459
+ const $0 = v.mods;
23460
+ return Bind1.bind(Applicative0.pure())(() => Bind1.bind(loadFile(folders)(file))((src) => Bind1.bind(Bind1.bind(parse1(src)(module_))(desugarModuleFwd))((mod) => Applicative0.pure({
23461
+ fluidSrcPaths: v.fluidSrcPaths,
23462
+ primitives: v.primitives,
23463
+ mods: $List("Cons", mod, $0),
23464
+ datasets: v.datasets
23465
+ }))));
23466
+ };
23411
23467
  };
23412
23468
  };
23413
23469
  };
23414
- var initialConfig = (dictMonadError) => {
23415
- const Monad0 = dictMonadError.MonadThrow0().Monad0();
23470
+ var initialConfig = (dictMonadAff) => {
23471
+ const Monad0 = dictMonadAff.MonadEffect0().Monad0();
23416
23472
  const Bind1 = Monad0.Bind1();
23417
23473
  const Applicative0 = Monad0.Applicative0();
23418
23474
  const $0 = monadAllocAllocT(Monad0);
@@ -23423,29 +23479,54 @@ var initialConfig = (dictMonadError) => {
23423
23479
  Applicative0: () => applicativeStateT(Monad0),
23424
23480
  Bind1: () => bindStateT(Monad0)
23425
23481
  })(graphGraphImpl);
23426
- const eval_progCxt2 = eval_progCxt(monadWithGraphAllocWithGr(dictMonadError));
23427
- return (dictFV) => (e) => (progCxt) => Bind1.bind(Applicative0.pure())(() => Bind1.bind(runAllocT(Monad0)($1.bind(alloc(progCxt))((progCxt$p) => $1.bind(runWithGraphT_spy2(eval_progCxt2(progCxt$p))(verticesProgCxtVertex.vertices(progCxt$p)))((v) => applicativeStateT(Monad0).pure($Tuple(
23428
- progCxt$p,
23429
- (() => {
23430
- const $2 = dictFV.fv(e);
23431
- return filterWithKey2((x) => {
23432
- const $3 = setSet(ordString).member(x)($2);
23433
- return (v$1) => $3;
23434
- })(v._2);
23435
- })()
23436
- )))))(0))((v) => Applicative0.pure({ n: v._1, progCxt: v._2._2._1, "\u03B3": v._2._2._2 })));
23482
+ const $2 = monadAffState(dictMonadAff).MonadEffect0().Monad0();
23483
+ const $3 = dictMonadAff.MonadEffect0().Monad0();
23484
+ return (dictMonadError) => {
23485
+ const eval_progCxt2 = eval_progCxt(monadWithGraphAllocWithGr(dictMonadError));
23486
+ return (dictLoadFile) => {
23487
+ const eval_progCxt1 = eval_progCxt2((() => {
23488
+ const loadFile1 = dictLoadFile.loadFile(dictMonadError)(dictMonadAff);
23489
+ return {
23490
+ loadFile: (dictMonadError1) => (dictMonadAff1) => (folders) => {
23491
+ const $4 = loadFile1(folders);
23492
+ return (x) => {
23493
+ const $5 = $4(x);
23494
+ return (s) => $2.Bind1().bind((s$1) => $3.Bind1().bind($5)((x$1) => $3.Applicative0().pure($Tuple(x$1, s$1))))((x$1) => $2.Applicative0().pure($Tuple(
23495
+ x$1,
23496
+ s
23497
+ )));
23498
+ };
23499
+ }
23500
+ };
23501
+ })());
23502
+ return (dictFV) => (e) => (progCxt) => Bind1.bind(Applicative0.pure())(() => Bind1.bind(runAllocT(Monad0)($1.bind(alloc(progCxt))((progCxt$p) => $1.bind(runWithGraphT_spy2(eval_progCxt1(progCxt$p))(verticesProgCxtVertex.vertices(progCxt$p)))((v) => applicativeStateT(Monad0).pure($Tuple(
23503
+ progCxt$p,
23504
+ (() => {
23505
+ const $4 = dictFV.fv(e);
23506
+ return filterWithKey2((x) => {
23507
+ const $5 = setSet(ordString).member(x)($4);
23508
+ return (v$1) => $5;
23509
+ })(v._2);
23510
+ })()
23511
+ )))))(0))((v) => Applicative0.pure({ n: v._1, progCxt: v._2._2._1, "\u03B3": v._2._2._2 })));
23512
+ };
23513
+ };
23437
23514
  };
23438
23515
  var prepConfig = (dictMonadAff) => {
23439
23516
  const Monad0 = dictMonadAff.MonadEffect0().Monad0();
23440
23517
  const $0 = Monad0.Bind1();
23518
+ const initialConfig1 = initialConfig(dictMonadAff);
23441
23519
  return (dictMonadError) => {
23442
23520
  const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
23443
- const initialConfig1 = initialConfig(dictMonadError)(fVExpr);
23444
- return (v) => (file) => (progCxt) => $0.bind(parseProgram(v.loadFile)(v.fluidSrcPaths)(file)(dictMonadAff)(dictMonadError))((s) => $0.bind(desug1(s))((e) => $0.bind(initialConfig1(e)(progCxt))((gconfig) => Monad0.Applicative0().pure({
23445
- s,
23446
- e,
23447
- gconfig
23448
- }))));
23521
+ const initialConfig2 = initialConfig1(dictMonadError);
23522
+ return (dictLoadFile) => {
23523
+ const initialConfig3 = initialConfig2(dictLoadFile)(fVExpr);
23524
+ return (v) => (file) => (progCxt) => $0.bind(parseProgram(dictLoadFile)(v.fluidSrcPaths)(file)(dictMonadAff)(dictMonadError))((s) => $0.bind(desug1(s))((e) => $0.bind(initialConfig3(e)(progCxt))((gconfig) => Monad0.Applicative0().pure({
23525
+ s,
23526
+ e,
23527
+ gconfig
23528
+ }))));
23529
+ };
23449
23530
  };
23450
23531
  };
23451
23532
  var datasetAs = (dictMonadAff) => {
@@ -23453,10 +23534,11 @@ var datasetAs = (dictMonadAff) => {
23453
23534
  const $0 = Monad0.Bind1();
23454
23535
  return (dictMonadError) => {
23455
23536
  const desug1 = exprFwd(boundedLattice2)(dictMonadError)(joinSemilatticeUnit);
23456
- return (loadFile2) => (folders) => (v) => (v1) => {
23537
+ return (dictLoadFile) => (folders) => (v) => (v1) => {
23457
23538
  const $1 = v1.datasets;
23458
23539
  const $2 = v._1;
23459
- return $0.bind($0.bind(parseProgram(loadFile2)(folders)(v._2)(dictMonadAff)(dictMonadError))(desug1))((e\u03B1) => Monad0.Applicative0().pure({
23540
+ return $0.bind($0.bind(parseProgram(dictLoadFile)(folders)(v._2)(dictMonadAff)(dictMonadError))(desug1))((e\u03B1) => Monad0.Applicative0().pure({
23541
+ fluidSrcPaths: v1.fluidSrcPaths,
23460
23542
  primitives: v1.primitives,
23461
23543
  mods: v1.mods,
23462
23544
  datasets: $List("Cons", $Tuple($2, e\u03B1), $1)
@@ -23473,20 +23555,24 @@ var loadProgCxt = (dictMonadAff) => {
23473
23555
  return (dictMonadError) => {
23474
23556
  const module_22 = module_1(dictMonadError);
23475
23557
  const datasetAs2 = datasetAs1(dictMonadError);
23476
- return (v) => (mods) => (datasets) => $0.bind($0.bind(Monad0.Applicative0().pure({
23477
- primitives,
23478
- mods: Nil,
23479
- datasets: Nil
23480
- }))(concatM1(arrayMap(module_22(v.loadFile)(v.fluidSrcPaths))(["lib/prelude", ...mods]))))(concatM1(arrayMap((() => {
23481
- const $1 = datasetAs2(v.loadFile)(v.fluidSrcPaths);
23482
- return (x) => $1($Tuple(x._1, x._2));
23483
- })())(datasets)));
23558
+ return (dictLoadFile) => {
23559
+ const module_3 = module_22(dictLoadFile);
23560
+ const datasetAs3 = datasetAs2(dictLoadFile);
23561
+ return (v) => (mods) => (datasets) => $0.bind($0.bind(Monad0.Applicative0().pure({
23562
+ fluidSrcPaths: v.fluidSrcPaths,
23563
+ primitives,
23564
+ mods: Nil,
23565
+ datasets: Nil
23566
+ }))(concatM1(arrayMap(module_3(v.fluidSrcPaths))(["lib/prelude", ...mods]))))(concatM1(arrayMap((() => {
23567
+ const $1 = datasetAs3(v.fluidSrcPaths);
23568
+ return (x) => $1($Tuple(x._1, x._2));
23569
+ })())(datasets)));
23570
+ };
23484
23571
  };
23485
23572
  };
23486
23573
 
23487
23574
  // output-es/Node.Encoding/index.js
23488
23575
  var $Encoding = (tag) => tag;
23489
- var ASCII = /* @__PURE__ */ $Encoding("ASCII");
23490
23576
  var UTF8 = /* @__PURE__ */ $Encoding("UTF8");
23491
23577
 
23492
23578
  // output-es/Data.Nullable/foreign.js
@@ -23494,48 +23580,6 @@ function nullable(a, r, f) {
23494
23580
  return a == null ? r : f(a);
23495
23581
  }
23496
23582
 
23497
- // output-es/Node.Buffer.Immutable/foreign.js
23498
- function toStringImpl(enc) {
23499
- return (buff) => {
23500
- return buff.toString(enc);
23501
- };
23502
- }
23503
-
23504
- // output-es/Node.Buffer.Immutable/index.js
23505
- var toString = (x) => toStringImpl((() => {
23506
- if (x === "ASCII") {
23507
- return "ascii";
23508
- }
23509
- if (x === "UTF8") {
23510
- return "utf8";
23511
- }
23512
- if (x === "UTF16LE") {
23513
- return "utf16le";
23514
- }
23515
- if (x === "UCS2") {
23516
- return "ucs2";
23517
- }
23518
- if (x === "Base64") {
23519
- return "base64";
23520
- }
23521
- if (x === "Latin1") {
23522
- return "latin1";
23523
- }
23524
- if (x === "Binary") {
23525
- return "binary";
23526
- }
23527
- if (x === "Hex") {
23528
- return "hex";
23529
- }
23530
- fail();
23531
- })());
23532
-
23533
- // output-es/Node.Buffer.Internal/index.js
23534
- var toString2 = (dictMonad) => (m) => {
23535
- const $0 = toString(m);
23536
- return (buf) => dictMonad.Bind1().Apply0().Functor0().map($0)(dictMonad.Applicative0().pure(buf));
23537
- };
23538
-
23539
23583
  // output-es/Node.FS.Constants/foreign.js
23540
23584
  import { constants } from "node:fs";
23541
23585
  var f_OK = constants.F_OK;
@@ -23657,171 +23701,33 @@ var findM = (dictMonad) => {
23657
23701
  const $0 = dictMonad.Bind1().Apply0();
23658
23702
  return (dictFoldable) => (xs) => (f) => (base) => dictFoldable.foldr((x) => (acc) => $0.apply($0.Functor0().map(altMaybe.alt)(acc))(f(x)))(dictMonad.Applicative0().pure(base))(xs);
23659
23703
  };
23660
- var loadFile = (folders) => (v) => (dictMonadAff) => {
23704
+ var loadFileNodeT = (dictMonadAff) => {
23661
23705
  const Monad0 = dictMonadAff.MonadEffect0().Monad0();
23662
23706
  const $0 = Monad0.Bind1();
23663
23707
  const findM1 = findM(Monad0)(foldableArray);
23664
- return (dictMonadError) => $0.bind(findM1(arrayMap((() => {
23665
- const $1 = v + ".fld";
23666
- return (a) => a + "/" + $1;
23667
- })())(folders))((v1) => $0.bind(dictMonadAff.liftAff($$try3(toAff1(stat2)(v1))))((stats) => Monad0.Applicative0().pure((() => {
23668
- if (stats.tag === "Left") {
23669
- return false;
23670
- }
23671
- if (stats.tag === "Right") {
23672
- return isFileImpl(stats._1);
23673
- }
23674
- fail();
23675
- })() ? $Maybe("Just", v1) : Nothing)))(Nothing))((url) => {
23676
- if (url.tag === "Nothing") {
23677
- return throwException(error("File " + v + " not found."))();
23678
- }
23679
- if (url.tag === "Just") {
23680
- return dictMonadAff.liftAff(toAff2(readTextFile)(UTF8)(url._1));
23681
- }
23682
- fail();
23683
- });
23684
- };
23685
- var loadProgCxt2 = (dictMonadAff) => {
23686
- const loadProgCxt1 = loadProgCxt(dictMonadAff);
23687
- return (dictMonadError) => {
23688
- const loadProgCxt22 = loadProgCxt1(dictMonadError);
23689
- return (fluidSrcPaths) => loadProgCxt22({ loadFile, fluidSrcPaths });
23690
- };
23691
- };
23692
- var prepConfig2 = (dictMonadAff) => {
23693
- const prepConfig1 = prepConfig(dictMonadAff);
23694
- return (dictMonadError) => {
23695
- const prepConfig22 = prepConfig1(dictMonadError);
23696
- return (fluidSrcPaths) => prepConfig22({ loadFile, fluidSrcPaths });
23697
- };
23698
- };
23699
-
23700
- // output-es/Node.ChildProcess/foreign.js
23701
- import { spawn, exec, execFile, execSync, execFileSync, fork as cp_fork } from "child_process";
23702
- function execImpl(command2) {
23703
- return (opts) => (callback2) => () => exec(
23704
- command2,
23705
- opts,
23706
- (err, stdout, stderr) => {
23707
- callback2(err)(stdout)(stderr)();
23708
- }
23709
- );
23710
- }
23711
- var _undefined = void 0;
23712
-
23713
- // output-es/Node.ChildProcess/index.js
23714
- var convertExecOptions = (opts) => ({
23715
- cwd: (() => {
23716
- if (opts.cwd.tag === "Nothing") {
23717
- return _undefined;
23718
- }
23719
- if (opts.cwd.tag === "Just") {
23720
- return opts.cwd._1;
23721
- }
23722
- fail();
23723
- })(),
23724
- env: (() => {
23725
- if (opts.env.tag === "Nothing") {
23726
- return _undefined;
23727
- }
23728
- if (opts.env.tag === "Just") {
23729
- return opts.env._1;
23730
- }
23731
- fail();
23732
- })(),
23733
- encoding: (() => {
23734
- if (opts.encoding.tag === "Nothing") {
23735
- return _undefined;
23736
- }
23737
- if (opts.encoding.tag === "Just") {
23738
- if (opts.encoding._1 === "ASCII") {
23739
- return "ascii";
23740
- }
23741
- if (opts.encoding._1 === "UTF8") {
23742
- return "utf8";
23743
- }
23744
- if (opts.encoding._1 === "UTF16LE") {
23745
- return "utf16le";
23746
- }
23747
- if (opts.encoding._1 === "UCS2") {
23748
- return "ucs2";
23749
- }
23750
- if (opts.encoding._1 === "Base64") {
23751
- return "base64";
23708
+ return (dictMonadError) => ({
23709
+ loadFile: (dictMonadError1) => (dictMonadAff1) => (folders) => (v) => $0.bind(findM1(arrayMap((() => {
23710
+ const $1 = v + ".fld";
23711
+ return (a) => a + "/" + $1;
23712
+ })())(folders))((v1) => $0.bind(dictMonadAff1.liftAff($$try3(toAff1(stat2)(v1))))((stats) => Monad0.Applicative0().pure((() => {
23713
+ if (stats.tag === "Left") {
23714
+ return false;
23752
23715
  }
23753
- if (opts.encoding._1 === "Latin1") {
23754
- return "latin1";
23716
+ if (stats.tag === "Right") {
23717
+ return isFileImpl(stats._1);
23755
23718
  }
23756
- if (opts.encoding._1 === "Binary") {
23757
- return "binary";
23719
+ fail();
23720
+ })() ? $Maybe("Just", v1) : Nothing)))(Nothing))((url) => {
23721
+ if (url.tag === "Nothing") {
23722
+ return throwException(error("File " + v + " not found."))();
23758
23723
  }
23759
- if (opts.encoding._1 === "Hex") {
23760
- return "hex";
23724
+ if (url.tag === "Just") {
23725
+ return dictMonadAff1.liftAff(toAff2(readTextFile)(UTF8)(url._1));
23761
23726
  }
23762
- }
23763
- fail();
23764
- })(),
23765
- shell: (() => {
23766
- if (opts.shell.tag === "Nothing") {
23767
- return _undefined;
23768
- }
23769
- if (opts.shell.tag === "Just") {
23770
- return opts.shell._1;
23771
- }
23772
- fail();
23773
- })(),
23774
- timeout: (() => {
23775
- if (opts.timeout.tag === "Nothing") {
23776
- return _undefined;
23777
- }
23778
- if (opts.timeout.tag === "Just") {
23779
- return opts.timeout._1;
23780
- }
23781
- fail();
23782
- })(),
23783
- maxBuffer: (() => {
23784
- if (opts.maxBuffer.tag === "Nothing") {
23785
- return _undefined;
23786
- }
23787
- if (opts.maxBuffer.tag === "Just") {
23788
- return opts.maxBuffer._1;
23789
- }
23790
- fail();
23791
- })(),
23792
- killSignal: (() => {
23793
- if (opts.killSignal.tag === "Nothing") {
23794
- return _undefined;
23795
- }
23796
- if (opts.killSignal.tag === "Just") {
23797
- return opts.killSignal._1;
23798
- }
23799
- fail();
23800
- })(),
23801
- uid: (() => {
23802
- if (opts.uid.tag === "Nothing") {
23803
- return _undefined;
23804
- }
23805
- if (opts.uid.tag === "Just") {
23806
- return opts.uid._1;
23807
- }
23808
- fail();
23809
- })(),
23810
- gid: (() => {
23811
- if (opts.gid.tag === "Nothing") {
23812
- return _undefined;
23813
- }
23814
- if (opts.gid.tag === "Just") {
23815
- return opts.gid._1;
23816
- }
23817
- fail();
23818
- })()
23819
- });
23820
- var exec2 = (cmd) => (opts) => (callback2) => execImpl(cmd)(convertExecOptions(opts))((err) => (stdout$p) => (stderr$p) => callback2({
23821
- error: nullable(err, Nothing, Just),
23822
- stdout: stdout$p,
23823
- stderr: stderr$p
23824
- }));
23727
+ fail();
23728
+ })
23729
+ });
23730
+ };
23825
23731
 
23826
23732
  // output-es/Options.Applicative.Internal.Utils/index.js
23827
23733
  var whitespaceRegex = /* @__PURE__ */ (() => {
@@ -24776,10 +24682,10 @@ var abortOption = (err) => (m) => {
24776
24682
  };
24777
24683
 
24778
24684
  // output-es/Node.Process/foreign.js
24779
- import process2 from "process";
24685
+ import process from "process";
24780
24686
  function exit(code) {
24781
24687
  return () => {
24782
- process2.exit(code);
24688
+ process.exit(code);
24783
24689
  };
24784
24690
  }
24785
24691
  function copyArray(xs) {
@@ -24787,7 +24693,7 @@ function copyArray(xs) {
24787
24693
  }
24788
24694
 
24789
24695
  // output-es/Node.Process/index.js
24790
- var argv = /* @__PURE__ */ (() => copyArray(process2.argv))();
24696
+ var argv = /* @__PURE__ */ (() => copyArray(process.argv))();
24791
24697
 
24792
24698
  // output-es/Node.Stream/foreign.js
24793
24699
  function writeStringImpl(w) {
@@ -26947,7 +26853,7 @@ var handleParseResult = (v) => {
26947
26853
  return () => {
26948
26854
  const progn = getProgName();
26949
26855
  const v1 = renderFailure($0)(progn);
26950
- writeString(v1._2 === "Success" ? process2.stdout : process2.stderr)(UTF8)(v1._1 + "\n")(mempty22)();
26856
+ writeString(v1._2 === "Success" ? process.stdout : process.stderr)(UTF8)(v1._1 + "\n")(mempty22)();
26951
26857
  return exit(boundedEnumExitCode.fromEnum(v1._2))();
26952
26858
  };
26953
26859
  }
@@ -26956,7 +26862,7 @@ var handleParseResult = (v) => {
26956
26862
  return () => {
26957
26863
  const progn = getProgName();
26958
26864
  const msg = $0.execCompletion(progn)();
26959
- writeString(process2.stdout)(UTF8)(msg)(mempty22)();
26865
+ writeString(process.stdout)(UTF8)(msg)(mempty22)();
26960
26866
  return exitSuccess();
26961
26867
  };
26962
26868
  }
@@ -26984,15 +26890,14 @@ var execParserPure = (pprefs) => (pinfo) => (args) => {
26984
26890
  };
26985
26891
 
26986
26892
  // output-es/Fluid/index.js
26987
- var $BundleArgs = (_1, _2) => ({ tag: "BundleArgs", _1, _2 });
26988
- var $Command = (tag, _1) => ({ tag, _1 });
26893
+ var $Command = (_1) => ({ tag: "Evaluate", _1 });
26989
26894
  var $EvalArgs = (_1) => ({ tag: "EvalArgs", _1 });
26990
- var loadProgCxt3 = /* @__PURE__ */ loadProgCxt2(monadAffAff)(monadErrorAff);
26991
- var prepConfig3 = /* @__PURE__ */ prepConfig2(monadAffAff)(monadErrorAff);
26992
- var graphEval2 = /* @__PURE__ */ graphEval(monadErrorAff);
26895
+ var loadFileNodeT2 = /* @__PURE__ */ loadFileNodeT(monadAffAff)(monadErrorAff);
26896
+ var loadProgCxt2 = /* @__PURE__ */ loadProgCxt(monadAffAff)(monadErrorAff)(loadFileNodeT2);
26897
+ var prepConfig2 = /* @__PURE__ */ prepConfig(monadAffAff)(monadErrorAff)(loadFileNodeT2);
26898
+ var graphEval2 = /* @__PURE__ */ graphEval(monadAffAff)(loadFileNodeT2)(monadErrorAff);
26993
26899
  var fromFoldable25 = /* @__PURE__ */ (() => fromFoldableImpl(foldableList.foldr))();
26994
- var Evaluate = (value0) => $Command("Evaluate", value0);
26995
- var BundleWebsite = (value0) => $Command("BundleWebsite", value0);
26900
+ var Evaluate = (value0) => $Command(value0);
26996
26901
  var parseLocal = /* @__PURE__ */ $Parser(
26997
26902
  "AltP",
26998
26903
  /* @__PURE__ */ flag$p(true)(/* @__PURE__ */ (() => {
@@ -27027,42 +26932,13 @@ var parseImports = /* @__PURE__ */ $Parser(
27027
26932
  );
27028
26933
  })()))
27029
26934
  );
27030
- var parseBundleArgs = /* @__PURE__ */ (() => $Parser(
27031
- "MultP",
27032
- $MultPE(
27033
- parserFunctor.map((v) => (v1) => $BundleArgs(v, v1))(parserFunctor.map(Folder)(option(readerAsk)((() => {
27034
- const $0 = help("root directory of website under dist/");
27035
- const $1 = $0._2._2.tag === "Nothing" ? Nothing : $0._2._2;
27036
- return $Mod(
27037
- (x) => $0._1({
27038
- optNames: [$OptName("OptShort", "w"), $OptName("OptLong", "website"), ...x.optNames],
27039
- optCompleter: x.optCompleter,
27040
- optNoArgError: x.optNoArgError
27041
- }),
27042
- $DefaultProp($Maybe("Just", "Misc"), $1.tag === "Nothing" ? Nothing : $1),
27043
- (x) => $0._3(x)
27044
- );
27045
- })()))),
27046
- parseLocal
27047
- )
27048
- ))();
27049
26935
  var evaluate = (v) => {
27050
26936
  const $0 = v._1.fileName;
27051
26937
  const fluidSrcPaths = [v._1.fluidSrcPath, ...v._1.local ? ["node_modules/@explorable-viz/fluid/dist/fluid/fluid"] : []];
27052
- return _bind(loadProgCxt3(fluidSrcPaths)(v._1.imports)(v._1.datasets))((progCxt) => _bind(prepConfig3(fluidSrcPaths)($0)(progCxt))((v1) => _bind(graphEval2(v1.gconfig)(v1.e))((v2) => _pure(functorVal.map((v$1) => {
26938
+ return _bind(loadProgCxt2({ fluidSrcPaths })(v._1.imports)(v._1.datasets))((progCxt) => _bind(prepConfig2({ fluidSrcPaths })($0)(progCxt))((v1) => _bind(graphEval2(v1.gconfig)(v1.e))((v2) => _pure(functorVal.map((v$1) => {
27053
26939
  })(v2["out\u03B1"])))));
27054
26940
  };
27055
- var copyOptions = {
27056
- cwd: Nothing,
27057
- env: Nothing,
27058
- timeout: Nothing,
27059
- killSignal: Nothing,
27060
- maxBuffer: Nothing,
27061
- uid: Nothing,
27062
- gid: Nothing,
27063
- encoding: Nothing,
27064
- shell: Nothing
27065
- };
26941
+ var dispatchCommand = (v) => _bind(evaluate(v._1))((v1) => _liftEffect(log(intercalate4("\n")(removeDocWS(prettyVal(highlightableUnit).pretty(v1)).lines))));
27066
26942
  var callback = (v) => {
27067
26943
  if (v.tag === "Left") {
27068
26944
  return log(showErrorImpl(v._1));
@@ -27073,29 +26949,6 @@ var callback = (v) => {
27073
26949
  }
27074
26950
  fail();
27075
26951
  };
27076
- var bundleWebsite = (v) => exec2((v._2 ? "./node_modules/@explorable-viz/fluid/script/bundle-website.sh -w " : "./script/bundle-website.sh -w ") + (v._2 ? v._1 + " -l" : v._1 + ""))(copyOptions)((v1) => {
27077
- if (v1.error.tag === "Just") {
27078
- return log(showErrorImpl(v1.error._1));
27079
- }
27080
- if (v1.error.tag === "Nothing") {
27081
- const $0 = toString2(monadEffect)(ASCII)(v1.stdout);
27082
- return () => {
27083
- const $1 = $0();
27084
- return log($1)();
27085
- };
27086
- }
27087
- fail();
27088
- });
27089
- var dispatchCommand = (v) => {
27090
- if (v.tag === "Evaluate") {
27091
- return _bind(evaluate(v._1))((v1) => _liftEffect(log(intercalate4("\n")(removeDocWS(prettyVal(highlightableUnit).pretty(v1)).lines))));
27092
- }
27093
- if (v.tag === "BundleWebsite") {
27094
- return _map((v$1) => {
27095
- })(_liftEffect(bundleWebsite(v._1)));
27096
- }
27097
- fail();
27098
- };
27099
26952
  var between3 = (p1) => (p2) => (f) => (s) => {
27100
26953
  const $0 = stripPrefix(p1)(s);
27101
26954
  const v = (() => {
@@ -27190,32 +27043,16 @@ var parseEvaluate = /* @__PURE__ */ (() => $Parser(
27190
27043
  })()))
27191
27044
  )
27192
27045
  ))();
27193
- var commands = /* @__PURE__ */ (() => ({ bundleWebsite: parserFunctor.map(BundleWebsite)(parseBundleArgs), evaluate: parserFunctor.map(Evaluate)(parseEvaluate) }))();
27194
- var commandParser = /* @__PURE__ */ subparser(/* @__PURE__ */ (() => {
27195
- const $0 = command("evaluate")(progDesc("Evaluate a file")({
27196
- infoParser: commands.evaluate,
27197
- infoFullDesc: true,
27198
- infoProgDesc: mempty12,
27199
- infoHeader: mempty12,
27200
- infoFooter: mempty12,
27201
- infoFailureCode: $$Error,
27202
- infoPolicy: Intersperse
27203
- }));
27204
- const $1 = command("bundle-website")(progDesc("Bundle a website to dist")({
27205
- infoParser: commands.bundleWebsite,
27206
- infoFullDesc: true,
27207
- infoProgDesc: mempty12,
27208
- infoHeader: mempty12,
27209
- infoFooter: mempty12,
27210
- infoFailureCode: $$Error,
27211
- infoPolicy: Intersperse
27212
- }));
27213
- return $Mod(
27214
- (x) => $1._1($0._1(x)),
27215
- $DefaultProp($1._2._1.tag === "Nothing" ? $0._2._1 : $1._2._1, $1._2._2.tag === "Nothing" ? $0._2._2 : $1._2._2),
27216
- (x) => $1._3($0._3(x))
27217
- );
27218
- })());
27046
+ var commands = /* @__PURE__ */ (() => ({ evaluate: parserFunctor.map(Evaluate)(parseEvaluate) }))();
27047
+ var commandParser = /* @__PURE__ */ (() => subparser(command("evaluate")(progDesc("Evaluate a file")({
27048
+ infoParser: commands.evaluate,
27049
+ infoFullDesc: true,
27050
+ infoProgDesc: mempty12,
27051
+ infoHeader: mempty12,
27052
+ infoFooter: mempty12,
27053
+ infoFailureCode: $$Error,
27054
+ infoPolicy: Intersperse
27055
+ }))))();
27219
27056
  var main = /* @__PURE__ */ (() => {
27220
27057
  const $0 = runAff(callback)(_bind(_liftEffect((() => {
27221
27058
  const $02 = header("parse - a simple parser")(progDesc("Parse a file")({