@explorable-viz/fluid 0.10.3 → 0.10.5

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.
@@ -11538,7 +11538,7 @@ var assertPresent = (v) => (v1) => {
11538
11538
  }
11539
11539
  fail();
11540
11540
  })();
11541
- return assertWhen(true)($0 + " is an existing vertex")((v2) => present)(() => $Step("Loop", $1))();
11541
+ return assertWhen(false)($0 + " is an existing vertex")((v2) => present)(() => $Step("Loop", $1))();
11542
11542
  };
11543
11543
  }
11544
11544
  fail();
@@ -11767,7 +11767,7 @@ var runWithGraphT = (dictMonad) => {
11767
11767
  const freezeGraph2 = freezeGraph1(dictGraph);
11768
11768
  return (m) => (\u03B1s) => dictMonad.Bind1().bind(freezeGraph2(m)(\u03B1s))((v) => {
11769
11769
  const $0 = v._1;
11770
- return assertWhen(true)("edgeListGC")((v1) => dictGraph.Eq0().eq($0)(dictGraph.fromEdgeList(Leaf2)(toEdgeList(dictGraph)($0))))(dictMonad.Applicative0().pure($Tuple(
11770
+ return assertWhen(false)("edgeListGC")((v1) => dictGraph.Eq0().eq($0)(dictGraph.fromEdgeList(Leaf2)(toEdgeList(dictGraph)($0))))(dictMonad.Applicative0().pure($Tuple(
11771
11771
  $0,
11772
11772
  v._2
11773
11773
  )));
@@ -11844,7 +11844,7 @@ var fwdSlice = (dictGraph) => {
11844
11844
  return pure($Step("Loop", { pending: insert(ordVertex)(v1.es._1._1)(\u03B2s)(v1.pending), es: v1.es._2 }));
11845
11845
  }
11846
11846
  fail();
11847
- })({ pending: Leaf2, es: inEdges(dictGraph)($0)($1) }))(assertWhen(true)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(dictGraph.sinks($0)).tag === "Leaf")(map(ordDVertex$p)((\u03B1) => $Tuple(
11847
+ })({ pending: Leaf2, es: inEdges(dictGraph)($0)($1) }))(assertWhen(false)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(dictGraph.sinks($0)).tag === "Leaf")(map(ordDVertex$p)((\u03B1) => $Tuple(
11848
11848
  \u03B1,
11849
11849
  dictGraph.vertexData($0)(\u03B1)
11850
11850
  ))($1)))._1;
@@ -11888,7 +11888,7 @@ var bwdSlice = (dictGraph) => {
11888
11888
  fail();
11889
11889
  })({
11890
11890
  visited: Leaf2,
11891
- "\u03B1s": fromFoldable8(assertWhen(true)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(addresses2($0)).tag === "Leaf")($1)),
11891
+ "\u03B1s": fromFoldable8(assertWhen(false)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(addresses2($0)).tag === "Leaf")($1)),
11892
11892
  pending: Nil
11893
11893
  }))(Leaf2)._1;
11894
11894
  };
@@ -16214,186 +16214,149 @@ var codePointAt = (v) => (v1) => {
16214
16214
  };
16215
16215
 
16216
16216
  // output-es/Temp.Pretty.Doc/index.js
16217
- var $Collection = (tag) => tag;
16218
16217
  var $Doc = (tag, _1, _2) => ({ tag, _1, _2 });
16219
16218
  var $Format = (tag) => tag;
16219
+ var $Mode = (tag) => tag;
16220
+ var Stmt = /* @__PURE__ */ $Mode("Stmt");
16221
+ var Expr = /* @__PURE__ */ $Mode("Expr");
16220
16222
  var Inline = /* @__PURE__ */ $Format("Inline");
16221
16223
  var Multiline = /* @__PURE__ */ $Format("Multiline");
16222
- var Squash = /* @__PURE__ */ $Format("Squash");
16223
- var Record = /* @__PURE__ */ $Collection("Record");
16224
16224
  var Empty = /* @__PURE__ */ $Doc("Empty");
16225
16225
  var Line = /* @__PURE__ */ $Doc("Line");
16226
- var Collection = (value0) => (value1) => $Doc("Collection", value0, value1);
16227
- var intercalate3 = (sep) => (xs) => {
16228
- const go = (go$a0$copy) => (go$a1$copy) => {
16229
- let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
16230
- while (go$c) {
16231
- const b = go$a0, v = go$a1;
16232
- if (v.tag === "Nil") {
16233
- go$c = false;
16234
- go$r = b;
16235
- continue;
16236
- }
16237
- if (v.tag === "Cons") {
16238
- go$a0 = b.init ? { init: false, acc: v._1 } : { init: false, acc: $Doc("Concat", b.acc, $Doc("Concat", sep, v._1)) };
16239
- go$a1 = v._2;
16240
- continue;
16241
- }
16242
- fail();
16243
- }
16244
- return go$r;
16245
- };
16246
- return go({ init: true, acc: Empty })(xs).acc;
16247
- };
16248
- var widthList = (v) => {
16249
- if (v.tag === "Nil") {
16226
+ var Mode = (value0) => (value1) => $Doc("Mode", value0, value1);
16227
+ var width = (m) => (doc2) => {
16228
+ if (doc2.tag === "Empty") {
16250
16229
  return 0;
16251
16230
  }
16252
- if (v.tag === "Cons") {
16253
- if (v._2.tag === "Nil") {
16254
- return width(v._1);
16255
- }
16256
- return (width(v._1) + 2 | 0) + widthList(v._2) | 0;
16257
- }
16258
- fail();
16259
- };
16260
- var width = (v) => {
16261
- if (v.tag === "Empty") {
16231
+ if (doc2.tag === "Line") {
16262
16232
  return 0;
16263
16233
  }
16264
- if (v.tag === "Line") {
16265
- return 0;
16234
+ if (doc2.tag === "Text") {
16235
+ return toCodePointArray(doc2._1).length;
16266
16236
  }
16267
- if (v.tag === "Text") {
16268
- return toCodePointArray(v._1).length;
16237
+ if (doc2.tag === "Indent") {
16238
+ return width(m)(doc2._1);
16269
16239
  }
16270
- if (v.tag === "Indent") {
16271
- return width(v._1);
16240
+ if (doc2.tag === "Concat") {
16241
+ return width(m)(doc2._1) + width(m)(doc2._2) | 0;
16272
16242
  }
16273
- if (v.tag === "Concat") {
16274
- return width(v._1) + width(v._2) | 0;
16243
+ if (doc2.tag === "Mode") {
16244
+ return width(doc2._1)(doc2._2);
16275
16245
  }
16276
- if (v.tag === "Block") {
16277
- return width(v._1);
16246
+ if (doc2.tag === "StmtOrExpr") {
16247
+ if (m === "Stmt") {
16248
+ return width(m)(doc2._1);
16249
+ }
16250
+ if (m === "Expr") {
16251
+ return width(m)(doc2._2);
16252
+ }
16253
+ fail();
16278
16254
  }
16279
- if (v.tag === "Collection") {
16280
- return widthList(v._2);
16255
+ if (doc2.tag === "InlOrMul") {
16256
+ return width(m)(doc2._1);
16281
16257
  }
16282
16258
  fail();
16283
16259
  };
16260
+ var stmt = /* @__PURE__ */ Mode(Stmt);
16284
16261
  var spaces = (n) => {
16285
16262
  if (n <= 0) {
16286
16263
  return "";
16287
16264
  }
16288
16265
  return " " + spaces(n - 1 | 0);
16289
16266
  };
16290
- var record = /* @__PURE__ */ Collection(Record);
16291
- var inlinable = (doc2) => {
16267
+ var inlinable = (m) => (doc2) => {
16268
+ if (doc2.tag === "Empty") {
16269
+ return true;
16270
+ }
16292
16271
  if (doc2.tag === "Line") {
16293
16272
  return false;
16294
16273
  }
16274
+ if (doc2.tag === "Text") {
16275
+ return true;
16276
+ }
16295
16277
  if (doc2.tag === "Indent") {
16296
16278
  return false;
16297
16279
  }
16298
16280
  if (doc2.tag === "Concat") {
16299
- return inlinable(doc2._1) && inlinable(doc2._2);
16281
+ return inlinable(m)(doc2._1) && inlinable(m)(doc2._2);
16300
16282
  }
16301
- return true;
16302
- };
16303
- var format = (doc2) => {
16304
- if (doc2.tag === "Block") {
16305
- if (doc2._1.tag === "Collection") {
16306
- return Inline;
16307
- }
16308
- if (inlinable(doc2._1) && width(doc2._1) < 20) {
16309
- return Inline;
16310
- }
16311
- return Multiline;
16283
+ if (doc2.tag === "Mode") {
16284
+ return inlinable(doc2._1)(doc2._2);
16312
16285
  }
16313
- if (doc2.tag === "Collection") {
16314
- if (widthList(doc2._2) === 0) {
16315
- return Squash;
16286
+ if (doc2.tag === "StmtOrExpr") {
16287
+ if (m === "Stmt") {
16288
+ return false;
16316
16289
  }
16317
- if (widthList(doc2._2) < 50) {
16318
- return Inline;
16290
+ if (m === "Expr") {
16291
+ return inlinable(m)(doc2._2);
16319
16292
  }
16320
- return Multiline;
16321
- }
16322
- return Inline;
16323
- };
16324
- var simplifyList = (ds) => (fmt) => {
16325
- if (fmt === "Squash") {
16326
- return Empty;
16327
- }
16328
- if (fmt === "Inline") {
16329
- return intercalate3($Doc("Text", ", "))(listMap((d) => simplify(d))(ds));
16293
+ fail();
16330
16294
  }
16331
- if (fmt === "Multiline") {
16332
- return $Doc("Concat", $Doc("Indent", intercalate3($Doc("Text", ","))(listMap((d) => $Doc("Concat", Line, simplify(d)))(ds))), Line);
16295
+ if (doc2.tag === "InlOrMul") {
16296
+ return inlinable(m)(doc2._1);
16333
16297
  }
16334
16298
  fail();
16335
16299
  };
16336
- var simplify = (doc2) => {
16337
- const fmt = format(doc2);
16338
- if (doc2.tag === "Block") {
16339
- if (fmt === "Squash") {
16340
- return $Doc("Concat", $Doc("Text", ": "), simplify(doc2._1));
16341
- }
16342
- if (fmt === "Inline") {
16343
- return $Doc("Concat", $Doc("Text", ": "), simplify(doc2._1));
16344
- }
16345
- if (fmt === "Multiline") {
16346
- return $Doc("Concat", $Doc("Text", ":"), $Doc("Indent", $Doc("Concat", Line, simplify(doc2._1))));
16347
- }
16348
- fail();
16349
- }
16350
- if (doc2.tag === "Collection") {
16351
- return (() => {
16352
- if (doc2._1 === "Record") {
16353
- if (fmt === "Squash") {
16354
- return (d) => $Doc("Concat", $Doc("Text", "{"), $Doc("Concat", d, $Doc("Text", "}")));
16355
- }
16356
- if (fmt === "Inline") {
16357
- return (d) => $Doc("Concat", $Doc("Text", "{ "), $Doc("Concat", d, $Doc("Text", " }")));
16358
- }
16359
- if (fmt === "Multiline") {
16360
- return (d) => $Doc("Concat", $Doc("Text", "{"), $Doc("Concat", d, $Doc("Text", "}")));
16361
- }
16362
- fail();
16363
- }
16364
- if (doc2._1 === "Array") {
16365
- return (d) => $Doc("Concat", $Doc("Text", "["), $Doc("Concat", d, $Doc("Text", "]")));
16366
- }
16367
- fail();
16368
- })()(simplifyList(doc2._2)(fmt));
16300
+ var format = (m) => (w) => (doc2) => {
16301
+ if (inlinable(m)(doc2) && width(m)(doc2) < (80 - w | 0)) {
16302
+ return Inline;
16369
16303
  }
16370
- return doc2;
16304
+ return Multiline;
16371
16305
  };
16372
- var renderWithIndent = (n) => (doc2) => {
16306
+ var renderWithIndent = (m) => (i) => (w) => (doc2) => {
16307
+ const indentation = i * 2 | 0;
16308
+ const fmt = format(m)(w)(doc2);
16309
+ const $0 = (d1, d2) => {
16310
+ const v = renderWithIndent(m)(i)(w)(d1);
16311
+ const v1 = renderWithIndent(m)(i)(v._2)(d2);
16312
+ return $Tuple(v._1 + v1._1, v1._2);
16313
+ };
16373
16314
  if (doc2.tag === "Empty") {
16374
- return "";
16315
+ return $Tuple("", w);
16375
16316
  }
16376
16317
  if (doc2.tag === "Line") {
16377
- const $0 = n * 2 | 0;
16378
- if ($0 <= 0) {
16379
- return "\n";
16318
+ return $Tuple(indentation <= 0 ? "\n" : "\n " + spaces(indentation - 1 | 0), indentation);
16319
+ }
16320
+ if (doc2.tag === "Concat") {
16321
+ if (doc2._1.tag === "Line") {
16322
+ if (doc2._2.tag === "Empty") {
16323
+ return $Tuple("\n", 0);
16324
+ }
16325
+ if (doc2._2.tag === "Line") {
16326
+ return $Tuple(indentation <= 0 ? "\n\n" : "\n\n " + spaces(indentation - 1 | 0), indentation);
16327
+ }
16380
16328
  }
16381
- return "\n " + spaces($0 - 1 | 0);
16329
+ return $0(doc2._1, doc2._2);
16382
16330
  }
16383
16331
  if (doc2.tag === "Text") {
16384
- return doc2._1;
16332
+ return $Tuple(doc2._1, w + toCodePointArray(doc2._1).length | 0);
16385
16333
  }
16386
16334
  if (doc2.tag === "Indent") {
16387
- return renderWithIndent(n + 1 | 0)(doc2._1);
16335
+ return renderWithIndent(m)(i + 1 | 0)(w)(doc2._1);
16388
16336
  }
16389
- if (doc2.tag === "Concat") {
16390
- if (doc2._1.tag === "Line" && doc2._2.tag === "Empty") {
16391
- return "\n";
16337
+ if (doc2.tag === "Mode") {
16338
+ return renderWithIndent(doc2._1)(i)(w)(doc2._2);
16339
+ }
16340
+ if (doc2.tag === "StmtOrExpr") {
16341
+ if (m === "Stmt") {
16342
+ return renderWithIndent(m)(i)(w)(doc2._1);
16343
+ }
16344
+ if (m === "Expr") {
16345
+ return renderWithIndent(m)(i)(w)(doc2._2);
16346
+ }
16347
+ fail();
16348
+ }
16349
+ if (doc2.tag === "InlOrMul") {
16350
+ if (fmt === "Inline") {
16351
+ return renderWithIndent(m)(i)(w)(doc2._1);
16352
+ }
16353
+ if (fmt === "Multiline") {
16354
+ return renderWithIndent(m)(i)(w)(doc2._2);
16392
16355
  }
16393
- return renderWithIndent(n)(doc2._1) + renderWithIndent(n)(doc2._2);
16394
16356
  }
16395
- return renderWithIndent(n)(simplify(doc2));
16357
+ fail();
16396
16358
  };
16359
+ var expr = /* @__PURE__ */ Mode(Expr);
16397
16360
 
16398
16361
  // output-es/Temp.Pretty.Helpers/index.js
16399
16362
  var vsep = (v) => {
@@ -16408,6 +16371,55 @@ var vsep = (v) => {
16408
16371
  }
16409
16372
  fail();
16410
16373
  };
16374
+ var sep$p = (v) => (v1) => {
16375
+ if (v1.tag === "Nil") {
16376
+ return Empty;
16377
+ }
16378
+ if (v1.tag === "Cons") {
16379
+ if (v1._2.tag === "Nil") {
16380
+ return v1._1;
16381
+ }
16382
+ return $Doc("Concat", v1._1, $Doc("Concat", v, sep$p(v)(v1._2)));
16383
+ }
16384
+ fail();
16385
+ };
16386
+ var record = (ds) => $Doc(
16387
+ "InlOrMul",
16388
+ $Doc(
16389
+ "Concat",
16390
+ $Doc("Text", "{"),
16391
+ $Doc(
16392
+ "Concat",
16393
+ $Doc("Text", " "),
16394
+ $Doc(
16395
+ "Concat",
16396
+ sep$p($Doc("Text", ", "))(ds),
16397
+ $Doc("Concat", $Doc("Text", " "), $Doc("Text", "}"))
16398
+ )
16399
+ )
16400
+ ),
16401
+ $Doc(
16402
+ "Concat",
16403
+ $Doc("Text", "{"),
16404
+ $Doc(
16405
+ "Concat",
16406
+ $Doc(
16407
+ "Indent",
16408
+ $Doc("Concat", Line, sep$p($Doc("Concat", $Doc("Text", ","), Line))(ds))
16409
+ ),
16410
+ $Doc("Concat", Line, $Doc("Text", "}"))
16411
+ )
16412
+ )
16413
+ );
16414
+ var matrix = (p) => $Doc(
16415
+ "Concat",
16416
+ $Doc(
16417
+ "InlOrMul",
16418
+ $Doc("Concat", $Doc("Text", "[|"), $Doc("Concat", $Doc("Text", " "), p)),
16419
+ $Doc("Concat", $Doc("Text", "[|"), $Doc("Concat", Line, p))
16420
+ ),
16421
+ $Doc("Text", "|]")
16422
+ );
16411
16423
  var hsep = (v) => {
16412
16424
  if (v.tag === "Nil") {
16413
16425
  return Empty;
@@ -16420,6 +16432,23 @@ var hsep = (v) => {
16420
16432
  }
16421
16433
  fail();
16422
16434
  };
16435
+ var block = (d) => $Doc(
16436
+ "StmtOrExpr",
16437
+ $Doc(
16438
+ "Concat",
16439
+ $Doc("Text", ":"),
16440
+ $Doc(
16441
+ "InlOrMul",
16442
+ $Doc("Concat", $Doc("Text", " "), d),
16443
+ $Doc("Indent", $Doc("Concat", Line, d))
16444
+ )
16445
+ ),
16446
+ $Doc(
16447
+ "Concat",
16448
+ $Doc("Text", ":"),
16449
+ $Doc("Concat", $Doc("Text", " "), $Doc("Concat", d, $Doc("Text", ";")))
16450
+ )
16451
+ );
16423
16452
 
16424
16453
  // output-es/Temp.Pretty/index.js
16425
16454
  var identity22 = (x) => x;
@@ -16542,7 +16571,7 @@ var prettyConstr = (dictRootOp) => (dictPretty) => {
16542
16571
  return (v) => (v1) => {
16543
16572
  if (v1.tag === "Nil") {
16544
16573
  if (v === "Nil") {
16545
- return $Doc("Concat", $Doc("Text", "["), $Doc("Text", "]"));
16574
+ return $Doc("Text", "[]");
16546
16575
  }
16547
16576
  return $Doc("Text", v);
16548
16577
  }
@@ -16611,7 +16640,7 @@ var prettyPattern = {
16611
16640
  return prettyConstr(rootOpPattern)(prettyPattern)(v._1)(v._2);
16612
16641
  }
16613
16642
  if (v.tag === "PListEmpty") {
16614
- return $Doc("Concat", $Doc("Text", "["), $Doc("Text", "]"));
16643
+ return $Doc("Text", "[]");
16615
16644
  }
16616
16645
  if (v.tag === "PListNonEmpty") {
16617
16646
  return $Doc(
@@ -16711,6 +16740,9 @@ var prettyBaseVal = (dictHighlightable) => {
16711
16740
  );
16712
16741
  }
16713
16742
  if (v.tag === "Dictionary") {
16743
+ if (isEmpty2(v._1)) {
16744
+ return $Doc("Text", "{}");
16745
+ }
16714
16746
  return record(listMap(prettyVar$x215$x215Val(dictHighlightable).pretty)(toUnfoldable8(v._1)));
16715
16747
  }
16716
16748
  if (v.tag === "Constr") {
@@ -16727,7 +16759,7 @@ var prettyBaseVal = (dictHighlightable) => {
16727
16759
  };
16728
16760
  };
16729
16761
  var prettyVarDefs = (dictAnn) => ({
16730
- pretty: (ds) => vsep((() => {
16762
+ pretty: (ds) => sep$p($Doc("StmtOrExpr", Line, $Doc("Text", " ")))((() => {
16731
16763
  const $0 = prettyVarDef(dictAnn);
16732
16764
  return $List("Cons", $0.pretty(ds._1), listMap($0.pretty)(ds._2));
16733
16765
  })())
@@ -16739,12 +16771,12 @@ var prettyVarDef = (dictAnn) => ({
16739
16771
  $Doc(
16740
16772
  "Concat",
16741
16773
  $Doc("Text", " "),
16742
- $Doc("Concat", prettyPattern.pretty(v._1), $Doc("Block", prettyExpr1(dictAnn).pretty(v._2)))
16774
+ $Doc("Concat", prettyPattern.pretty(v._1), block(prettyExpr1(dictAnn).pretty(v._2)))
16743
16775
  )
16744
16776
  )
16745
16777
  });
16746
16778
  var prettyRecDefs = (dictAnn) => ({
16747
- pretty: (bs) => vsep((() => {
16779
+ pretty: (bs) => sep$p($Doc("StmtOrExpr", Line, $Doc("Text", " ")))((() => {
16748
16780
  const $0 = prettyBranch(dictAnn);
16749
16781
  return $List("Cons", $0.pretty(bs._1), listMap($0.pretty)(bs._2));
16750
16782
  })())
@@ -16756,7 +16788,7 @@ var prettyPattern$x215Expr = (dictAnn) => ({
16756
16788
  $Doc(
16757
16789
  "Concat",
16758
16790
  $Doc("Text", " "),
16759
- $Doc("Concat", prettyPattern.pretty(v._1), $Doc("Block", prettyExpr1(dictAnn).pretty(v._2)))
16791
+ $Doc("Concat", prettyPattern.pretty(v._1), block(prettyExpr1(dictAnn).pretty(v._2)))
16760
16792
  )
16761
16793
  )
16762
16794
  });
@@ -16899,69 +16931,60 @@ var prettyExpr1 = (dictAnn) => {
16899
16931
  if (v._3.tag === "Nil") {
16900
16932
  return $0.highlightIf(v._1)($Doc("Text", v._2));
16901
16933
  }
16902
- return $0.highlightIf(v._1)(prettyConstr2(prettyExpr1(dictAnn))(v._2)(v._3));
16934
+ return $0.highlightIf(v._1)(expr(prettyConstr2(prettyExpr1(dictAnn))(v._2)(v._3)));
16903
16935
  }
16904
16936
  if (v.tag === "Dictionary") {
16905
- return $0.highlightIf(v._1)(record(listMap(prettyDictEntry$x215Expr(dictAnn).pretty)(v._2)));
16937
+ if (v._2.tag === "Nil") {
16938
+ return $0.highlightIf(v._1)($Doc("Text", "{}"));
16939
+ }
16940
+ return $0.highlightIf(v._1)(expr(record(listMap(prettyDictEntry$x215Expr(dictAnn).pretty)(v._2))));
16906
16941
  }
16907
16942
  if (v.tag === "Matrix") {
16908
- return $0.highlightIf(v._1)($Doc(
16943
+ return $0.highlightIf(v._1)(expr(matrix($Doc(
16909
16944
  "Concat",
16910
- $Doc("Text", "[|"),
16945
+ prettyExpr1(dictAnn).pretty(v._2),
16911
16946
  $Doc(
16912
16947
  "Concat",
16913
16948
  $Doc("Text", " "),
16914
16949
  $Doc(
16915
16950
  "Concat",
16951
+ $Doc("Text", "for"),
16916
16952
  $Doc(
16917
16953
  "Concat",
16918
- prettyExpr1(dictAnn).pretty(v._2),
16954
+ $Doc("Text", " "),
16919
16955
  $Doc(
16920
16956
  "Concat",
16921
- $Doc("Text", " "),
16922
16957
  $Doc(
16923
16958
  "Concat",
16924
- $Doc("Text", "for"),
16959
+ $Doc("Text", "("),
16925
16960
  $Doc(
16926
16961
  "Concat",
16927
- $Doc("Text", " "),
16928
16962
  $Doc(
16929
16963
  "Concat",
16964
+ $Doc("Text", v._3._1),
16930
16965
  $Doc(
16931
16966
  "Concat",
16932
- $Doc("Text", "("),
16933
- $Doc(
16934
- "Concat",
16935
- $Doc(
16936
- "Concat",
16937
- $Doc("Text", v._3._1),
16938
- $Doc(
16939
- "Concat",
16940
- $Doc("Text", ","),
16941
- $Doc("Concat", $Doc("Text", " "), $Doc("Text", v._3._2))
16942
- )
16943
- ),
16944
- $Doc("Text", ")")
16945
- )
16946
- ),
16947
- $Doc(
16948
- "Concat",
16949
- $Doc("Text", " "),
16950
- $Doc(
16951
- "Concat",
16952
- $Doc("Text", "in"),
16953
- $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._4))
16954
- )
16967
+ $Doc("Text", ","),
16968
+ $Doc("Concat", $Doc("Text", " "), $Doc("Text", v._3._2))
16955
16969
  )
16956
- )
16970
+ ),
16971
+ $Doc("Text", ")")
16972
+ )
16973
+ ),
16974
+ $Doc(
16975
+ "Concat",
16976
+ $Doc("Text", " "),
16977
+ $Doc(
16978
+ "Concat",
16979
+ $Doc("Text", "in"),
16980
+ $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._4))
16957
16981
  )
16958
16982
  )
16959
16983
  )
16960
- ),
16961
- $Doc("Concat", $Doc("Text", " "), $Doc("Text", "|]"))
16984
+ )
16962
16985
  )
16963
16986
  )
16964
- ));
16987
+ ))));
16965
16988
  }
16966
16989
  if (v.tag === "Lambda") {
16967
16990
  return $Doc(
@@ -16971,28 +16994,28 @@ var prettyExpr1 = (dictAnn) => {
16971
16994
  );
16972
16995
  }
16973
16996
  if (v.tag === "Project") {
16974
- return $Doc(
16997
+ return expr($Doc(
16975
16998
  "Concat",
16976
16999
  prettyExpr1(dictAnn).pretty(v._1),
16977
17000
  $Doc("Concat", $Doc("Text", "."), $Doc("Text", v._2))
16978
- );
17001
+ ));
16979
17002
  }
16980
17003
  if (v.tag === "DProject") {
16981
- return $Doc(
17004
+ return expr($Doc(
16982
17005
  "Concat",
16983
17006
  prettyExpr1(dictAnn).pretty(v._1),
16984
17007
  $Doc(
16985
17008
  "Concat",
16986
17009
  $Doc("Text", "["),
16987
- $Doc("Concat", prettyExpr1(dictAnn).pretty(v._2), $Doc("Text", "]"))
17010
+ $Doc("Concat", expr(prettyExpr1(dictAnn).pretty(v._2)), $Doc("Text", "]"))
16988
17011
  )
16989
- );
17012
+ ));
16990
17013
  }
16991
17014
  if (v.tag === "App") {
16992
- return prettyAppChain(dictAnn)($Expr2("App", v._1, v._2))(Nil);
17015
+ return expr(prettyAppChain(dictAnn)($Expr2("App", v._1, v._2))(Nil));
16993
17016
  }
16994
17017
  if (v.tag === "BinaryApp") {
16995
- return binaryApp(dictAnn)(0)($Expr2("BinaryApp", v._1, v._2, v._3));
17018
+ return expr(binaryApp(dictAnn)(0)($Expr2("BinaryApp", v._1, v._2, v._3)));
16996
17019
  }
16997
17020
  if (v.tag === "MatchAs") {
16998
17021
  return $Doc(
@@ -17001,7 +17024,7 @@ var prettyExpr1 = (dictAnn) => {
17001
17024
  $Doc(
17002
17025
  "Concat",
17003
17026
  $Doc("Text", " "),
17004
- $Doc("Concat", prettyExpr1(dictAnn).pretty(v._1), $Doc("Block", prettyNonEmptyListPattern(dictAnn).pretty(v._2)))
17027
+ $Doc("Concat", prettyExpr1(dictAnn).pretty(v._1), block(prettyNonEmptyListPattern(dictAnn).pretty(v._2)))
17005
17028
  )
17006
17029
  );
17007
17030
  }
@@ -17014,14 +17037,14 @@ var prettyExpr1 = (dictAnn) => {
17014
17037
  $Doc("Text", " "),
17015
17038
  $Doc(
17016
17039
  "Concat",
17017
- prettyExpr1(dictAnn).pretty(v._1),
17040
+ expr(prettyExpr1(dictAnn).pretty(v._1)),
17018
17041
  $Doc(
17019
17042
  "Concat",
17020
- $Doc("Block", prettyExpr1(dictAnn).pretty(v._2)),
17043
+ block(prettyExpr1(dictAnn).pretty(v._2)),
17021
17044
  $Doc(
17022
17045
  "Concat",
17023
17046
  Line,
17024
- $Doc("Concat", $Doc("Text", "else"), $Doc("Block", prettyExpr1(dictAnn).pretty(v._3)))
17047
+ $Doc("Concat", $Doc("Text", "else"), block(prettyExpr1(dictAnn).pretty(v._3)))
17025
17048
  )
17026
17049
  )
17027
17050
  )
@@ -17029,26 +17052,41 @@ var prettyExpr1 = (dictAnn) => {
17029
17052
  );
17030
17053
  }
17031
17054
  if (v.tag === "ListEmpty") {
17032
- return $0.highlightIf(v._1)($Doc("Concat", $Doc("Text", "["), $Doc("Text", "]")));
17055
+ return $0.highlightIf(v._1)($Doc("Text", "[]"));
17033
17056
  }
17034
17057
  if (v.tag === "ListNonEmpty") {
17035
- const collect = (v1) => {
17058
+ const collect = (v1) => (v2) => {
17036
17059
  if (v1.tag === "Next") {
17037
17060
  return $Doc(
17038
17061
  "Concat",
17039
17062
  $0.highlightIf(v1._1)($Doc("Text", ",")),
17040
- $Doc("Concat", $Doc("Text", " "), $Doc("Concat", prettyExpr1(dictAnn).pretty(v1._2), collect(v1._3)))
17063
+ $Doc(
17064
+ "Concat",
17065
+ v2 ? $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v1._2)) : $Doc("Indent", $Doc("Concat", Line, prettyExpr1(dictAnn).pretty(v1._2))),
17066
+ collect(v1._3)(v2)
17067
+ )
17041
17068
  );
17042
17069
  }
17043
17070
  if (v1.tag === "End") {
17044
- return $0.highlightIf(v1._1)($Doc("Text", "]"));
17071
+ if (v2) {
17072
+ return $0.highlightIf(v1._1)($Doc("Text", "]"));
17073
+ }
17074
+ return $Doc("Concat", Line, $0.highlightIf(v1._1)($Doc("Text", "]")));
17045
17075
  }
17046
17076
  fail();
17047
17077
  };
17048
17078
  return $Doc(
17049
17079
  "Concat",
17050
17080
  $0.highlightIf(v._1)($Doc("Text", "[")),
17051
- $Doc("Concat", prettyExpr1(dictAnn).pretty(v._2), collect(v._3))
17081
+ $Doc(
17082
+ "InlOrMul",
17083
+ $Doc("Concat", prettyExpr1(dictAnn).pretty(v._2), collect(v._3)(true)),
17084
+ $Doc(
17085
+ "Concat",
17086
+ $Doc("Indent", $Doc("Concat", Line, prettyExpr1(dictAnn).pretty(v._2))),
17087
+ collect(v._3)(false)
17088
+ )
17089
+ )
17052
17090
  );
17053
17091
  }
17054
17092
  if (v.tag === "ListEnum") {
@@ -17057,7 +17095,7 @@ var prettyExpr1 = (dictAnn) => {
17057
17095
  $Doc("Text", "["),
17058
17096
  $Doc(
17059
17097
  "Concat",
17060
- $Doc(
17098
+ expr($Doc(
17061
17099
  "Concat",
17062
17100
  prettyExpr1(dictAnn).pretty(v._1),
17063
17101
  $Doc(
@@ -17069,7 +17107,7 @@ var prettyExpr1 = (dictAnn) => {
17069
17107
  $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._2))
17070
17108
  )
17071
17109
  )
17072
- ),
17110
+ )),
17073
17111
  $Doc("Text", "]")
17074
17112
  )
17075
17113
  );
@@ -17082,7 +17120,7 @@ var prettyExpr1 = (dictAnn) => {
17082
17120
  "Concat",
17083
17121
  $Doc(
17084
17122
  "Concat",
17085
- prettyExpr1(dictAnn).pretty(v._2),
17123
+ expr(prettyExpr1(dictAnn).pretty(v._2)),
17086
17124
  $Doc("Concat", $Doc("Text", " "), prettyListQualifier(dictAnn).pretty(v._3))
17087
17125
  ),
17088
17126
  $Doc("Text", "]")
@@ -17095,12 +17133,12 @@ var prettyExpr1 = (dictAnn) => {
17095
17133
  prettyVarDefs(dictAnn).pretty(v._1),
17096
17134
  $Doc(
17097
17135
  "Concat",
17098
- $Doc("Text", ";"),
17099
17136
  $Doc(
17100
- "Concat",
17101
- $Doc("Concat", Line, Empty),
17102
- $Doc("Concat", Line, prettyExpr1(dictAnn).pretty(v._2))
17103
- )
17137
+ "StmtOrExpr",
17138
+ $Doc("Concat", $Doc("Text", ";"), $Doc("Concat", Line, Line)),
17139
+ $Doc("Text", " ")
17140
+ ),
17141
+ prettyExpr1(dictAnn).pretty(v._2)
17104
17142
  )
17105
17143
  );
17106
17144
  }
@@ -17110,12 +17148,12 @@ var prettyExpr1 = (dictAnn) => {
17110
17148
  prettyRecDefs(dictAnn).pretty(v._1),
17111
17149
  $Doc(
17112
17150
  "Concat",
17113
- $Doc("Text", ";"),
17114
17151
  $Doc(
17115
- "Concat",
17116
- $Doc("Concat", Line, Empty),
17117
- $Doc("Concat", Line, prettyExpr1(dictAnn).pretty(v._2))
17118
- )
17152
+ "StmtOrExpr",
17153
+ $Doc("Concat", $Doc("Text", ";"), $Doc("Concat", Line, Line)),
17154
+ $Doc("Text", " ")
17155
+ ),
17156
+ prettyExpr1(dictAnn).pretty(v._2)
17119
17157
  )
17120
17158
  );
17121
17159
  }
@@ -17126,15 +17164,23 @@ var prettyExpr1 = (dictAnn) => {
17126
17164
  return $Doc(
17127
17165
  "Concat",
17128
17166
  $Doc("Text", "@doc"),
17129
- $Doc(
17130
- "Concat",
17131
- $Doc(
17132
- "Concat",
17133
- $Doc("Text", "("),
17134
- $Doc("Concat", prettyExpr1(dictAnn).pretty(v._1), $Doc("Text", ")"))
17135
- ),
17136
- $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._2))
17137
- )
17167
+ (() => {
17168
+ const $1 = prettyExpr1(dictAnn).pretty(v._1);
17169
+ const $2 = prettyExpr1(dictAnn).pretty(v._2);
17170
+ return $Doc(
17171
+ "InlOrMul",
17172
+ $Doc(
17173
+ "Concat",
17174
+ $Doc("Concat", $Doc("Text", "("), $Doc("Concat", $1, $Doc("Text", ")"))),
17175
+ $Doc("Concat", $Doc("Text", " "), $2)
17176
+ ),
17177
+ $Doc(
17178
+ "Concat",
17179
+ $Doc("Concat", $Doc("Text", "("), $Doc("Concat", $1, $Doc("Text", ")"))),
17180
+ $Doc("Concat", Line, $2)
17181
+ )
17182
+ );
17183
+ })()
17138
17184
  );
17139
17185
  }
17140
17186
  fail();
@@ -17145,11 +17191,19 @@ var prettyDictEntry$x215Expr = (dictAnn) => ({
17145
17191
  pretty: (v) => $Doc(
17146
17192
  "Concat",
17147
17193
  prettyDictEntry(dictAnn).pretty(v._1),
17148
- $Doc(
17149
- "Concat",
17150
- $Doc("Text", ":"),
17151
- $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._2))
17152
- )
17194
+ stmt($Doc(
17195
+ "InlOrMul",
17196
+ $Doc(
17197
+ "Concat",
17198
+ $Doc("Text", ":"),
17199
+ $Doc("Concat", $Doc("Text", " "), prettyExpr1(dictAnn).pretty(v._2))
17200
+ ),
17201
+ $Doc(
17202
+ "Concat",
17203
+ $Doc("Text", ":"),
17204
+ $Doc("Indent", $Doc("Concat", Line, prettyExpr1(dictAnn).pretty(v._2)))
17205
+ )
17206
+ ))
17153
17207
  )
17154
17208
  });
17155
17209
  var prettyDictEntry = (dictAnn) => ({
@@ -17186,7 +17240,7 @@ var prettyBranch = (dictAnn) => ({
17186
17240
  $Doc("Text", "("),
17187
17241
  $Doc("Concat", prettyList5($List("Cons", v._2._1._1, v._2._1._2)), $Doc("Text", ")"))
17188
17242
  ),
17189
- $Doc("Block", prettyExpr1(dictAnn).pretty(v._2._2))
17243
+ block(prettyExpr1(dictAnn).pretty(v._2._2))
17190
17244
  )
17191
17245
  )
17192
17246
  )
@@ -17293,10 +17347,18 @@ var binaryApp = (dictAnn) => (v) => (v1) => {
17293
17347
  return prettyExpr1(dictAnn).pretty(v1);
17294
17348
  }
17295
17349
  if (v1.tag === "Let") {
17296
- return $Doc("Text", "undefined");
17350
+ return $Doc(
17351
+ "Concat",
17352
+ $Doc("Text", "("),
17353
+ $Doc("Concat", prettyExpr1(dictAnn).pretty(v1), $Doc("Text", ")"))
17354
+ );
17297
17355
  }
17298
17356
  if (v1.tag === "LetRec") {
17299
- return $Doc("Text", "undefined");
17357
+ return $Doc(
17358
+ "Concat",
17359
+ $Doc("Text", "("),
17360
+ $Doc("Concat", prettyExpr1(dictAnn).pretty(v1), $Doc("Text", ")"))
17361
+ );
17300
17362
  }
17301
17363
  return prettyExpr1(dictAnn).pretty(v1);
17302
17364
  };
@@ -17948,8 +18010,8 @@ var unary = (dictBoundedJoinSemilattice) => {
17948
18010
  )
17949
18011
  );
17950
18012
  };
17951
- var typeError = (v) => (typeName2) => throwException(error(typeName2 + " expected; got " + renderWithIndent(0)(prettyBaseVal(highlightableUnit).pretty(functorBaseVal.map((v$1) => {
17952
- })(v)))))();
18013
+ var typeError = (v) => (typeName2) => throwException(error(typeName2 + " expected; got " + renderWithIndent(Stmt)(0)(0)(prettyBaseVal(highlightableUnit).pretty(functorBaseVal.map((v$1) => {
18014
+ })(v)))._1))();
17953
18015
  var string = {
17954
18016
  pack: Str2,
17955
18017
  unpack: (v) => {
@@ -18282,7 +18344,7 @@ var match = (dictMonadWithGraphAlloc) => {
18282
18344
  $Tuple(v2._2._1, insert(ordVertex)($4)()(v2._2._2))
18283
18345
  )))));
18284
18346
  }
18285
- return Bind1.bind(dataTypeForSetCtr.dataTypeFor(MonadThrow0)(mapObjectString.keys(v1._1)))((d) => MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected " + d._1)));
18347
+ return Bind1.bind(dataTypeForSetCtr.dataTypeFor(MonadThrow0)(mapObjectString.keys(v1._1)))((d) => MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected " + d._1)));
18286
18348
  }
18287
18349
  if (v1.tag === "ElimDict") {
18288
18350
  if (v._3.tag === "Dictionary") {
@@ -18295,7 +18357,7 @@ var match = (dictMonadWithGraphAlloc) => {
18295
18357
  $Tuple(v2._2._1, insert(ordVertex)($3)()(v2._2._2))
18296
18358
  ))));
18297
18359
  }
18298
- return MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected " + show22(v1._1)));
18360
+ return MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected " + show22(v1._1)));
18299
18361
  }
18300
18362
  fail();
18301
18363
  };
@@ -18479,7 +18541,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18479
18541
  return Nothing;
18480
18542
  })()));
18481
18543
  }
18482
- return MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected dictionary"));
18544
+ return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected dictionary"));
18483
18545
  });
18484
18546
  }
18485
18547
  if (e0.tag === "DProject") {
@@ -18495,9 +18557,9 @@ var $$eval = (dictMonadWithGraphAlloc) => {
18495
18557
  return Nothing;
18496
18558
  })()));
18497
18559
  }
18498
- return MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v$p)) + ", expected string"));
18560
+ return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v$p))._1 + ", expected string"));
18499
18561
  }
18500
- return MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected dict"));
18562
+ return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected dict"));
18501
18563
  }));
18502
18564
  }
18503
18565
  if (e0.tag === "App") {
@@ -18552,7 +18614,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
18552
18614
  return (dictMonadReader) => (dictMonadAff) => {
18553
18615
  const Bind1 = dictMonadAff.MonadEffect0().Monad0().Bind1();
18554
18616
  return (dictLoadFile) => (v) => (v1) => {
18555
- const $0 = (v2) => MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v2)) + ", expected function"));
18617
+ const $0 = (v2) => MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v2))._1 + ", expected function"));
18556
18618
  if (v._3.tag === "Fun") {
18557
18619
  if (v._3._1.tag === "Closure") {
18558
18620
  const $1 = v._1;
@@ -18796,6 +18858,7 @@ var graphEval = (dictMonadAff) => {
18796
18858
  const monadAffState1 = monadAffState(monadAffState2);
18797
18859
  const $1 = monadAffState2.MonadEffect0().Monad0();
18798
18860
  const $2 = dictMonadAff.MonadEffect0().Monad0();
18861
+ const applicativeStateT2 = applicativeStateT(Monad0);
18799
18862
  return (dictMonadReader) => {
18800
18863
  const monadReaderStateT2 = monadReaderStateT(monadReaderStateT(dictMonadReader));
18801
18864
  return (dictLoadFile) => (dictMonadError) => {
@@ -18811,7 +18874,6 @@ var graphEval = (dictMonadAff) => {
18811
18874
  }
18812
18875
  };
18813
18876
  })());
18814
- const check2 = check(monadThrowStateT(dictMonadError.MonadThrow0()));
18815
18877
  return (v) => (e) => {
18816
18878
  const $3 = v["\u03B3"];
18817
18879
  const $4 = spyFunWhen(false)("fwdSlice")((x) => $Tuple(showVertices(x._1), showEdgeList(toEdgeList(graphGraphImpl)(x._2))))(showGraph(graphGraphImpl))(fwdSlice2);
@@ -18822,10 +18884,7 @@ var graphEval = (dictMonadAff) => {
18822
18884
  ))))((v1) => {
18823
18885
  const $6 = v1._1;
18824
18886
  const $7 = v1._2;
18825
- return bindStateT2.bind(check2(difference2(ordDVertex$p)(verticesValVertex.vertices($7))(verticesGraphImpl.vertices($6)).tag === "Leaf")("outputs in graph"))(() => applicativeStateT(Monad0).pure($Tuple(
18826
- $6,
18827
- $Tuple($EnvExpr($3, e\u03B1), $7)
18828
- )));
18887
+ return bindStateT2.bind(applicativeStateT2.pure())(() => applicativeStateT2.pure($Tuple($6, $Tuple($EnvExpr($3, e\u03B1), $7))));
18829
18888
  })))(v.n))((v1) => Monad0.Applicative0().pure({
18830
18889
  g: v1._2._2._1,
18831
18890
  graph_fwd: (a) => (b) => $4($Tuple(a, b)),
@@ -20323,7 +20382,7 @@ var brackets = (e) => {
20323
20382
  )))
20324
20383
  )))));
20325
20384
  };
20326
- var block = (e) => {
20385
+ var block2 = (e) => {
20327
20386
  const $0 = delim(":");
20328
20387
  return (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => more((v2$1) => more((v1$1) => $0(
20329
20388
  state1,
@@ -21154,7 +21213,7 @@ var varDefs$lazy = /* @__PURE__ */ binding(() => {
21154
21213
  $2,
21155
21214
  (v2$1, $6) => $3($ParseState(v2$1._1, v2$1._2, $5), $6),
21156
21215
  (state2$1, a$1) => $1((v2$1) => {
21157
- const $6 = block(expr$lazy());
21216
+ const $6 = block2(expr$lazy());
21158
21217
  return $1((v1$3) => $6(
21159
21218
  state2$1,
21160
21219
  $1,
@@ -21240,7 +21299,7 @@ var recDefs$lazy = /* @__PURE__ */ binding(() => {
21240
21299
  $2,
21241
21300
  (v2$4, $9) => $3($ParseState(v2$4._1, v2$4._2, $5), $9),
21242
21301
  (state2$4, a$4) => $1((v2$4) => {
21243
- const $9 = block(expr$lazy());
21302
+ const $9 = block2(expr$lazy());
21244
21303
  return $1((v1$6) => $9(
21245
21304
  state2$4,
21246
21305
  $1,
@@ -21398,40 +21457,193 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
21398
21457
  })());
21399
21458
  return foldlArray(makeParser)((() => {
21400
21459
  const $02 = context("simple")((() => {
21401
- const $03 = context("matrix")((state1, more, lift12, $$throw2, done) => more((v1) => {
21402
- const $04 = state1._3;
21403
- return lexeme(string2("[|"))(
21404
- state1,
21405
- more,
21406
- lift12,
21407
- (v2, $12) => $$throw2($ParseState(v2._1, v2._2, $04), $12),
21408
- (state2, a) => more((v2) => more((v1$1) => opTree$lazy()(
21460
+ const $03 = reserved("def");
21461
+ const varDef = (v1, $12, $22, $32, $42) => {
21462
+ const $52 = v1._3;
21463
+ return $12((v1$1) => $03(
21464
+ v1,
21465
+ $12,
21466
+ $22,
21467
+ (v2, $62) => $32($ParseState(v2._1, v2._2, $52), $62),
21468
+ (state2, a) => $12((v2) => $12((v1$2) => pattern(
21469
+ state2,
21470
+ $12,
21471
+ $22,
21472
+ (v2$1, $62) => $32($ParseState(v2$1._1, v2$1._2, $52), $62),
21473
+ (state2$1, a$1) => $12((v2$1) => {
21474
+ const $62 = delim(":");
21475
+ return $12((v1$3) => $62(
21476
+ state2$1,
21477
+ $12,
21478
+ $22,
21479
+ (v2$2, $72) => $32($ParseState(v2$2._1, v2$2._2, $52), $72),
21480
+ (state2$2, a$2) => $12((v2$2) => $12((v1$4) => opTree$lazy()(
21481
+ state2$2,
21482
+ $12,
21483
+ $22,
21484
+ (v2$3, $72) => $32($ParseState(v2$3._1, v2$3._2, $52), $72),
21485
+ (state2$3, a$3) => $12((v2$3) => {
21486
+ const $72 = delim(";");
21487
+ return $12((v1$5) => $72(
21488
+ state2$3,
21489
+ $12,
21490
+ $22,
21491
+ (v2$4, $82) => $32($ParseState(v2$4._1, v2$4._2, $52), $82),
21492
+ (state2$4, a$4) => $12((v2$4) => $42(state2$4, $VarDef2(a$1, a$3)))
21493
+ ));
21494
+ })
21495
+ )))
21496
+ ));
21497
+ })
21498
+ )))
21499
+ ));
21500
+ };
21501
+ const $1 = context("letExpr")((state1, more, lift12, $$throw2, done) => more((v1) => varDef(
21502
+ state1,
21503
+ more,
21504
+ lift12,
21505
+ $$throw2,
21506
+ (state2, a) => more((v2) => {
21507
+ const $12 = manyRec2(varDef);
21508
+ return more((v1$1) => $12(
21409
21509
  state2,
21410
21510
  more,
21411
21511
  lift12,
21412
21512
  $$throw2,
21413
- (state2$1, a$1) => more((v2$1) => {
21414
- const $12 = reserved("for");
21415
- return more((v1$2) => $12(
21513
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
21514
+ state2$1,
21515
+ more,
21516
+ lift12,
21517
+ $$throw2,
21518
+ (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("Let", nonEmptyListNonEmptyList.nonEmpty($List("Cons", a, a$1)), a$2)))
21519
+ )))
21520
+ ));
21521
+ })
21522
+ )));
21523
+ const $2 = reserved("def");
21524
+ const recDef = (v1, $32, $42, $52, $62) => {
21525
+ const $72 = v1._3;
21526
+ return $32((v1$1) => $2(
21527
+ v1,
21528
+ $32,
21529
+ $42,
21530
+ (v2, $82) => $52($ParseState(v2._1, v2._2, $72), $82),
21531
+ (state2, a) => $32((v2) => $32((v1$2) => variable(
21532
+ state2,
21533
+ $32,
21534
+ $42,
21535
+ (v2$1, $82) => $52($ParseState(v2$1._1, v2$1._2, $72), $82),
21536
+ (state2$1, a$1) => $32((v2$1) => {
21537
+ const $82 = delim("(");
21538
+ return $32((v1$3) => $82(
21416
21539
  state2$1,
21417
- more,
21418
- lift12,
21419
- $$throw2,
21420
- (state2$2, a$2) => more((v2$2) => {
21421
- const $22 = delim("(");
21422
- return more((v1$3) => $22(
21540
+ $32,
21541
+ $42,
21542
+ (v2$2, $9) => $52($ParseState(v2$2._1, v2$2._2, $72), $9),
21543
+ (state2$2, a$2) => $32((v2$2) => {
21544
+ const $9 = sepBy1(pattern)(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
21545
+ return $32((v1$4) => $9(
21423
21546
  state2$2,
21424
- more,
21425
- lift12,
21426
- $$throw2,
21427
- (state2$3, a$3) => more((v2$3) => more((v1$4) => variable(
21428
- state2$3,
21429
- more,
21547
+ $32,
21548
+ $42,
21549
+ (v2$3, $10) => $52($ParseState(v2$3._1, v2$3._2, $72), $10),
21550
+ (state2$3, a$3) => $32((v2$3) => {
21551
+ const $10 = delim(")");
21552
+ return $32((v1$5) => $10(
21553
+ state2$3,
21554
+ $32,
21555
+ $42,
21556
+ (v2$4, $11) => $52($ParseState(v2$4._1, v2$4._2, $72), $11),
21557
+ (state2$4, a$4) => $32((v2$4) => {
21558
+ const $11 = delim(":");
21559
+ return $32((v1$6) => $11(
21560
+ state2$4,
21561
+ $32,
21562
+ $42,
21563
+ (v2$5, $12) => $52($ParseState(v2$5._1, v2$5._2, $72), $12),
21564
+ (state2$5, a$5) => $32((v2$5) => $32((v1$7) => opTree$lazy()(
21565
+ state2$5,
21566
+ $32,
21567
+ $42,
21568
+ (v2$6, $12) => $52($ParseState(v2$6._1, v2$6._2, $72), $12),
21569
+ (state2$6, a$6) => $32((v2$6) => {
21570
+ const $12 = delim(";");
21571
+ return $32((v1$8) => $12(
21572
+ state2$6,
21573
+ $32,
21574
+ $42,
21575
+ (v2$7, $13) => $52($ParseState(v2$7._1, v2$7._2, $72), $13),
21576
+ (state2$7, a$7) => $32((v2$7) => $62(state2$7, $Tuple(a$1, $Tuple(a$3, a$6))))
21577
+ ));
21578
+ })
21579
+ )))
21580
+ ));
21581
+ })
21582
+ ));
21583
+ })
21584
+ ));
21585
+ })
21586
+ ));
21587
+ })
21588
+ )))
21589
+ ));
21590
+ };
21591
+ const $3 = context("letRecExpr")((state1, more, lift12, $$throw2, done) => more((v1) => recDef(
21592
+ state1,
21593
+ more,
21594
+ lift12,
21595
+ $$throw2,
21596
+ (state2, a) => more((v2) => {
21597
+ const $32 = manyRec2(recDef);
21598
+ return more((v1$1) => $32(
21599
+ state2,
21600
+ more,
21601
+ lift12,
21602
+ $$throw2,
21603
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
21604
+ state2$1,
21605
+ more,
21606
+ lift12,
21607
+ $$throw2,
21608
+ (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("LetRec", nonEmptyListNonEmptyList.nonEmpty($List("Cons", a, a$1)), a$2)))
21609
+ )))
21610
+ ));
21611
+ })
21612
+ )));
21613
+ const $4 = context("matrix")((state1, more, lift12, $$throw2, done) => more((v1) => {
21614
+ const $42 = state1._3;
21615
+ return lexeme(string2("[|"))(
21616
+ state1,
21617
+ more,
21618
+ lift12,
21619
+ (v2, $52) => $$throw2($ParseState(v2._1, v2._2, $42), $52),
21620
+ (state2, a) => more((v2) => more((v1$1) => opTree$lazy()(
21621
+ state2,
21622
+ more,
21623
+ lift12,
21624
+ $$throw2,
21625
+ (state2$1, a$1) => more((v2$1) => {
21626
+ const $52 = reserved("for");
21627
+ return more((v1$2) => $52(
21628
+ state2$1,
21629
+ more,
21630
+ lift12,
21631
+ $$throw2,
21632
+ (state2$2, a$2) => more((v2$2) => {
21633
+ const $62 = delim("(");
21634
+ return more((v1$3) => $62(
21635
+ state2$2,
21636
+ more,
21637
+ lift12,
21638
+ $$throw2,
21639
+ (state2$3, a$3) => more((v2$3) => more((v1$4) => variable(
21640
+ state2$3,
21641
+ more,
21430
21642
  lift12,
21431
21643
  $$throw2,
21432
21644
  (state2$4, a$4) => more((v2$4) => {
21433
- const $32 = delim(",");
21434
- return more((v1$5) => $32(
21645
+ const $72 = delim(",");
21646
+ return more((v1$5) => $72(
21435
21647
  state2$4,
21436
21648
  more,
21437
21649
  lift12,
@@ -21442,15 +21654,15 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
21442
21654
  lift12,
21443
21655
  $$throw2,
21444
21656
  (state2$6, a$6) => more((v2$6) => {
21445
- const $42 = delim(")");
21446
- return more((v1$7) => $42(
21657
+ const $82 = delim(")");
21658
+ return more((v1$7) => $82(
21447
21659
  state2$6,
21448
21660
  more,
21449
21661
  lift12,
21450
21662
  $$throw2,
21451
21663
  (state2$7, a$7) => more((v2$7) => {
21452
- const $52 = reserved("in");
21453
- return more((v1$8) => $52(
21664
+ const $9 = reserved("in");
21665
+ return more((v1$8) => $9(
21454
21666
  state2$7,
21455
21667
  more,
21456
21668
  lift12,
@@ -21483,98 +21695,98 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
21483
21695
  )))
21484
21696
  );
21485
21697
  }));
21486
- const $1 = context("listExpr")((() => {
21487
- const $12 = delim("[");
21488
- return (state1, more, lift12, $$throw2, done) => more((v1) => $12(
21698
+ const $5 = context("listExpr")((() => {
21699
+ const $52 = delim("[");
21700
+ return (state1, more, lift12, $$throw2, done) => more((v1) => $52(
21489
21701
  state1,
21490
21702
  more,
21491
21703
  lift12,
21492
21704
  $$throw2,
21493
21705
  (state2, a) => more((v2) => {
21494
- const $22 = optionMaybe((v1$1, $23, $32, $42, $52) => {
21495
- const $62 = v1$1._3;
21496
- return opTree$lazy()(v1$1, $23, $32, (v2$1, $72) => $42($ParseState(v2$1._1, v2$1._2, $62), $72), $52);
21706
+ const $62 = optionMaybe((v1$1, $63, $72, $82, $9) => {
21707
+ const $10 = v1$1._3;
21708
+ return opTree$lazy()(v1$1, $63, $72, (v2$1, $11) => $82($ParseState(v2$1._1, v2$1._2, $10), $11), $9);
21497
21709
  });
21498
- return more((v1$1) => $22(
21710
+ return more((v1$1) => $62(
21499
21711
  state2,
21500
21712
  more,
21501
21713
  lift12,
21502
21714
  $$throw2,
21503
21715
  (state2$1, a$1) => more((v2$1) => {
21504
21716
  if (a$1.tag === "Nothing") {
21505
- const $32 = delim("]");
21506
- return more((v1$2) => $32(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListEmpty", void 0)))));
21717
+ const $72 = delim("]");
21718
+ return more((v1$2) => $72(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListEmpty", void 0)))));
21507
21719
  }
21508
21720
  if (a$1.tag === "Just") {
21509
- const $32 = a$1._1;
21510
- const $42 = context("listEnum")((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => {
21511
- const $43 = state1$1._3;
21721
+ const $72 = a$1._1;
21722
+ const $82 = context("listEnum")((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => {
21723
+ const $83 = state1$1._3;
21512
21724
  return lexeme(string2(".."))(
21513
21725
  state1$1,
21514
21726
  more$1,
21515
21727
  lift1$1,
21516
- (v2$2, $53) => throw$1($ParseState(v2$2._1, v2$2._2, $43), $53),
21728
+ (v2$2, $92) => throw$1($ParseState(v2$2._1, v2$2._2, $83), $92),
21517
21729
  (state2$2, a$2) => more$1((v2$2) => more$1((v1$3) => opTree$lazy()(
21518
21730
  state2$2,
21519
21731
  more$1,
21520
21732
  lift1$1,
21521
21733
  throw$1,
21522
21734
  (state2$3, a$3) => more$1((v2$3) => {
21523
- const $53 = delim("]");
21524
- return more$1((v1$4) => $53(state2$3, more$1, lift1$1, throw$1, (state2$4, a$4) => more$1((v2$4) => done$1(state2$4, $Expr2("ListEnum", $32, a$3)))));
21735
+ const $92 = delim("]");
21736
+ return more$1((v1$4) => $92(state2$3, more$1, lift1$1, throw$1, (state2$4, a$4) => more$1((v2$4) => done$1(state2$4, $Expr2("ListEnum", $72, a$3)))));
21525
21737
  })
21526
21738
  )))
21527
21739
  );
21528
21740
  }));
21529
- const $52 = context("listComp")((() => {
21530
- const $53 = many1((() => {
21531
- const $54 = reserved("if");
21532
- const $63 = reserved("for");
21533
- return (v2$2, $73, $82, $9, $10) => {
21534
- const $11 = v2$2._1;
21535
- const $122 = v2$2._2;
21536
- return $73((v3) => {
21537
- const $13 = (v4, $132) => {
21538
- const $14 = v4._3;
21539
- return $73((v5) => {
21540
- if ($14) {
21541
- return $9(v4, $132);
21741
+ const $9 = context("listComp")((() => {
21742
+ const $92 = many1((() => {
21743
+ const $93 = reserved("if");
21744
+ const $102 = reserved("for");
21745
+ return (v2$2, $112, $12, $13, $14) => {
21746
+ const $15 = v2$2._1;
21747
+ const $16 = v2$2._2;
21748
+ return $112((v3) => {
21749
+ const $17 = (v4, $172) => {
21750
+ const $18 = v4._3;
21751
+ return $112((v5) => {
21752
+ if ($18) {
21753
+ return $13(v4, $172);
21542
21754
  }
21543
- return $73((v1$2) => {
21544
- const $15 = v2$2._3;
21545
- return $63(
21755
+ return $112((v1$2) => {
21756
+ const $19 = v2$2._3;
21757
+ return $102(
21546
21758
  v2$2,
21547
- $73,
21548
- $82,
21549
- (v2$3, $16) => $9($ParseState(v2$3._1, v2$3._2, $15), $16),
21550
- (state2$2, a$2) => $73((v2$3) => $73((v1$3) => pattern(
21759
+ $112,
21760
+ $12,
21761
+ (v2$3, $20) => $13($ParseState(v2$3._1, v2$3._2, $19), $20),
21762
+ (state2$2, a$2) => $112((v2$3) => $112((v1$3) => pattern(
21551
21763
  state2$2,
21552
- $73,
21553
- $82,
21554
- $9,
21555
- (state2$3, a$3) => $73((v2$4) => {
21556
- const $16 = reserved("in");
21557
- return $73((v1$4) => $16(
21764
+ $112,
21765
+ $12,
21766
+ $13,
21767
+ (state2$3, a$3) => $112((v2$4) => {
21768
+ const $20 = reserved("in");
21769
+ return $112((v1$4) => $20(
21558
21770
  state2$3,
21559
- $73,
21560
- $82,
21561
- $9,
21562
- (state2$4, a$4) => $73((v2$5) => {
21563
- const $17 = brackets(opTree$lazy());
21564
- const $18 = state2$4._1;
21565
- const $19 = state2$4._2;
21566
- return $73((v3$1) => $73((v1$5) => $17(
21567
- $ParseState($18, $19, false),
21568
- $73,
21569
- $82,
21570
- (v2$6, $20) => $73((v5$1) => $73((v1$6) => opTree$lazy()(
21771
+ $112,
21772
+ $12,
21773
+ $13,
21774
+ (state2$4, a$4) => $112((v2$5) => {
21775
+ const $21 = brackets(opTree$lazy());
21776
+ const $22 = state2$4._1;
21777
+ const $23 = state2$4._2;
21778
+ return $112((v3$1) => $112((v1$5) => $21(
21779
+ $ParseState($22, $23, false),
21780
+ $112,
21781
+ $12,
21782
+ (v2$6, $24) => $112((v5$1) => $112((v1$6) => opTree$lazy()(
21571
21783
  state2$4,
21572
- $73,
21573
- $82,
21574
- $9,
21575
- (state2$5, a$5) => $73((v2$7) => $10(state2$5, $Qualifier("ListCompGen", a$3, a$5)))
21784
+ $112,
21785
+ $12,
21786
+ $13,
21787
+ (state2$5, a$5) => $112((v2$7) => $14(state2$5, $Qualifier("ListCompGen", a$3, a$5)))
21576
21788
  ))),
21577
- (state2$5, a$5) => $73((v2$6) => $10(state2$5, $Qualifier("ListCompDecl", $VarDef2(a$3, a$5))))
21789
+ (state2$5, a$5) => $112((v2$6) => $14(state2$5, $Qualifier("ListCompDecl", $VarDef2(a$3, a$5))))
21578
21790
  )));
21579
21791
  })
21580
21792
  ));
@@ -21584,111 +21796,111 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
21584
21796
  });
21585
21797
  });
21586
21798
  };
21587
- return $73((v1$2) => $54(
21588
- $ParseState($11, $122, false),
21589
- $73,
21590
- $82,
21591
- (v2$3, $14) => $13($ParseState(v2$3._1, v2$3._2, false), $14),
21592
- (state2$2, a$2) => $73((v2$3) => $73((v1$3) => opTree$lazy()(
21799
+ return $112((v1$2) => $93(
21800
+ $ParseState($15, $16, false),
21801
+ $112,
21802
+ $12,
21803
+ (v2$3, $18) => $17($ParseState(v2$3._1, v2$3._2, false), $18),
21804
+ (state2$2, a$2) => $112((v2$3) => $112((v1$3) => opTree$lazy()(
21593
21805
  state2$2,
21594
- $73,
21595
- $82,
21596
- $13,
21597
- (state2$3, a$3) => $73((v2$4) => $10(state2$3, $Qualifier("ListCompGuard", a$3)))
21806
+ $112,
21807
+ $12,
21808
+ $17,
21809
+ (state2$3, a$3) => $112((v2$4) => $14(state2$3, $Qualifier("ListCompGuard", a$3)))
21598
21810
  )))
21599
21811
  ));
21600
21812
  });
21601
21813
  };
21602
21814
  })());
21603
- return (state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => $53(
21815
+ return (state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => $92(
21604
21816
  state1$1,
21605
21817
  more$1,
21606
21818
  lift1$1,
21607
21819
  throw$1,
21608
21820
  (state2$2, a$2) => more$1((v2$2) => {
21609
- const $63 = delim("]");
21610
- return more$1((v1$3) => $63(
21821
+ const $102 = delim("]");
21822
+ return more$1((v1$3) => $102(
21611
21823
  state2$2,
21612
21824
  more$1,
21613
21825
  lift1$1,
21614
21826
  throw$1,
21615
- (state2$3, a$3) => more$1((v2$3) => done$1(state2$3, $Expr2("ListComp", void 0, $32, $List("Cons", a$2._1, a$2._2))))
21827
+ (state2$3, a$3) => more$1((v2$3) => done$1(state2$3, $Expr2("ListComp", void 0, $72, $List("Cons", a$2._1, a$2._2))))
21616
21828
  ));
21617
21829
  })
21618
21830
  ));
21619
21831
  })());
21620
21832
  const listRest$lazy = binding(() => {
21621
- const $63 = delim("]");
21622
- const $73 = delim(",");
21623
- return (v2$2, $82, $9, $10, $11) => {
21624
- const $122 = v2$2._1;
21625
- const $13 = v2$2._2;
21626
- return $82((v3) => $82((v1$2) => $63(
21627
- $ParseState($122, $13, false),
21628
- $82,
21629
- $9,
21630
- (v4, $14) => {
21631
- const $15 = v4._3;
21632
- return $82((v5) => {
21633
- if ($15) {
21634
- return $10(v4, $14);
21833
+ const $102 = delim("]");
21834
+ const $112 = delim(",");
21835
+ return (v2$2, $12, $13, $14, $15) => {
21836
+ const $16 = v2$2._1;
21837
+ const $17 = v2$2._2;
21838
+ return $12((v3) => $12((v1$2) => $102(
21839
+ $ParseState($16, $17, false),
21840
+ $12,
21841
+ $13,
21842
+ (v4, $18) => {
21843
+ const $19 = v4._3;
21844
+ return $12((v5) => {
21845
+ if ($19) {
21846
+ return $14(v4, $18);
21635
21847
  }
21636
- return $82((v1$3) => $73(
21848
+ return $12((v1$3) => $112(
21637
21849
  v2$2,
21638
- $82,
21639
- $9,
21640
- $10,
21641
- (state2$2, a$2) => $82((v2$3) => $82((v1$4) => opTree$lazy()(
21850
+ $12,
21851
+ $13,
21852
+ $14,
21853
+ (state2$2, a$2) => $12((v2$3) => $12((v1$4) => opTree$lazy()(
21642
21854
  state2$2,
21643
- $82,
21644
- $9,
21645
- $10,
21646
- (state2$3, a$3) => $82((v2$4) => $82((v1$5) => listRest$lazy()(
21855
+ $12,
21856
+ $13,
21857
+ $14,
21858
+ (state2$3, a$3) => $12((v2$4) => $12((v1$5) => listRest$lazy()(
21647
21859
  state2$3,
21648
- $82,
21649
- $9,
21650
- $10,
21651
- (state2$4, a$4) => $82((v2$5) => $11(state2$4, $ListRest("Next", void 0, a$3, a$4)))
21860
+ $12,
21861
+ $13,
21862
+ $14,
21863
+ (state2$4, a$4) => $12((v2$5) => $15(state2$4, $ListRest("Next", void 0, a$3, a$4)))
21652
21864
  )))
21653
21865
  )))
21654
21866
  ));
21655
21867
  });
21656
21868
  },
21657
- (state2$2, a$2) => $82((v2$3) => $11(state2$2, $ListRest("End", void 0)))
21869
+ (state2$2, a$2) => $12((v2$3) => $15(state2$2, $ListRest("End", void 0)))
21658
21870
  )));
21659
21871
  };
21660
21872
  });
21661
21873
  const listRest = listRest$lazy();
21662
- const $62 = state2$1._1;
21663
- const $72 = state2$1._2;
21664
- return more((v3) => $42(
21665
- $ParseState($62, $72, false),
21874
+ const $10 = state2$1._1;
21875
+ const $11 = state2$1._2;
21876
+ return more((v3) => $82(
21877
+ $ParseState($10, $11, false),
21666
21878
  more,
21667
21879
  lift12,
21668
- (v4, $82) => {
21669
- const $9 = v4._3;
21880
+ (v4, $12) => {
21881
+ const $13 = v4._3;
21670
21882
  return more((v5) => {
21671
- if ($9) {
21672
- return $$throw2(v4, $82);
21883
+ if ($13) {
21884
+ return $$throw2(v4, $12);
21673
21885
  }
21674
- const $10 = state2$1._1;
21675
- const $11 = state2$1._2;
21676
- return more((v3$1) => $52(
21677
- $ParseState($10, $11, false),
21886
+ const $14 = state2$1._1;
21887
+ const $15 = state2$1._2;
21888
+ return more((v3$1) => $9(
21889
+ $ParseState($14, $15, false),
21678
21890
  more,
21679
21891
  lift12,
21680
- (v4$1, $122) => {
21681
- const $13 = v4$1._3;
21892
+ (v4$1, $16) => {
21893
+ const $17 = v4$1._3;
21682
21894
  return more((v5$1) => {
21683
- if ($13) {
21684
- return $$throw2(v4$1, $122);
21895
+ if ($17) {
21896
+ return $$throw2(v4$1, $16);
21685
21897
  }
21686
21898
  return more((v1$2) => listRest(
21687
21899
  state2$1,
21688
21900
  more,
21689
21901
  lift12,
21690
21902
  $$throw2,
21691
- (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListNonEmpty", void 0, $32, a$2)))
21903
+ (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListNonEmpty", void 0, $72, a$2)))
21692
21904
  ));
21693
21905
  });
21694
21906
  },
@@ -21705,25 +21917,25 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
21705
21917
  })
21706
21918
  ));
21707
21919
  })());
21708
- const $2 = context("lambda")((() => {
21709
- const $22 = reserved("lambda");
21920
+ const $6 = context("lambda")((() => {
21921
+ const $62 = reserved("lambda");
21710
21922
  return (state1, more, lift12, $$throw2, done) => more((v1) => {
21711
- const $32 = state1._3;
21712
- return $22(
21923
+ const $72 = state1._3;
21924
+ return $62(
21713
21925
  state1,
21714
21926
  more,
21715
21927
  lift12,
21716
- (v2, $42) => $$throw2($ParseState(v2._1, v2._2, $32), $42),
21928
+ (v2, $82) => $$throw2($ParseState(v2._1, v2._2, $72), $82),
21717
21929
  (state2, a) => more((v2) => {
21718
- const $42 = sepBy1(pattern)(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
21719
- return more((v1$1) => $42(
21930
+ const $82 = sepBy1(pattern)(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
21931
+ return more((v1$1) => $82(
21720
21932
  state2,
21721
21933
  more,
21722
21934
  lift12,
21723
21935
  $$throw2,
21724
21936
  (state2$1, a$1) => more((v2$1) => {
21725
- const $52 = delim(":");
21726
- return more((v1$2) => $52(
21937
+ const $9 = delim(":");
21938
+ return more((v1$2) => $9(
21727
21939
  state2$1,
21728
21940
  more,
21729
21941
  lift12,
@@ -21745,516 +21957,558 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
21745
21957
  );
21746
21958
  });
21747
21959
  })());
21748
- const $3 = delim("[");
21749
- const $4 = VarKey();
21750
- const $5 = context("dict")((() => {
21751
- const $52 = delim("{");
21752
- return (state1, more, lift12, $$throw2, done) => more((v1) => $52(
21753
- state1,
21754
- more,
21755
- lift12,
21756
- $$throw2,
21757
- (state2, a) => more((v2) => {
21758
- const $62 = sepBy((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$1) => {
21759
- const $63 = (state2$1, a$1) => more$1((v2$1) => {
21760
- const $64 = lexeme(withErrorMessage(satisfy((v) => v === ":"))("':'"));
21761
- return more$1((v1$2) => $64(
21762
- state2$1,
21763
- more$1,
21764
- lift1$1,
21765
- throw$1,
21766
- (state2$2, a$2) => more$1((v2$2) => more$1((v1$3) => opTree$lazy()(
21767
- state2$2,
21960
+ const $7 = delim("[");
21961
+ const $8 = (() => {
21962
+ const $82 = VarKey();
21963
+ const $9 = context("dict")((() => {
21964
+ const $92 = delim("{");
21965
+ return (state1, more, lift12, $$throw2, done) => more((v1) => $92(
21966
+ state1,
21967
+ more,
21968
+ lift12,
21969
+ $$throw2,
21970
+ (state2, a) => more((v2) => {
21971
+ const $102 = sepBy((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$1) => {
21972
+ const $103 = (state2$1, a$1) => more$1((v2$1) => {
21973
+ const $104 = lexeme(withErrorMessage(satisfy((v) => v === ":"))("':'"));
21974
+ return more$1((v1$2) => $104(
21975
+ state2$1,
21768
21976
  more$1,
21769
21977
  lift1$1,
21770
21978
  throw$1,
21771
- (state2$3, a$3) => more$1((v2$3) => done$1(state2$3, $Tuple(a$1, a$3)))
21772
- )))
21773
- ));
21774
- });
21775
- const $72 = state1$1._1;
21776
- const $82 = state1$1._2;
21777
- return more$1((v3) => {
21778
- const $9 = (v4, $92) => {
21779
- const $10 = v4._3;
21780
- return more$1((v5) => {
21781
- if ($10) {
21782
- return throw$1(v4, $92);
21783
- }
21784
- return more$1((v1$2) => variable(state1$1, more$1, lift1$1, throw$1, (state2$1, a$1) => more$1((v2$1) => $63(state2$1, $4(a$1)))));
21785
- });
21786
- };
21787
- return more$1((v1$2) => $3(
21788
- $ParseState($72, $82, false),
21789
- more$1,
21790
- lift1$1,
21791
- $9,
21792
- (state2$1, a$1) => more$1((v2$1) => more$1((v1$3) => opTree$lazy()(
21793
- state2$1,
21979
+ (state2$2, a$2) => more$1((v2$2) => more$1((v1$3) => expr$lazy()(
21980
+ state2$2,
21981
+ more$1,
21982
+ lift1$1,
21983
+ throw$1,
21984
+ (state2$3, a$3) => more$1((v2$3) => done$1(state2$3, $Tuple(a$1, a$3)))
21985
+ )))
21986
+ ));
21987
+ });
21988
+ const $112 = state1$1._1;
21989
+ const $12 = state1$1._2;
21990
+ return more$1((v3) => {
21991
+ const $13 = (v4, $132) => {
21992
+ const $14 = v4._3;
21993
+ return more$1((v5) => {
21994
+ if ($14) {
21995
+ return throw$1(v4, $132);
21996
+ }
21997
+ return more$1((v1$2) => variable(state1$1, more$1, lift1$1, throw$1, (state2$1, a$1) => more$1((v2$1) => $103(state2$1, $82(a$1)))));
21998
+ });
21999
+ };
22000
+ return more$1((v1$2) => $7(
22001
+ $ParseState($112, $12, false),
21794
22002
  more$1,
21795
22003
  lift1$1,
21796
- $9,
21797
- (state2$2, a$2) => more$1((v2$2) => {
21798
- const $10 = delim("]");
21799
- return more$1((v1$4) => $10(state2$2, more$1, lift1$1, $9, (state2$3, a$3) => more$1((v2$3) => $63(state2$3, $DictEntry("ExprKey", a$2)))));
21800
- })
21801
- )))
21802
- ));
21803
- });
21804
- }))(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
21805
- return more((v1$1) => $62(
21806
- state2,
21807
- more,
21808
- lift12,
21809
- $$throw2,
21810
- (state2$1, a$1) => more((v2$1) => more((v1$2) => whitespace(
21811
- state2$1,
22004
+ $13,
22005
+ (state2$1, a$1) => more$1((v2$1) => more$1((v1$3) => opTree$lazy()(
22006
+ state2$1,
22007
+ more$1,
22008
+ lift1$1,
22009
+ $13,
22010
+ (state2$2, a$2) => more$1((v2$2) => {
22011
+ const $14 = delim("]");
22012
+ return more$1((v1$4) => $14(state2$2, more$1, lift1$1, $13, (state2$3, a$3) => more$1((v2$3) => $103(state2$3, $DictEntry("ExprKey", a$2)))));
22013
+ })
22014
+ )))
22015
+ ));
22016
+ });
22017
+ }))(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
22018
+ return more((v1$1) => $102(
22019
+ state2,
21812
22020
  more,
21813
22021
  lift12,
21814
22022
  $$throw2,
21815
- (state2$2, a$2) => more((v2$2) => {
21816
- const $72 = delim("}");
21817
- return more((v1$3) => $72(state2$2, more, lift12, $$throw2, (state2$3, a$3) => more((v2$3) => done(state2$3, $Expr2("Dictionary", void 0, a$1)))));
21818
- })
21819
- )))
21820
- ));
21821
- })
21822
- ));
21823
- })());
21824
- const $6 = Float();
21825
- const $7 = Int();
21826
- const $8 = (() => {
21827
- const $82 = some(alternativeParserT)(lazyParserT)(satisfy((c) => c !== '"' && c !== "$" && !isSpace(toCharCode(c))));
21828
- const $9 = (() => {
21829
- const $92 = delim("$");
21830
- const $10 = (() => {
21831
- const $102 = Str();
21832
- const $11 = context("pair")((() => {
21833
- const $112 = delim("(");
21834
- return (state1, more, lift12, $$throw2, done) => more((v1) => {
21835
- const $122 = state1._3;
21836
- return more((v1$1) => $112(
21837
- state1,
22023
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => whitespace(
22024
+ state2$1,
21838
22025
  more,
21839
22026
  lift12,
21840
- (v2, $132) => $$throw2($ParseState(v2._1, v2._2, $122), $132),
21841
- (state2, a) => more((v2) => more((v1$2) => opTree$lazy()(
21842
- state2,
21843
- more,
21844
- lift12,
21845
- (v2$1, $132) => $$throw2($ParseState(v2$1._1, v2$1._2, $122), $132),
21846
- (state2$1, a$1) => more((v2$1) => {
21847
- const $132 = delim(",");
21848
- return more((v1$3) => $132(
21849
- state2$1,
22027
+ $$throw2,
22028
+ (state2$2, a$2) => more((v2$2) => {
22029
+ const $112 = delim("}");
22030
+ return more((v1$3) => $112(state2$2, more, lift12, $$throw2, (state2$3, a$3) => more((v2$3) => done(state2$3, $Expr2("Dictionary", void 0, a$1)))));
22031
+ })
22032
+ )))
22033
+ ));
22034
+ })
22035
+ ));
22036
+ })());
22037
+ const $10 = Float();
22038
+ const $11 = (() => {
22039
+ const $112 = Int();
22040
+ const $12 = (() => {
22041
+ const $122 = some(alternativeParserT)(lazyParserT)(satisfy((c) => c !== '"' && c !== "$" && !isSpace(toCharCode(c))));
22042
+ const $13 = (() => {
22043
+ const $132 = delim("$");
22044
+ const $14 = (() => {
22045
+ const $142 = Str();
22046
+ const $15 = context("pair")((() => {
22047
+ const $152 = delim("(");
22048
+ return (state1, more, lift12, $$throw2, done) => more((v1) => {
22049
+ const $162 = state1._3;
22050
+ return more((v1$1) => $152(
22051
+ state1,
22052
+ more,
22053
+ lift12,
22054
+ (v2, $172) => $$throw2($ParseState(v2._1, v2._2, $162), $172),
22055
+ (state2, a) => more((v2) => more((v1$2) => opTree$lazy()(
22056
+ state2,
21850
22057
  more,
21851
22058
  lift12,
21852
- (v2$2, $14) => $$throw2($ParseState(v2$2._1, v2$2._2, $122), $14),
21853
- (state2$2, a$2) => more((v2$2) => more((v2$3) => more((v1$4) => opTree$lazy()(
21854
- state2$2,
21855
- more,
21856
- lift12,
21857
- $$throw2,
21858
- (state2$3, a$3) => more((v2$4) => {
21859
- const $14 = delim(")");
21860
- return more((v1$5) => $14(
21861
- state2$3,
22059
+ (v2$1, $172) => $$throw2($ParseState(v2$1._1, v2$1._2, $162), $172),
22060
+ (state2$1, a$1) => more((v2$1) => {
22061
+ const $172 = delim(",");
22062
+ return more((v1$3) => $172(
22063
+ state2$1,
22064
+ more,
22065
+ lift12,
22066
+ (v2$2, $18) => $$throw2($ParseState(v2$2._1, v2$2._2, $162), $18),
22067
+ (state2$2, a$2) => more((v2$2) => more((v2$3) => more((v1$4) => opTree$lazy()(
22068
+ state2$2,
21862
22069
  more,
21863
22070
  lift12,
21864
22071
  $$throw2,
21865
- (state2$4, a$4) => more((v2$5) => done(
21866
- state2$4,
21867
- $Expr2("Constr", void 0, "Pair", $List("Cons", a$1, $List("Cons", a$3, Nil)))
21868
- ))
21869
- ));
21870
- })
21871
- ))))
21872
- ));
21873
- })
21874
- )))
21875
- ));
21876
- });
21877
- })());
21878
- const args = (e) => {
21879
- const $122 = delim("(");
21880
- return (state1, more, lift12, $$throw2, done) => more((v1) => {
21881
- const $132 = state1._3;
21882
- return more((v1$1) => $122(
21883
- state1,
21884
- more,
21885
- lift12,
21886
- (v2, $14) => $$throw2($ParseState(v2._1, v2._2, $132), $14),
21887
- (state2, a) => more((v2) => sameLine(
21888
- state2,
21889
- more,
21890
- lift12,
21891
- (v2$1, $14) => $$throw2($ParseState(v2$1._1, v2$1._2, $132), $14),
21892
- (state2$1, a$1) => more((v2$1) => {
21893
- const $14 = sepBy(opTree$lazy())(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
21894
- return more((v1$2) => $14(
21895
- state2$1,
22072
+ (state2$3, a$3) => more((v2$4) => {
22073
+ const $18 = delim(")");
22074
+ return more((v1$5) => $18(
22075
+ state2$3,
22076
+ more,
22077
+ lift12,
22078
+ $$throw2,
22079
+ (state2$4, a$4) => more((v2$5) => done(
22080
+ state2$4,
22081
+ $Expr2("Constr", void 0, "Pair", $List("Cons", a$1, $List("Cons", a$3, Nil)))
22082
+ ))
22083
+ ));
22084
+ })
22085
+ ))))
22086
+ ));
22087
+ })
22088
+ )))
22089
+ ));
22090
+ });
22091
+ })());
22092
+ const args = (e) => {
22093
+ const $162 = delim("(");
22094
+ return (state1, more, lift12, $$throw2, done) => more((v1) => {
22095
+ const $172 = state1._3;
22096
+ return more((v1$1) => $162(
22097
+ state1,
22098
+ more,
22099
+ lift12,
22100
+ (v2, $18) => $$throw2($ParseState(v2._1, v2._2, $172), $18),
22101
+ (state2, a) => more((v2) => sameLine(
22102
+ state2,
21896
22103
  more,
21897
22104
  lift12,
21898
- $$throw2,
21899
- (state2$2, a$2) => more((v2$2) => {
21900
- const $15 = delim(")");
21901
- return more((v1$3) => $15(
21902
- state2$2,
22105
+ (v2$1, $18) => $$throw2($ParseState(v2$1._1, v2$1._2, $172), $18),
22106
+ (state2$1, a$1) => more((v2$1) => {
22107
+ const $18 = sepBy(opTree$lazy())(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
22108
+ return more((v1$2) => $18(
22109
+ state2$1,
21903
22110
  more,
21904
22111
  lift12,
21905
22112
  $$throw2,
21906
- (state2$3, a$3) => more((v2$3) => {
21907
- if (e.tag === "Constr") {
21908
- return app($Expr2(
21909
- "Constr",
21910
- e._1,
21911
- e._2,
21912
- foldableList.foldr(Cons)(foldableList.foldr(Cons)(Nil)(a$2))(e._3)
21913
- ))(state2$3, more, lift12, $$throw2, done);
21914
- }
21915
- return app((() => {
21916
- const go = (go$a0$copy) => (go$a1$copy) => {
21917
- let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
21918
- while (go$c) {
21919
- const b = go$a0, v = go$a1;
21920
- if (v.tag === "Nil") {
21921
- go$c = false;
21922
- go$r = b;
21923
- continue;
21924
- }
21925
- if (v.tag === "Cons") {
21926
- go$a0 = $Expr2("App", b, v._1);
21927
- go$a1 = v._2;
21928
- continue;
21929
- }
21930
- fail();
22113
+ (state2$2, a$2) => more((v2$2) => {
22114
+ const $19 = delim(")");
22115
+ return more((v1$3) => $19(
22116
+ state2$2,
22117
+ more,
22118
+ lift12,
22119
+ $$throw2,
22120
+ (state2$3, a$3) => more((v2$3) => {
22121
+ if (e.tag === "Constr") {
22122
+ return app($Expr2(
22123
+ "Constr",
22124
+ e._1,
22125
+ e._2,
22126
+ foldableList.foldr(Cons)(foldableList.foldr(Cons)(Nil)(a$2))(e._3)
22127
+ ))(state2$3, more, lift12, $$throw2, done);
21931
22128
  }
21932
- return go$r;
21933
- };
21934
- return go(e)(a$2);
21935
- })())(state2$3, more, lift12, $$throw2, done);
22129
+ return app((() => {
22130
+ const go = (go$a0$copy) => (go$a1$copy) => {
22131
+ let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
22132
+ while (go$c) {
22133
+ const b = go$a0, v = go$a1;
22134
+ if (v.tag === "Nil") {
22135
+ go$c = false;
22136
+ go$r = b;
22137
+ continue;
22138
+ }
22139
+ if (v.tag === "Cons") {
22140
+ go$a0 = $Expr2("App", b, v._1);
22141
+ go$a1 = v._2;
22142
+ continue;
22143
+ }
22144
+ fail();
22145
+ }
22146
+ return go$r;
22147
+ };
22148
+ return go(e)(a$2);
22149
+ })())(state2$3, more, lift12, $$throw2, done);
22150
+ })
22151
+ ));
21936
22152
  })
21937
22153
  ));
21938
22154
  })
21939
- ));
21940
- })
21941
- ))
21942
- ));
21943
- });
21944
- };
21945
- const app = (e) => {
21946
- const $122 = args(e);
21947
- return (v2, $132, $14, $15, $16) => {
21948
- const $17 = v2._1;
21949
- const $18 = v2._2;
21950
- return $132((v3) => {
21951
- const $19 = (v4, $192) => {
21952
- const $20 = v4._3;
21953
- return $132((v5) => {
21954
- if ($20) {
21955
- return $15(v4, $192);
21956
- }
21957
- return $16(v2, e);
21958
- });
21959
- };
21960
- return $132((v2$1) => $132((v1) => sameLine(
21961
- $ParseState($17, $18, false),
21962
- $132,
21963
- $14,
21964
- $19,
21965
- (state2, a) => $132((v2$2) => $132((v3$1) => $122(state2, $132, $14, $19, (state3, a$1) => $132((v4) => $16(state3, a$1)))))
21966
- )));
21967
- });
21968
- };
21969
- };
21970
- const $12 = context("app chain")(withPos((() => {
21971
- const $122 = Constr2();
21972
- const $132 = context("parens op")((() => {
21973
- const $133 = delim("(");
21974
- return (state1, more, lift12, $$throw2, done) => more((v1) => $133(
21975
- state1,
21976
- more,
21977
- lift12,
21978
- $$throw2,
21979
- (state2, a) => more((v2) => more((v1$1) => operator(
21980
- state2,
21981
- more,
21982
- lift12,
21983
- $$throw2,
21984
- (state2$1, a$1) => more((v2$1) => {
21985
- const $14 = delim(")");
21986
- return more((v1$2) => $14(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("Op", a$1)))));
21987
- })
21988
- )))
21989
- ));
21990
- })());
21991
- return (state1, more, lift12, $$throw2, done) => more((v1) => {
21992
- const $14 = state1._1;
21993
- const $15 = state1._2;
21994
- return more((v3) => more((v1$1) => variable(
21995
- $ParseState($14, $15, false),
21996
- more,
21997
- lift12,
21998
- (v4, $16) => {
21999
- const $17 = v4._3;
22000
- return more((v5) => {
22001
- if ($17) {
22002
- return $$throw2(v4, $16);
22003
- }
22004
- const $18 = state1._1;
22005
- const $19 = state1._2;
22006
- return more((v3$1) => more((v1$2) => constructor(
22007
- $ParseState($18, $19, false),
22008
- more,
22009
- lift12,
22010
- (v4$1, $20) => {
22011
- const $21 = v4$1._3;
22012
- return more((v5$1) => {
22013
- if ($21) {
22014
- return $$throw2(v4$1, $20);
22015
- }
22016
- const $22 = state1._1;
22017
- const $23 = state1._2;
22018
- return more((v3$2) => parensExpr(
22019
- $ParseState($22, $23, false),
22020
- more,
22021
- lift12,
22022
- (v2, $24) => more((v5$2) => {
22023
- const $25 = state1._3;
22024
- return $132(
22025
- state1,
22026
- more,
22027
- lift12,
22028
- (v2$1, $26) => $$throw2($ParseState(v2$1._1, v2$1._2, $25), $26),
22029
- (state2, a) => more((v2$1) => app(a)(state2, more, lift12, $$throw2, done))
22030
- );
22031
- }),
22032
- (state2, a) => more((v2) => app(a)(state2, more, lift12, $$throw2, done))
22033
- ));
22034
- });
22035
- },
22036
- (state2, a) => more((v2) => {
22037
- const $20 = $122(a)(Nil);
22038
- return more((v2$1) => app($20)(state2, more, lift12, $$throw2, done));
22039
- })
22155
+ ))
22156
+ ));
22157
+ });
22158
+ };
22159
+ const app = (e) => {
22160
+ const $162 = args(e);
22161
+ return (v2, $172, $18, $19, $20) => {
22162
+ const $21 = v2._1;
22163
+ const $22 = v2._2;
22164
+ return $172((v3) => {
22165
+ const $23 = (v4, $232) => {
22166
+ const $24 = v4._3;
22167
+ return $172((v5) => {
22168
+ if ($24) {
22169
+ return $19(v4, $232);
22170
+ }
22171
+ return $20(v2, e);
22172
+ });
22173
+ };
22174
+ return $172((v2$1) => $172((v1) => sameLine(
22175
+ $ParseState($21, $22, false),
22176
+ $172,
22177
+ $18,
22178
+ $23,
22179
+ (state2, a) => $172((v2$2) => $172((v3$1) => $162(state2, $172, $18, $23, (state3, a$1) => $172((v4) => $20(state3, a$1)))))
22040
22180
  )));
22041
22181
  });
22042
- },
22043
- (state2, a) => more((v2) => more((v2$1) => app($Expr2("Var", a))(state2, more, lift12, $$throw2, done)))
22044
- )));
22045
- });
22046
- })()));
22047
- const $13 = (() => {
22048
- const $132 = withErrorMessage(context("doc expr")((state1, more, lift12, $$throw2, done) => more((v1) => {
22049
- const $133 = state1._3;
22050
- return lexeme(string2("@doc"))(
22051
- state1,
22052
- more,
22053
- lift12,
22054
- (v2, $14) => $$throw2($ParseState(v2._1, v2._2, $133), $14),
22055
- (state2, a) => more((v2) => {
22056
- const $14 = delim("(");
22057
- return more((v1$1) => $14(
22058
- state2,
22182
+ };
22183
+ };
22184
+ const $16 = context("app chain")(withPos((() => {
22185
+ const $162 = Constr2();
22186
+ const $172 = context("parens op")((() => {
22187
+ const $173 = delim("(");
22188
+ return (state1, more, lift12, $$throw2, done) => more((v1) => $173(
22189
+ state1,
22059
22190
  more,
22060
22191
  lift12,
22061
22192
  $$throw2,
22062
- (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
22063
- state2$1,
22193
+ (state2, a) => more((v2) => more((v1$1) => operator(
22194
+ state2,
22064
22195
  more,
22065
22196
  lift12,
22066
22197
  $$throw2,
22067
- (state2$2, a$2) => more((v2$2) => {
22068
- const $15 = delim(")");
22069
- return more((v1$3) => $15(
22070
- state2$2,
22071
- more,
22072
- lift12,
22073
- $$throw2,
22074
- (state2$3, a$3) => more((v2$3) => more((v1$4) => opTree$lazy()(
22075
- state2$3,
22076
- more,
22077
- lift12,
22078
- $$throw2,
22079
- (state2$4, a$4) => more((v2$4) => done(state2$4, $Expr2("DocExpr", a$2, a$4)))
22080
- )))
22081
- ));
22198
+ (state2$1, a$1) => more((v2$1) => {
22199
+ const $18 = delim(")");
22200
+ return more((v1$2) => $18(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("Op", a$1)))));
22082
22201
  })
22083
22202
  )))
22084
22203
  ));
22085
- })
22086
- );
22087
- })))("simple expression");
22088
- return (v2, $14, $15, $16, $17) => {
22089
- const $18 = v2._1;
22090
- const $19 = v2._2;
22091
- return $14((v3) => $14((v3$1) => $14((v1) => $$float(
22092
- $ParseState($18, $19, false),
22093
- $14,
22094
- $15,
22095
- (v2$1, $20) => $14((v5) => $14((v1$1) => integer(
22096
- $ParseState($18, $19, false),
22097
- $14,
22098
- $15,
22099
- (v4, $21) => {
22100
- const $22 = v4._3;
22101
- return $14((v5$1) => {
22102
- if ($22) {
22103
- return $16(v4, $21);
22104
- }
22105
- const $23 = v2._1;
22106
- const $24 = v2._2;
22107
- return $14((v3$2) => {
22108
- const $25 = (v4$1, $252) => {
22109
- const $26 = v4$1._3;
22110
- return $14((v5$2) => {
22111
- if ($26) {
22112
- return $16(v4$1, $252);
22113
- }
22114
- const $27 = v2._1;
22115
- const $28 = v2._2;
22116
- return $14((v3$3) => $14((v1$2) => stringLiteral(
22204
+ })());
22205
+ return (state1, more, lift12, $$throw2, done) => more((v1) => {
22206
+ const $18 = state1._1;
22207
+ const $19 = state1._2;
22208
+ return more((v3) => more((v1$1) => variable(
22209
+ $ParseState($18, $19, false),
22210
+ more,
22211
+ lift12,
22212
+ (v4, $20) => {
22213
+ const $21 = v4._3;
22214
+ return more((v5) => {
22215
+ if ($21) {
22216
+ return $$throw2(v4, $20);
22217
+ }
22218
+ const $22 = state1._1;
22219
+ const $23 = state1._2;
22220
+ return more((v3$1) => more((v1$2) => constructor(
22221
+ $ParseState($22, $23, false),
22222
+ more,
22223
+ lift12,
22224
+ (v4$1, $24) => {
22225
+ const $25 = v4$1._3;
22226
+ return more((v5$1) => {
22227
+ if ($25) {
22228
+ return $$throw2(v4$1, $24);
22229
+ }
22230
+ const $26 = state1._1;
22231
+ const $27 = state1._2;
22232
+ return more((v3$2) => parensExpr(
22233
+ $ParseState($26, $27, false),
22234
+ more,
22235
+ lift12,
22236
+ (v2, $28) => more((v5$2) => {
22237
+ const $29 = state1._3;
22238
+ return $172(
22239
+ state1,
22240
+ more,
22241
+ lift12,
22242
+ (v2$1, $30) => $$throw2($ParseState(v2$1._1, v2$1._2, $29), $30),
22243
+ (state2, a) => more((v2$1) => app(a)(state2, more, lift12, $$throw2, done))
22244
+ );
22245
+ }),
22246
+ (state2, a) => more((v2) => app(a)(state2, more, lift12, $$throw2, done))
22247
+ ));
22248
+ });
22249
+ },
22250
+ (state2, a) => more((v2) => {
22251
+ const $24 = $162(a)(Nil);
22252
+ return more((v2$1) => app($24)(state2, more, lift12, $$throw2, done));
22253
+ })
22254
+ )));
22255
+ });
22256
+ },
22257
+ (state2, a) => more((v2) => more((v2$1) => app($Expr2("Var", a))(state2, more, lift12, $$throw2, done)))
22258
+ )));
22259
+ });
22260
+ })()));
22261
+ const $17 = (() => {
22262
+ const $172 = withErrorMessage(context("doc expr")((state1, more, lift12, $$throw2, done) => more((v1) => {
22263
+ const $173 = state1._3;
22264
+ return lexeme(string2("@doc"))(
22265
+ state1,
22266
+ more,
22267
+ lift12,
22268
+ (v2, $18) => $$throw2($ParseState(v2._1, v2._2, $173), $18),
22269
+ (state2, a) => more((v2) => {
22270
+ const $18 = delim("(");
22271
+ return more((v1$1) => $18(
22272
+ state2,
22273
+ more,
22274
+ lift12,
22275
+ $$throw2,
22276
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
22277
+ state2$1,
22278
+ more,
22279
+ lift12,
22280
+ $$throw2,
22281
+ (state2$2, a$2) => more((v2$2) => {
22282
+ const $19 = delim(")");
22283
+ return more((v1$3) => $19(
22284
+ state2$2,
22285
+ more,
22286
+ lift12,
22287
+ $$throw2,
22288
+ (state2$3, a$3) => more((v2$3) => more((v1$4) => opTree$lazy()(
22289
+ state2$3,
22290
+ more,
22291
+ lift12,
22292
+ $$throw2,
22293
+ (state2$4, a$4) => more((v2$4) => done(state2$4, $Expr2("DocExpr", a$2, a$4)))
22294
+ )))
22295
+ ));
22296
+ })
22297
+ )))
22298
+ ));
22299
+ })
22300
+ );
22301
+ })))("simple expression");
22302
+ return (v2, $18, $19, $20, $21) => {
22303
+ const $22 = v2._1;
22304
+ const $23 = v2._2;
22305
+ return $18((v3) => $18((v3$1) => $18((v1) => $$float(
22306
+ $ParseState($22, $23, false),
22307
+ $18,
22308
+ $19,
22309
+ (v2$1, $24) => $18((v5) => $18((v1$1) => integer(
22310
+ $ParseState($22, $23, false),
22311
+ $18,
22312
+ $19,
22313
+ (v4, $25) => {
22314
+ const $26 = v4._3;
22315
+ return $18((v5$1) => {
22316
+ if ($26) {
22317
+ return $20(v4, $25);
22318
+ }
22319
+ const $27 = v2._1;
22320
+ const $28 = v2._2;
22321
+ return $18((v3$2) => {
22322
+ const $29 = (v4$1, $292) => {
22323
+ const $30 = v4$1._3;
22324
+ return $18((v5$2) => {
22325
+ if ($30) {
22326
+ return $20(v4$1, $292);
22327
+ }
22328
+ const $31 = v2._1;
22329
+ const $32 = v2._2;
22330
+ return $18((v3$3) => $18((v1$2) => stringLiteral(
22331
+ $ParseState($31, $32, false),
22332
+ $18,
22333
+ $19,
22334
+ (v4$2, $33) => {
22335
+ const $34 = v4$2._3;
22336
+ return $18((v5$3) => {
22337
+ if ($34) {
22338
+ return $20(v4$2, $33);
22339
+ }
22340
+ const $35 = v2._1;
22341
+ const $36 = v2._2;
22342
+ return $18((v3$4) => $15(
22343
+ $ParseState($35, $36, false),
22344
+ $18,
22345
+ $19,
22346
+ (v4$3, $37) => {
22347
+ const $38 = v4$3._3;
22348
+ return $18((v5$4) => {
22349
+ if ($38) {
22350
+ return $20(v4$3, $37);
22351
+ }
22352
+ const $39 = v2._1;
22353
+ const $40 = v2._2;
22354
+ return $18((v3$5) => $16(
22355
+ $ParseState($39, $40, false),
22356
+ $18,
22357
+ $19,
22358
+ (v4$4, $41) => {
22359
+ const $42 = v4$4._3;
22360
+ return $18((v5$5) => {
22361
+ if ($42) {
22362
+ return $20(v4$4, $41);
22363
+ }
22364
+ const $43 = v2._1;
22365
+ const $44 = v2._2;
22366
+ return $18((v3$6) => parensExpr(
22367
+ $ParseState($43, $44, false),
22368
+ $18,
22369
+ $19,
22370
+ (v4$5, $45) => {
22371
+ const $46 = v4$5._3;
22372
+ return $18((v5$6) => {
22373
+ if ($46) {
22374
+ return $20(v4$5, $45);
22375
+ }
22376
+ return $172(v2, $18, $19, $20, $21);
22377
+ });
22378
+ },
22379
+ $21
22380
+ ));
22381
+ });
22382
+ },
22383
+ $21
22384
+ ));
22385
+ });
22386
+ },
22387
+ $21
22388
+ ));
22389
+ });
22390
+ },
22391
+ (state2, a) => $18((v2$2) => $21(state2, $142(a)))
22392
+ )));
22393
+ });
22394
+ };
22395
+ return $18((v1$2) => lexeme(string2('"""'))(
22117
22396
  $ParseState($27, $28, false),
22118
- $14,
22119
- $15,
22120
- (v4$2, $29) => {
22121
- const $30 = v4$2._3;
22122
- return $14((v5$3) => {
22123
- if ($30) {
22124
- return $16(v4$2, $29);
22125
- }
22126
- const $31 = v2._1;
22127
- const $32 = v2._2;
22128
- return $14((v3$4) => $11(
22129
- $ParseState($31, $32, false),
22130
- $14,
22131
- $15,
22132
- (v4$3, $33) => {
22133
- const $34 = v4$3._3;
22134
- return $14((v5$4) => {
22135
- if ($34) {
22136
- return $16(v4$3, $33);
22397
+ $18,
22398
+ $19,
22399
+ (v2$2, $30) => $29($ParseState(v2$2._1, v2$2._2, false), $30),
22400
+ (state2, a) => $18((v2$2) => {
22401
+ const $30 = manyRec2(lexeme((v2$3, $302, $31, $32, $33) => {
22402
+ const $34 = v2$3._1;
22403
+ const $35 = v2$3._2;
22404
+ return $302((v3$3) => $302((v1$3) => $122(
22405
+ $ParseState($34, $35, false),
22406
+ $302,
22407
+ $31,
22408
+ (v4$1, $36) => {
22409
+ const $37 = v4$1._3;
22410
+ return $302((v5$2) => {
22411
+ if ($37) {
22412
+ return $32(v4$1, $36);
22137
22413
  }
22138
- const $35 = v2._1;
22139
- const $36 = v2._2;
22140
- return $14((v3$5) => $12(
22141
- $ParseState($35, $36, false),
22142
- $14,
22143
- $15,
22144
- (v4$4, $37) => {
22145
- const $38 = v4$4._3;
22146
- return $14((v5$5) => {
22147
- if ($38) {
22148
- return $16(v4$4, $37);
22149
- }
22150
- const $39 = v2._1;
22151
- const $40 = v2._2;
22152
- return $14((v3$6) => parensExpr(
22153
- $ParseState($39, $40, false),
22154
- $14,
22155
- $15,
22156
- (v4$5, $41) => {
22157
- const $42 = v4$5._3;
22158
- return $14((v5$6) => {
22159
- if ($42) {
22160
- return $16(v4$5, $41);
22161
- }
22162
- return $132(v2, $14, $15, $16, $17);
22163
- });
22164
- },
22165
- $17
22166
- ));
22167
- });
22168
- },
22169
- $17
22414
+ return $302((v1$4) => $132(
22415
+ v2$3,
22416
+ $302,
22417
+ $31,
22418
+ $32,
22419
+ (state2$1, a$1) => $302((v2$4) => {
22420
+ const $38 = delim("{");
22421
+ return $302((v1$5) => $38(
22422
+ state2$1,
22423
+ $302,
22424
+ $31,
22425
+ $32,
22426
+ (state2$2, a$2) => $302((v2$5) => $302((v1$6) => opTree$lazy()(
22427
+ state2$2,
22428
+ $302,
22429
+ $31,
22430
+ $32,
22431
+ (state2$3, a$3) => $302((v2$6) => {
22432
+ const $39 = delim("}");
22433
+ return $302((v1$7) => $39(
22434
+ state2$3,
22435
+ $302,
22436
+ $31,
22437
+ $32,
22438
+ (state2$4, a$4) => $302((v2$7) => $33(state2$4, $ParagraphElem("Unquote", a$3)))
22439
+ ));
22440
+ })
22441
+ )))
22442
+ ));
22443
+ })
22170
22444
  ));
22171
22445
  });
22172
22446
  },
22173
- $17
22174
- ));
22175
- });
22176
- },
22177
- (state2, a) => $14((v2$2) => $17(state2, $102(a)))
22178
- )));
22179
- });
22180
- };
22181
- return $14((v1$2) => lexeme(string2('"""'))(
22182
- $ParseState($23, $24, false),
22183
- $14,
22184
- $15,
22185
- (v2$2, $26) => $25($ParseState(v2$2._1, v2$2._2, false), $26),
22186
- (state2, a) => $14((v2$2) => {
22187
- const $26 = manyRec2(lexeme((v2$3, $262, $27, $28, $29) => {
22188
- const $30 = v2$3._1;
22189
- const $31 = v2$3._2;
22190
- return $262((v3$3) => $262((v1$3) => $82(
22191
- $ParseState($30, $31, false),
22192
- $262,
22193
- $27,
22194
- (v4$1, $32) => {
22195
- const $33 = v4$1._3;
22196
- return $262((v5$2) => {
22197
- if ($33) {
22198
- return $28(v4$1, $32);
22199
- }
22200
- return $262((v1$4) => $92(
22201
- v2$3,
22202
- $262,
22203
- $27,
22204
- $28,
22205
- (state2$1, a$1) => $262((v2$4) => {
22206
- const $34 = delim("{");
22207
- return $262((v1$5) => $34(
22208
- state2$1,
22209
- $262,
22210
- $27,
22211
- $28,
22212
- (state2$2, a$2) => $262((v2$5) => $262((v1$6) => opTree$lazy()(
22213
- state2$2,
22214
- $262,
22215
- $27,
22216
- $28,
22217
- (state2$3, a$3) => $262((v2$6) => {
22218
- const $35 = delim("}");
22219
- return $262((v1$7) => $35(
22220
- state2$3,
22221
- $262,
22222
- $27,
22223
- $28,
22224
- (state2$4, a$4) => $262((v2$7) => $29(state2$4, $ParagraphElem("Unquote", a$3)))
22225
- ));
22226
- })
22227
- )))
22228
- ));
22229
- })
22230
- ));
22231
- });
22232
- },
22233
- (state2$1, a$1) => $262((v2$4) => $29(state2$1, $ParagraphElem("Token", fromCharArray(a$1))))
22234
- )));
22235
- }));
22236
- return $14((v1$3) => $26(
22237
- state2,
22238
- $14,
22239
- $15,
22240
- $25,
22241
- (state2$1, a$1) => $14((v2$3) => $14((v1$4) => lexeme(string2('"""'))(
22242
- state2$1,
22243
- $14,
22244
- $15,
22245
- $25,
22246
- (state2$2, a$2) => $14((v2$4) => $17(state2$2, $Expr2("Paragraph", a$1)))
22247
- )))
22447
+ (state2$1, a$1) => $302((v2$4) => $33(state2$1, $ParagraphElem("Token", fromCharArray(a$1))))
22448
+ )));
22449
+ }));
22450
+ return $18((v1$3) => $30(
22451
+ state2,
22452
+ $18,
22453
+ $19,
22454
+ $29,
22455
+ (state2$1, a$1) => $18((v2$3) => $18((v1$4) => lexeme(string2('"""'))(
22456
+ state2$1,
22457
+ $18,
22458
+ $19,
22459
+ $29,
22460
+ (state2$2, a$2) => $18((v2$4) => $21(state2$2, $Expr2("Paragraph", a$1)))
22461
+ )))
22462
+ ));
22463
+ })
22248
22464
  ));
22249
- })
22250
- ));
22251
- });
22465
+ });
22466
+ });
22467
+ },
22468
+ (state2, a) => $18((v2$2) => $21(state2, $112(a)))
22469
+ ))),
22470
+ (state2, a) => $18((v2$1) => $21(state2, $10(a)))
22471
+ ))));
22472
+ };
22473
+ })();
22474
+ return (v2, $18, $19, $20, $21) => {
22475
+ const $22 = v2._1;
22476
+ const $23 = v2._2;
22477
+ return $18((v3) => $9(
22478
+ $ParseState($22, $23, false),
22479
+ $18,
22480
+ $19,
22481
+ (v4, $24) => {
22482
+ const $25 = v4._3;
22483
+ return $18((v5) => {
22484
+ if ($25) {
22485
+ return $20(v4, $24);
22486
+ }
22487
+ return $17(v2, $18, $19, $20, $21);
22252
22488
  });
22253
22489
  },
22254
- (state2, a) => $14((v2$2) => $17(state2, $7(a)))
22255
- ))),
22256
- (state2, a) => $14((v2$1) => $17(state2, $6(a)))
22257
- ))));
22490
+ $21
22491
+ ));
22492
+ };
22493
+ })();
22494
+ return (v2, $15, $16, $17, $18) => {
22495
+ const $19 = v2._1;
22496
+ const $20 = v2._2;
22497
+ return $15((v3) => $6(
22498
+ $ParseState($19, $20, false),
22499
+ $15,
22500
+ $16,
22501
+ (v4, $21) => {
22502
+ const $22 = v4._3;
22503
+ return $15((v5) => {
22504
+ if ($22) {
22505
+ return $17(v4, $21);
22506
+ }
22507
+ return $14(v2, $15, $16, $17, $18);
22508
+ });
22509
+ },
22510
+ $18
22511
+ ));
22258
22512
  };
22259
22513
  })();
22260
22514
  return (v2, $14, $15, $16, $17) => {
@@ -22277,50 +22531,50 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22277
22531
  ));
22278
22532
  };
22279
22533
  })();
22280
- return (v2, $11, $12, $13, $14) => {
22281
- const $15 = v2._1;
22282
- const $16 = v2._2;
22283
- return $11((v3) => $2(
22284
- $ParseState($15, $16, false),
22285
- $11,
22286
- $12,
22287
- (v4, $17) => {
22288
- const $18 = v4._3;
22289
- return $11((v5) => {
22290
- if ($18) {
22291
- return $13(v4, $17);
22534
+ return (v2, $13, $14, $15, $16) => {
22535
+ const $17 = v2._1;
22536
+ const $18 = v2._2;
22537
+ return $13((v3) => $4(
22538
+ $ParseState($17, $18, false),
22539
+ $13,
22540
+ $14,
22541
+ (v4, $19) => {
22542
+ const $20 = v4._3;
22543
+ return $13((v5) => {
22544
+ if ($20) {
22545
+ return $15(v4, $19);
22292
22546
  }
22293
- return $10(v2, $11, $12, $13, $14);
22547
+ return $12(v2, $13, $14, $15, $16);
22294
22548
  });
22295
22549
  },
22296
- $14
22550
+ $16
22297
22551
  ));
22298
22552
  };
22299
22553
  })();
22300
- return (v2, $10, $11, $12, $13) => {
22301
- const $14 = v2._1;
22302
- const $15 = v2._2;
22303
- return $10((v3) => $1(
22304
- $ParseState($14, $15, false),
22305
- $10,
22306
- $11,
22307
- (v4, $16) => {
22308
- const $17 = v4._3;
22309
- return $10((v5) => {
22310
- if ($17) {
22311
- return $12(v4, $16);
22554
+ return (v2, $12, $13, $14, $15) => {
22555
+ const $16 = v2._1;
22556
+ const $17 = v2._2;
22557
+ return $12((v3) => $3(
22558
+ $ParseState($16, $17, false),
22559
+ $12,
22560
+ $13,
22561
+ (v4, $18) => {
22562
+ const $19 = v4._3;
22563
+ return $12((v5) => {
22564
+ if ($19) {
22565
+ return $14(v4, $18);
22312
22566
  }
22313
- return $9(v2, $10, $11, $12, $13);
22567
+ return $11(v2, $12, $13, $14, $15);
22314
22568
  });
22315
22569
  },
22316
- $13
22570
+ $15
22317
22571
  ));
22318
22572
  };
22319
22573
  })();
22320
22574
  return (v2, $9, $10, $11, $12) => {
22321
22575
  const $13 = v2._1;
22322
22576
  const $14 = v2._2;
22323
- return $9((v3) => $03(
22577
+ return $9((v3) => $1(
22324
22578
  $ParseState($13, $14, false),
22325
22579
  $9,
22326
22580
  $10,
@@ -22364,7 +22618,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22364
22618
  lift12,
22365
22619
  $$throw2,
22366
22620
  (state2$1, a$1) => more((v2$1) => {
22367
- const $22 = block(expr$lazy());
22621
+ const $22 = block2(expr$lazy());
22368
22622
  return more((v1$2) => $22(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Tuple(a$1, a$2)))));
22369
22623
  })
22370
22624
  )))
@@ -22373,7 +22627,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22373
22627
  const $1 = reserved("match");
22374
22628
  const $2 = reserved("if");
22375
22629
  const $3 = context("def")((() => {
22376
- const $32 = context("funDef")((state1, more, lift12, $$throw2, done) => more((v1) => {
22630
+ const $32 = context("funDef")(withPos((state1, more, lift12, $$throw2, done) => more((v1) => {
22377
22631
  const $33 = state1._3;
22378
22632
  return recDefs$lazy()(
22379
22633
  state1,
@@ -22388,8 +22642,8 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22388
22642
  (state2$1, a$1) => more((v2$1) => done(state2$1, $Expr2("LetRec", a, a$1)))
22389
22643
  )))
22390
22644
  );
22391
- }));
22392
- const $42 = context("valDef")((state1, more, lift12, $$throw2, done) => more((v1) => {
22645
+ })));
22646
+ const $42 = context("valDef")(withPos((state1, more, lift12, $$throw2, done) => more((v1) => {
22393
22647
  const $43 = state1._3;
22394
22648
  return varDefs$lazy()(
22395
22649
  state1,
@@ -22404,7 +22658,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22404
22658
  (state2$1, a$1) => more((v2$1) => done(state2$1, $Expr2("Let", a, a$1)))
22405
22659
  )))
22406
22660
  );
22407
- }));
22661
+ })));
22408
22662
  return (v2, $5, $6, $7, $8) => {
22409
22663
  const $9 = v2._1;
22410
22664
  const $10 = v2._2;
@@ -22461,7 +22715,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22461
22715
  $6,
22462
22716
  $15,
22463
22717
  (state2$1, a$1) => $5((v2$2) => {
22464
- const $16 = block(expr$lazy());
22718
+ const $16 = block2(expr$lazy());
22465
22719
  return $5((v1$2) => $16(
22466
22720
  state2$1,
22467
22721
  $5,
@@ -22475,7 +22729,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22475
22729
  $6,
22476
22730
  $15,
22477
22731
  (state2$3, a$3) => $5((v2$4) => {
22478
- const $18 = block(expr$lazy());
22732
+ const $18 = block2(expr$lazy());
22479
22733
  return $5((v1$4) => $18(state2$3, $5, $6, $15, (state2$4, a$4) => $5((v2$5) => $8(state2$4, $Expr2("IfElse", a$1, a$2, a$4)))));
22480
22734
  })
22481
22735
  ));
@@ -22498,7 +22752,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22498
22752
  $6,
22499
22753
  $11,
22500
22754
  (state2$1, a$1) => $5((v2$2) => {
22501
- const $12 = block((state1, more, lift12, $$throw2, done) => more((v1$2) => branch(
22755
+ const $12 = block2((state1, more, lift12, $$throw2, done) => more((v1$2) => branch(
22502
22756
  state1,
22503
22757
  more,
22504
22758
  lift12,
@@ -22527,9 +22781,9 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
22527
22781
  });
22528
22782
  var varDefs = /* @__PURE__ */ varDefs$lazy();
22529
22783
  var recDefs = /* @__PURE__ */ recDefs$lazy();
22530
- var expr = /* @__PURE__ */ expr$lazy();
22784
+ var expr2 = /* @__PURE__ */ expr$lazy();
22531
22785
  var parsePy$p = (input) => {
22532
- const $0 = runParserT2(input)(withImports(expr))(initialPos)._1;
22786
+ const $0 = runParserT2(input)(withImports(expr2))(initialPos)._1;
22533
22787
  if ($0.tag === "Left") {
22534
22788
  return $Either("Left", prettyParseError($0._1));
22535
22789
  }
@@ -24277,13 +24531,13 @@ var elem3 = /* @__PURE__ */ (() => {
24277
24531
  return x.tag === "OptLong" && y.tag === "OptLong" && x._1 === y._1;
24278
24532
  });
24279
24533
  })();
24280
- var simplify2 = (v) => {
24534
+ var simplify = (v) => {
24281
24535
  if (v.tag === "Leaf") {
24282
24536
  return $OptTree("Leaf", v._1);
24283
24537
  }
24284
24538
  if (v.tag === "MultNode") {
24285
24539
  const v1 = arrayBind(v._1)((x) => {
24286
- const $0 = simplify2(x);
24540
+ const $0 = simplify(x);
24287
24541
  if ($0.tag === "MultNode") {
24288
24542
  return $0._1;
24289
24543
  }
@@ -24296,7 +24550,7 @@ var simplify2 = (v) => {
24296
24550
  }
24297
24551
  if (v.tag === "AltNode") {
24298
24552
  const v1 = arrayBind(v._1)((x) => {
24299
- const $0 = simplify2(x);
24553
+ const $0 = simplify(x);
24300
24554
  if ($0.tag === "AltNode") {
24301
24555
  return $0._1;
24302
24556
  }
@@ -24799,7 +25053,7 @@ var treeMapParser = (g) => {
24799
25053
  fail();
24800
25054
  };
24801
25055
  const $0 = go(false)(false)(false)(g);
24802
- return (x) => simplify2($0(x));
25056
+ return (x) => simplify($0(x));
24803
25057
  };
24804
25058
  var mapParser = (f) => {
24805
25059
  const flatten2 = (v) => {
@@ -29261,7 +29515,7 @@ var expr_$lazy = /* @__PURE__ */ binding(() => {
29261
29515
  if (e$p.tag === "Var") {
29262
29516
  return $Expr2("Project", e, e$p._1);
29263
29517
  }
29264
- return throwException(error('Field names are not first class; got "' + renderWithIndent(0)(prettyExpr1(annUnit).pretty(e$p)) + '".'))();
29518
+ return throwException(error('Field names are not first class; got "' + renderWithIndent(Stmt)(0)(0)(prettyExpr1(annUnit).pretty(e$p))._1 + '".'))();
29265
29519
  };
29266
29520
  }
29267
29521
  if (":" === definitely("absurd")(charAt2(0)(a$1))) {
@@ -29901,7 +30155,7 @@ var migrate = (v) => {
29901
30155
  return (v$1) => $0;
29902
30156
  }
29903
30157
  if (v1.tag === "Right") {
29904
- const $0 = _pure(renderWithIndent(0)(prettyExpr1(annUnit).pretty(v1._1._1)));
30158
+ const $0 = _pure(renderWithIndent(Stmt)(0)(0)(prettyExpr1(annUnit).pretty(v1._1._1))._1);
29905
30159
  return (v$1) => $0;
29906
30160
  }
29907
30161
  fail();
@@ -29917,7 +30171,7 @@ var evaluate = (v) => {
29917
30171
  };
29918
30172
  var dispatchCommand = (v) => {
29919
30173
  if (v.tag === "Evaluate") {
29920
- return _bind(evaluate(v._1))((v1) => _liftEffect(log(renderWithIndent(0)(prettyVal(highlightableUnit).pretty(v1)))));
30174
+ return _bind(evaluate(v._1))((v1) => _liftEffect(log(renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableUnit).pretty(v1))._1)));
29921
30175
  }
29922
30176
  if (v.tag === "Migrate") {
29923
30177
  return _bind(migrate(v._1))((r) => _liftEffect(log(r)));