@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.
@@ -11862,25 +11862,25 @@ var Decoration = class extends RangeValue {
11862
11862
  given position.
11863
11863
  */
11864
11864
  static widget(spec) {
11865
- let side = spec.side || 0, block2 = !!spec.block;
11866
- side += block2 ? side > 0 ? 3e8 : -4e8 : side > 0 ? 1e8 : -1e8;
11867
- return new PointDecoration(spec, side, side, block2, spec.widget || null, false);
11865
+ let side = spec.side || 0, block3 = !!spec.block;
11866
+ side += block3 ? side > 0 ? 3e8 : -4e8 : side > 0 ? 1e8 : -1e8;
11867
+ return new PointDecoration(spec, side, side, block3, spec.widget || null, false);
11868
11868
  }
11869
11869
  /**
11870
11870
  Create a replace decoration which replaces the given range with
11871
11871
  a widget, or simply hides it.
11872
11872
  */
11873
11873
  static replace(spec) {
11874
- let block2 = !!spec.block, startSide, endSide;
11874
+ let block3 = !!spec.block, startSide, endSide;
11875
11875
  if (spec.isBlockGap) {
11876
11876
  startSide = -5e8;
11877
11877
  endSide = 4e8;
11878
11878
  } else {
11879
- let { start: start2, end } = getInclusive(spec, block2);
11880
- startSide = (start2 ? block2 ? -3e8 : -1 : 5e8) - 1;
11881
- endSide = (end ? block2 ? 2e8 : 1 : -6e8) + 1;
11879
+ let { start: start2, end } = getInclusive(spec, block3);
11880
+ startSide = (start2 ? block3 ? -3e8 : -1 : 5e8) - 1;
11881
+ endSide = (end ? block3 ? 2e8 : 1 : -6e8) + 1;
11882
11882
  }
11883
- return new PointDecoration(spec, startSide, endSide, block2, spec.widget || null, true);
11883
+ return new PointDecoration(spec, startSide, endSide, block3, spec.widget || null, true);
11884
11884
  }
11885
11885
  /**
11886
11886
  Create a line decoration, which can add DOM attributes to the
@@ -11939,11 +11939,11 @@ var LineDecoration = class _LineDecoration extends Decoration {
11939
11939
  LineDecoration.prototype.mapMode = MapMode.TrackBefore;
11940
11940
  LineDecoration.prototype.point = true;
11941
11941
  var PointDecoration = class _PointDecoration extends Decoration {
11942
- constructor(spec, startSide, endSide, block2, widget, isReplace) {
11942
+ constructor(spec, startSide, endSide, block3, widget, isReplace) {
11943
11943
  super(startSide, endSide, widget, spec);
11944
- this.block = block2;
11944
+ this.block = block3;
11945
11945
  this.isReplace = isReplace;
11946
- this.mapMode = !block2 ? MapMode.TrackDel : startSide <= 0 ? MapMode.TrackBefore : MapMode.TrackAfter;
11946
+ this.mapMode = !block3 ? MapMode.TrackDel : startSide <= 0 ? MapMode.TrackBefore : MapMode.TrackAfter;
11947
11947
  }
11948
11948
  // Only relevant when this.block == true
11949
11949
  get type() {
@@ -11964,13 +11964,13 @@ var PointDecoration = class _PointDecoration extends Decoration {
11964
11964
  }
11965
11965
  };
11966
11966
  PointDecoration.prototype.point = true;
11967
- function getInclusive(spec, block2 = false) {
11967
+ function getInclusive(spec, block3 = false) {
11968
11968
  let { inclusiveStart: start2, inclusiveEnd: end } = spec;
11969
11969
  if (start2 == null)
11970
11970
  start2 = spec.inclusive;
11971
11971
  if (end == null)
11972
11972
  end = spec.inclusive;
11973
- return { start: start2 !== null && start2 !== void 0 ? start2 : block2, end: end !== null && end !== void 0 ? end : block2 };
11973
+ return { start: start2 !== null && start2 !== void 0 ? start2 : block3, end: end !== null && end !== void 0 ? end : block3 };
11974
11974
  }
11975
11975
  function widgetsEq(a, b) {
11976
11976
  return a == b || !!(a && b && a.compare(b));
@@ -12126,14 +12126,14 @@ var LineView = class _LineView extends ContentView {
12126
12126
  }
12127
12127
  static find(docView, pos) {
12128
12128
  for (let i = 0, off = 0; i < docView.children.length; i++) {
12129
- let block2 = docView.children[i], end = off + block2.length;
12129
+ let block3 = docView.children[i], end = off + block3.length;
12130
12130
  if (end >= pos) {
12131
- if (block2 instanceof _LineView)
12132
- return block2;
12131
+ if (block3 instanceof _LineView)
12132
+ return block3;
12133
12133
  if (end > pos)
12134
12134
  break;
12135
12135
  }
12136
- off = end + block2.breakAfter;
12136
+ off = end + block3.breakAfter;
12137
12137
  }
12138
12138
  return null;
12139
12139
  }
@@ -13575,18 +13575,18 @@ function domPosInText(node, x2, y2) {
13575
13575
  function posAtCoords(view2, coords, precise, bias = -1) {
13576
13576
  var _a2, _b;
13577
13577
  let content2 = view2.contentDOM.getBoundingClientRect(), docTop = content2.top + view2.viewState.paddingTop;
13578
- let block2, { docHeight } = view2.viewState;
13578
+ let block3, { docHeight } = view2.viewState;
13579
13579
  let { x: x2, y: y2 } = coords, yOffset = y2 - docTop;
13580
13580
  if (yOffset < 0)
13581
13581
  return 0;
13582
13582
  if (yOffset > docHeight)
13583
13583
  return view2.state.doc.length;
13584
13584
  for (let halfLine = view2.defaultLineHeight / 2, bounced = false; ; ) {
13585
- block2 = view2.elementAtHeight(yOffset);
13586
- if (block2.type == BlockType.Text)
13585
+ block3 = view2.elementAtHeight(yOffset);
13586
+ if (block3.type == BlockType.Text)
13587
13587
  break;
13588
13588
  for (; ; ) {
13589
- yOffset = bias > 0 ? block2.bottom + halfLine : block2.top - halfLine;
13589
+ yOffset = bias > 0 ? block3.bottom + halfLine : block3.top - halfLine;
13590
13590
  if (yOffset >= 0 && yOffset <= docHeight)
13591
13591
  break;
13592
13592
  if (bounced)
@@ -13596,11 +13596,11 @@ function posAtCoords(view2, coords, precise, bias = -1) {
13596
13596
  }
13597
13597
  }
13598
13598
  y2 = docTop + yOffset;
13599
- let lineStart = block2.from;
13599
+ let lineStart = block3.from;
13600
13600
  if (lineStart < view2.viewport.from)
13601
- return view2.viewport.from == 0 ? 0 : precise ? null : posAtCoordsImprecise(view2, content2, block2, x2, y2);
13601
+ return view2.viewport.from == 0 ? 0 : precise ? null : posAtCoordsImprecise(view2, content2, block3, x2, y2);
13602
13602
  if (lineStart > view2.viewport.to)
13603
- return view2.viewport.to == view2.state.doc.length ? view2.state.doc.length : precise ? null : posAtCoordsImprecise(view2, content2, block2, x2, y2);
13603
+ return view2.viewport.to == view2.state.doc.length ? view2.state.doc.length : precise ? null : posAtCoordsImprecise(view2, content2, block3, x2, y2);
13604
13604
  let doc2 = view2.dom.ownerDocument;
13605
13605
  let root2 = view2.root.elementFromPoint ? view2.root : doc2;
13606
13606
  let element = root2.elementFromPoint(x2, y2);
@@ -13630,7 +13630,7 @@ function posAtCoords(view2, coords, precise, bias = -1) {
13630
13630
  if (!node || !view2.docView.dom.contains(node)) {
13631
13631
  let line2 = LineView.find(view2.docView, lineStart);
13632
13632
  if (!line2)
13633
- return yOffset > block2.top + block2.height / 2 ? block2.to : block2.from;
13633
+ return yOffset > block3.top + block3.height / 2 ? block3.to : block3.from;
13634
13634
  ({ node, offset } = domPosAtCoords(line2.dom, x2, y2));
13635
13635
  }
13636
13636
  let nearest = view2.docView.nearest(node);
@@ -13643,14 +13643,14 @@ function posAtCoords(view2, coords, precise, bias = -1) {
13643
13643
  return nearest.localPosFromDOM(node, offset) + nearest.posAtStart;
13644
13644
  }
13645
13645
  }
13646
- function posAtCoordsImprecise(view2, contentRect, block2, x2, y2) {
13646
+ function posAtCoordsImprecise(view2, contentRect, block3, x2, y2) {
13647
13647
  let into = Math.round((x2 - contentRect.left) * view2.defaultCharacterWidth);
13648
- if (view2.lineWrapping && block2.height > view2.defaultLineHeight * 1.5) {
13649
- let line2 = Math.floor((y2 - block2.top) / view2.defaultLineHeight);
13648
+ if (view2.lineWrapping && block3.height > view2.defaultLineHeight * 1.5) {
13649
+ let line2 = Math.floor((y2 - block3.top) / view2.defaultLineHeight);
13650
13650
  into += line2 * view2.viewState.heightOracle.lineLength;
13651
13651
  }
13652
- let content2 = view2.state.sliceDoc(block2.from, block2.to);
13653
- return block2.from + findColumn(content2, into, view2.state.tabSize);
13652
+ let content2 = view2.state.sliceDoc(block3.from, block3.to);
13653
+ return block3.from + findColumn(content2, into, view2.state.tabSize);
13654
13654
  }
13655
13655
  function isSuspiciousSafariCaretResult(node, offset, x2) {
13656
13656
  let len;
@@ -15033,14 +15033,14 @@ var NodeBuilder = class _NodeBuilder {
15033
15033
  this.nodes.push(line2);
15034
15034
  return line2;
15035
15035
  }
15036
- addBlock(block2) {
15036
+ addBlock(block3) {
15037
15037
  this.enterLine();
15038
- if (block2.type == BlockType.WidgetAfter && !this.isCovered)
15038
+ if (block3.type == BlockType.WidgetAfter && !this.isCovered)
15039
15039
  this.ensureLine();
15040
- this.nodes.push(block2);
15041
- this.writtenTo = this.pos = this.pos + block2.length;
15042
- if (block2.type != BlockType.WidgetBefore)
15043
- this.covering = block2;
15040
+ this.nodes.push(block3);
15041
+ this.writtenTo = this.pos = this.pos + block3.length;
15042
+ if (block3.type != BlockType.WidgetBefore)
15043
+ this.covering = block3;
15044
15044
  }
15045
15045
  addLineDeco(height, length6) {
15046
15046
  let line2 = this.ensureLine();
@@ -15216,8 +15216,8 @@ var ViewState = class {
15216
15216
  }
15217
15217
  updateViewportLines() {
15218
15218
  this.viewportLines = [];
15219
- this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (block2) => {
15220
- this.viewportLines.push(this.scaler.scale == 1 ? block2 : scaleBlock(block2, this.scaler));
15219
+ this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (block3) => {
15220
+ this.viewportLines.push(this.scaler.scale == 1 ? block3 : scaleBlock(block3, this.scaler));
15221
15221
  });
15222
15222
  }
15223
15223
  update(update3, scrollTarget = null) {
@@ -15340,13 +15340,13 @@ var ViewState = class {
15340
15340
  let { head } = scrollTarget.range;
15341
15341
  if (head < viewport.from || head > viewport.to) {
15342
15342
  let viewHeight = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top);
15343
- let block2 = map3.lineAt(head, QueryType.ByPos, oracle, 0, 0), topPos;
15343
+ let block3 = map3.lineAt(head, QueryType.ByPos, oracle, 0, 0), topPos;
15344
15344
  if (scrollTarget.y == "center")
15345
- topPos = (block2.top + block2.bottom) / 2 - viewHeight / 2;
15345
+ topPos = (block3.top + block3.bottom) / 2 - viewHeight / 2;
15346
15346
  else if (scrollTarget.y == "start" || scrollTarget.y == "nearest" && head < viewport.from)
15347
- topPos = block2.top;
15347
+ topPos = block3.top;
15348
15348
  else
15349
- topPos = block2.bottom - viewHeight;
15349
+ topPos = block3.bottom - viewHeight;
15350
15350
  viewport = new Viewport(map3.lineAt(topPos - 1e3 / 2, QueryType.ByHeight, oracle, 0, 0).from, map3.lineAt(topPos + viewHeight + 1e3 / 2, QueryType.ByHeight, oracle, 0, 0).to);
15351
15351
  }
15352
15352
  }
@@ -15614,11 +15614,11 @@ var BigScaler = class {
15614
15614
  }
15615
15615
  }
15616
15616
  };
15617
- function scaleBlock(block2, scaler) {
15617
+ function scaleBlock(block3, scaler) {
15618
15618
  if (scaler.scale == 1)
15619
- return block2;
15620
- let bTop = scaler.toDOM(block2.top), bBottom = scaler.toDOM(block2.bottom);
15621
- return new BlockInfo(block2.from, block2.length, bTop, bBottom - bTop, Array.isArray(block2.type) ? block2.type.map((b) => scaleBlock(b, scaler)) : block2.type);
15619
+ return block3;
15620
+ let bTop = scaler.toDOM(block3.top), bBottom = scaler.toDOM(block3.bottom);
15621
+ return new BlockInfo(block3.from, block3.length, bTop, bBottom - bTop, Array.isArray(block3.type) ? block3.type.map((b) => scaleBlock(b, scaler)) : block3.type);
15622
15622
  }
15623
15623
  var theme = /* @__PURE__ */ Facet.define({ combine: (strs) => strs.join(" ") });
15624
15624
  var darkTheme = /* @__PURE__ */ Facet.define({ combine: (values2) => values2.indexOf(true) > -1 });
@@ -21346,18 +21346,18 @@ function moveLine(state, dispatch3, forward) {
21346
21346
  if (state.readOnly)
21347
21347
  return false;
21348
21348
  let changes = [], ranges = [];
21349
- for (let block2 of selectedLineBlocks(state)) {
21350
- if (forward ? block2.to == state.doc.length : block2.from == 0)
21349
+ for (let block3 of selectedLineBlocks(state)) {
21350
+ if (forward ? block3.to == state.doc.length : block3.from == 0)
21351
21351
  continue;
21352
- let nextLine = state.doc.lineAt(forward ? block2.to + 1 : block2.from - 1);
21352
+ let nextLine = state.doc.lineAt(forward ? block3.to + 1 : block3.from - 1);
21353
21353
  let size4 = nextLine.length + 1;
21354
21354
  if (forward) {
21355
- changes.push({ from: block2.to, to: nextLine.to }, { from: block2.from, insert: nextLine.text + state.lineBreak });
21356
- for (let r of block2.ranges)
21355
+ changes.push({ from: block3.to, to: nextLine.to }, { from: block3.from, insert: nextLine.text + state.lineBreak });
21356
+ for (let r of block3.ranges)
21357
21357
  ranges.push(EditorSelection.range(Math.min(state.doc.length, r.anchor + size4), Math.min(state.doc.length, r.head + size4)));
21358
21358
  } else {
21359
- changes.push({ from: nextLine.from, to: block2.from }, { from: block2.to, insert: state.lineBreak + nextLine.text });
21360
- for (let r of block2.ranges)
21359
+ changes.push({ from: nextLine.from, to: block3.from }, { from: block3.to, insert: state.lineBreak + nextLine.text });
21360
+ for (let r of block3.ranges)
21361
21361
  ranges.push(EditorSelection.range(r.anchor - size4, r.head - size4));
21362
21362
  }
21363
21363
  }
@@ -21377,11 +21377,11 @@ function copyLine(state, dispatch3, forward) {
21377
21377
  if (state.readOnly)
21378
21378
  return false;
21379
21379
  let changes = [];
21380
- for (let block2 of selectedLineBlocks(state)) {
21380
+ for (let block3 of selectedLineBlocks(state)) {
21381
21381
  if (forward)
21382
- changes.push({ from: block2.from, insert: state.doc.slice(block2.from, block2.to) + state.lineBreak });
21382
+ changes.push({ from: block3.from, insert: state.doc.slice(block3.from, block3.to) + state.lineBreak });
21383
21383
  else
21384
- changes.push({ from: block2.to, insert: state.lineBreak + state.doc.slice(block2.from, block2.to) });
21384
+ changes.push({ from: block3.to, insert: state.lineBreak + state.doc.slice(block3.from, block3.to) });
21385
21385
  }
21386
21386
  dispatch3(state.update({ changes, scrollIntoView: true, userEvent: "input.copyline" }));
21387
21387
  return true;
@@ -33387,70 +33387,44 @@ var codePointAt2 = (v) => (v1) => {
33387
33387
  };
33388
33388
 
33389
33389
  // output-es/Temp.Pretty.Doc/index.js
33390
- var $Collection = (tag) => tag;
33391
33390
  var $Doc = (tag, _1, _2) => ({ tag, _1, _2 });
33392
33391
  var $Format = (tag) => tag;
33392
+ var $Mode = (tag) => tag;
33393
+ var Stmt = /* @__PURE__ */ $Mode("Stmt");
33393
33394
  var Inline = /* @__PURE__ */ $Format("Inline");
33394
33395
  var Multiline = /* @__PURE__ */ $Format("Multiline");
33395
- var Squash = /* @__PURE__ */ $Format("Squash");
33396
- var Record = /* @__PURE__ */ $Collection("Record");
33397
33396
  var Empty = /* @__PURE__ */ $Doc("Empty");
33398
33397
  var Line2 = /* @__PURE__ */ $Doc("Line");
33399
- var Collection = (value0) => (value1) => $Doc("Collection", value0, value1);
33400
- var intercalate3 = (sep) => (xs) => {
33401
- const go = (go$a0$copy) => (go$a1$copy) => {
33402
- let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
33403
- while (go$c) {
33404
- const b = go$a0, v = go$a1;
33405
- if (v.tag === "Nil") {
33406
- go$c = false;
33407
- go$r = b;
33408
- continue;
33409
- }
33410
- if (v.tag === "Cons") {
33411
- go$a0 = b.init ? { init: false, acc: v._1 } : { init: false, acc: $Doc("Concat", b.acc, $Doc("Concat", sep, v._1)) };
33412
- go$a1 = v._2;
33413
- continue;
33414
- }
33415
- fail();
33416
- }
33417
- return go$r;
33418
- };
33419
- return go({ init: true, acc: Empty })(xs).acc;
33420
- };
33421
- var widthList = (v) => {
33422
- if (v.tag === "Nil") {
33398
+ var width = (m) => (doc2) => {
33399
+ if (doc2.tag === "Empty") {
33423
33400
  return 0;
33424
33401
  }
33425
- if (v.tag === "Cons") {
33426
- if (v._2.tag === "Nil") {
33427
- return width(v._1);
33428
- }
33429
- return (width(v._1) + 2 | 0) + widthList(v._2) | 0;
33430
- }
33431
- fail();
33432
- };
33433
- var width = (v) => {
33434
- if (v.tag === "Empty") {
33402
+ if (doc2.tag === "Line") {
33435
33403
  return 0;
33436
33404
  }
33437
- if (v.tag === "Line") {
33438
- return 0;
33405
+ if (doc2.tag === "Text") {
33406
+ return toCodePointArray(doc2._1).length;
33439
33407
  }
33440
- if (v.tag === "Text") {
33441
- return toCodePointArray(v._1).length;
33408
+ if (doc2.tag === "Indent") {
33409
+ return width(m)(doc2._1);
33442
33410
  }
33443
- if (v.tag === "Indent") {
33444
- return width(v._1);
33411
+ if (doc2.tag === "Concat") {
33412
+ return width(m)(doc2._1) + width(m)(doc2._2) | 0;
33445
33413
  }
33446
- if (v.tag === "Concat") {
33447
- return width(v._1) + width(v._2) | 0;
33414
+ if (doc2.tag === "Mode") {
33415
+ return width(doc2._1)(doc2._2);
33448
33416
  }
33449
- if (v.tag === "Block") {
33450
- return width(v._1);
33417
+ if (doc2.tag === "StmtOrExpr") {
33418
+ if (m === "Stmt") {
33419
+ return width(m)(doc2._1);
33420
+ }
33421
+ if (m === "Expr") {
33422
+ return width(m)(doc2._2);
33423
+ }
33424
+ fail();
33451
33425
  }
33452
- if (v.tag === "Collection") {
33453
- return widthList(v._2);
33426
+ if (doc2.tag === "InlOrMul") {
33427
+ return width(m)(doc2._1);
33454
33428
  }
33455
33429
  fail();
33456
33430
  };
@@ -33460,113 +33434,140 @@ var spaces = (n) => {
33460
33434
  }
33461
33435
  return " " + spaces(n - 1 | 0);
33462
33436
  };
33463
- var record = /* @__PURE__ */ Collection(Record);
33464
- var inlinable = (doc2) => {
33437
+ var inlinable = (m) => (doc2) => {
33438
+ if (doc2.tag === "Empty") {
33439
+ return true;
33440
+ }
33465
33441
  if (doc2.tag === "Line") {
33466
33442
  return false;
33467
33443
  }
33444
+ if (doc2.tag === "Text") {
33445
+ return true;
33446
+ }
33468
33447
  if (doc2.tag === "Indent") {
33469
33448
  return false;
33470
33449
  }
33471
33450
  if (doc2.tag === "Concat") {
33472
- return inlinable(doc2._1) && inlinable(doc2._2);
33451
+ return inlinable(m)(doc2._1) && inlinable(m)(doc2._2);
33473
33452
  }
33474
- return true;
33475
- };
33476
- var format2 = (doc2) => {
33477
- if (doc2.tag === "Block") {
33478
- if (doc2._1.tag === "Collection") {
33479
- return Inline;
33480
- }
33481
- if (inlinable(doc2._1) && width(doc2._1) < 20) {
33482
- return Inline;
33483
- }
33484
- return Multiline;
33453
+ if (doc2.tag === "Mode") {
33454
+ return inlinable(doc2._1)(doc2._2);
33485
33455
  }
33486
- if (doc2.tag === "Collection") {
33487
- if (widthList(doc2._2) === 0) {
33488
- return Squash;
33456
+ if (doc2.tag === "StmtOrExpr") {
33457
+ if (m === "Stmt") {
33458
+ return false;
33489
33459
  }
33490
- if (widthList(doc2._2) < 50) {
33491
- return Inline;
33460
+ if (m === "Expr") {
33461
+ return inlinable(m)(doc2._2);
33492
33462
  }
33493
- return Multiline;
33494
- }
33495
- return Inline;
33496
- };
33497
- var simplifyList = (ds) => (fmt) => {
33498
- if (fmt === "Squash") {
33499
- return Empty;
33500
- }
33501
- if (fmt === "Inline") {
33502
- return intercalate3($Doc("Text", ", "))(listMap((d) => simplify(d))(ds));
33463
+ fail();
33503
33464
  }
33504
- if (fmt === "Multiline") {
33505
- return $Doc("Concat", $Doc("Indent", intercalate3($Doc("Text", ","))(listMap((d) => $Doc("Concat", Line2, simplify(d)))(ds))), Line2);
33465
+ if (doc2.tag === "InlOrMul") {
33466
+ return inlinable(m)(doc2._1);
33506
33467
  }
33507
33468
  fail();
33508
33469
  };
33509
- var simplify = (doc2) => {
33510
- const fmt = format2(doc2);
33511
- if (doc2.tag === "Block") {
33512
- if (fmt === "Squash") {
33513
- return $Doc("Concat", $Doc("Text", ": "), simplify(doc2._1));
33514
- }
33515
- if (fmt === "Inline") {
33516
- return $Doc("Concat", $Doc("Text", ": "), simplify(doc2._1));
33517
- }
33518
- if (fmt === "Multiline") {
33519
- return $Doc("Concat", $Doc("Text", ":"), $Doc("Indent", $Doc("Concat", Line2, simplify(doc2._1))));
33520
- }
33521
- fail();
33522
- }
33523
- if (doc2.tag === "Collection") {
33524
- return (() => {
33525
- if (doc2._1 === "Record") {
33526
- if (fmt === "Squash") {
33527
- return (d) => $Doc("Concat", $Doc("Text", "{"), $Doc("Concat", d, $Doc("Text", "}")));
33528
- }
33529
- if (fmt === "Inline") {
33530
- return (d) => $Doc("Concat", $Doc("Text", "{ "), $Doc("Concat", d, $Doc("Text", " }")));
33531
- }
33532
- if (fmt === "Multiline") {
33533
- return (d) => $Doc("Concat", $Doc("Text", "{"), $Doc("Concat", d, $Doc("Text", "}")));
33534
- }
33535
- fail();
33536
- }
33537
- if (doc2._1 === "Array") {
33538
- return (d) => $Doc("Concat", $Doc("Text", "["), $Doc("Concat", d, $Doc("Text", "]")));
33539
- }
33540
- fail();
33541
- })()(simplifyList(doc2._2)(fmt));
33470
+ var format2 = (m) => (w) => (doc2) => {
33471
+ if (inlinable(m)(doc2) && width(m)(doc2) < (80 - w | 0)) {
33472
+ return Inline;
33542
33473
  }
33543
- return doc2;
33474
+ return Multiline;
33544
33475
  };
33545
- var renderWithIndent = (n) => (doc2) => {
33476
+ var renderWithIndent = (m) => (i) => (w) => (doc2) => {
33477
+ const indentation = i * 2 | 0;
33478
+ const fmt = format2(m)(w)(doc2);
33479
+ const $0 = (d1, d2) => {
33480
+ const v = renderWithIndent(m)(i)(w)(d1);
33481
+ const v1 = renderWithIndent(m)(i)(v._2)(d2);
33482
+ return $Tuple(v._1 + v1._1, v1._2);
33483
+ };
33546
33484
  if (doc2.tag === "Empty") {
33547
- return "";
33485
+ return $Tuple("", w);
33548
33486
  }
33549
33487
  if (doc2.tag === "Line") {
33550
- const $0 = n * 2 | 0;
33551
- if ($0 <= 0) {
33552
- return "\n";
33488
+ return $Tuple(indentation <= 0 ? "\n" : "\n " + spaces(indentation - 1 | 0), indentation);
33489
+ }
33490
+ if (doc2.tag === "Concat") {
33491
+ if (doc2._1.tag === "Line") {
33492
+ if (doc2._2.tag === "Empty") {
33493
+ return $Tuple("\n", 0);
33494
+ }
33495
+ if (doc2._2.tag === "Line") {
33496
+ return $Tuple(indentation <= 0 ? "\n\n" : "\n\n " + spaces(indentation - 1 | 0), indentation);
33497
+ }
33553
33498
  }
33554
- return "\n " + spaces($0 - 1 | 0);
33499
+ return $0(doc2._1, doc2._2);
33555
33500
  }
33556
33501
  if (doc2.tag === "Text") {
33557
- return doc2._1;
33502
+ return $Tuple(doc2._1, w + toCodePointArray(doc2._1).length | 0);
33558
33503
  }
33559
33504
  if (doc2.tag === "Indent") {
33560
- return renderWithIndent(n + 1 | 0)(doc2._1);
33505
+ return renderWithIndent(m)(i + 1 | 0)(w)(doc2._1);
33561
33506
  }
33562
- if (doc2.tag === "Concat") {
33563
- if (doc2._1.tag === "Line" && doc2._2.tag === "Empty") {
33564
- return "\n";
33507
+ if (doc2.tag === "Mode") {
33508
+ return renderWithIndent(doc2._1)(i)(w)(doc2._2);
33509
+ }
33510
+ if (doc2.tag === "StmtOrExpr") {
33511
+ if (m === "Stmt") {
33512
+ return renderWithIndent(m)(i)(w)(doc2._1);
33513
+ }
33514
+ if (m === "Expr") {
33515
+ return renderWithIndent(m)(i)(w)(doc2._2);
33516
+ }
33517
+ fail();
33518
+ }
33519
+ if (doc2.tag === "InlOrMul") {
33520
+ if (fmt === "Inline") {
33521
+ return renderWithIndent(m)(i)(w)(doc2._1);
33522
+ }
33523
+ if (fmt === "Multiline") {
33524
+ return renderWithIndent(m)(i)(w)(doc2._2);
33525
+ }
33526
+ }
33527
+ fail();
33528
+ };
33529
+
33530
+ // output-es/Temp.Pretty.Helpers/index.js
33531
+ var sep$p = (v) => (v1) => {
33532
+ if (v1.tag === "Nil") {
33533
+ return Empty;
33534
+ }
33535
+ if (v1.tag === "Cons") {
33536
+ if (v1._2.tag === "Nil") {
33537
+ return v1._1;
33565
33538
  }
33566
- return renderWithIndent(n)(doc2._1) + renderWithIndent(n)(doc2._2);
33539
+ return $Doc("Concat", v1._1, $Doc("Concat", v, sep$p(v)(v1._2)));
33567
33540
  }
33568
- return renderWithIndent(n)(simplify(doc2));
33541
+ fail();
33569
33542
  };
33543
+ var record = (ds) => $Doc(
33544
+ "InlOrMul",
33545
+ $Doc(
33546
+ "Concat",
33547
+ $Doc("Text", "{"),
33548
+ $Doc(
33549
+ "Concat",
33550
+ $Doc("Text", " "),
33551
+ $Doc(
33552
+ "Concat",
33553
+ sep$p($Doc("Text", ", "))(ds),
33554
+ $Doc("Concat", $Doc("Text", " "), $Doc("Text", "}"))
33555
+ )
33556
+ )
33557
+ ),
33558
+ $Doc(
33559
+ "Concat",
33560
+ $Doc("Text", "{"),
33561
+ $Doc(
33562
+ "Concat",
33563
+ $Doc(
33564
+ "Indent",
33565
+ $Doc("Concat", Line2, sep$p($Doc("Concat", $Doc("Text", ","), Line2))(ds))
33566
+ ),
33567
+ $Doc("Concat", Line2, $Doc("Text", "}"))
33568
+ )
33569
+ )
33570
+ );
33570
33571
 
33571
33572
  // output-es/Temp.Pretty/index.js
33572
33573
  var identity27 = (x2) => x2;
@@ -33623,7 +33624,7 @@ var rootOpVal = (dictHighlightable) => ({
33623
33624
  fail();
33624
33625
  }
33625
33626
  });
33626
- var prettyP = (dictPretty) => (x2) => renderWithIndent(0)(dictPretty.pretty(x2));
33627
+ var prettyP = (dictPretty) => (x2) => renderWithIndent(Stmt)(0)(0)(dictPretty.pretty(x2))._1;
33627
33628
  var getPrec = (x2) => {
33628
33629
  const v = lookup2(ordString)(x2)(opDefs);
33629
33630
  if (v.tag === "Just") {
@@ -33677,7 +33678,7 @@ var prettyConstr = (dictRootOp) => (dictPretty) => {
33677
33678
  return (v) => (v1) => {
33678
33679
  if (v1.tag === "Nil") {
33679
33680
  if (v === "Nil") {
33680
- return $Doc("Concat", $Doc("Text", "["), $Doc("Text", "]"));
33681
+ return $Doc("Text", "[]");
33681
33682
  }
33682
33683
  return $Doc("Text", v);
33683
33684
  }
@@ -33793,6 +33794,9 @@ var prettyBaseVal = (dictHighlightable) => {
33793
33794
  );
33794
33795
  }
33795
33796
  if (v.tag === "Dictionary") {
33797
+ if (isEmpty(v._1)) {
33798
+ return $Doc("Text", "{}");
33799
+ }
33796
33800
  return record(listMap(prettyVar$x215$x215Val(dictHighlightable).pretty)(toUnfoldable7(v._1)));
33797
33801
  }
33798
33802
  if (v.tag === "Constr") {
@@ -34902,8 +34906,8 @@ var unary = (dictBoundedJoinSemilattice) => {
34902
34906
  )
34903
34907
  );
34904
34908
  };
34905
- var typeError = (v) => (typeName3) => throwException(error(typeName3 + " expected; got " + renderWithIndent(0)(prettyBaseVal(highlightableUnit).pretty(functorBaseVal.map((v$1) => {
34906
- })(v)))))();
34909
+ var typeError = (v) => (typeName3) => throwException(error(typeName3 + " expected; got " + renderWithIndent(Stmt)(0)(0)(prettyBaseVal(highlightableUnit).pretty(functorBaseVal.map((v$1) => {
34910
+ })(v)))._1))();
34907
34911
  var string2 = {
34908
34912
  pack: Str2,
34909
34913
  unpack: (v) => {
@@ -37327,11 +37331,11 @@ function setSelection_({
37327
37331
  selState: selState2,
37328
37332
  selClasses: selClasses2,
37329
37333
  selClassesFor: selClassesFor2
37330
- }, { matrix }, select2, rootElement) {
37334
+ }, { matrix: matrix2 }, select2, rootElement) {
37331
37335
  return () => {
37332
37336
  var listener = eventListener2(withElement(select2))();
37333
37337
  rootElement.selectAll(".matrix-cell").each(function(cellRect) {
37334
- const sel = selState2(matrix.cells[cellRect.i - 1][cellRect.j - 1]);
37338
+ const sel = selState2(matrix2.cells[cellRect.i - 1][cellRect.j - 1]);
37335
37339
  select_default2(this).classed(selClasses2, false).classed(selClassesFor2(sel), true).on("mousedown", (e) => {
37336
37340
  listener(e);
37337
37341
  }).on("mouseenter", (e) => {
@@ -37341,31 +37345,31 @@ function setSelection_({
37341
37345
  });
37342
37346
  });
37343
37347
  rootElement.selectAll(".matrix-cell-text").each(function(cellText) {
37344
- const sel = selState2(matrix.cells[cellText.i - 1][cellText.j - 1]);
37348
+ const sel = selState2(matrix2.cells[cellText.i - 1][cellText.j - 1]);
37345
37349
  select_default2(this).classed(selClasses2, false).classed(selClassesFor2(sel), true);
37346
37350
  });
37347
37351
  rootElement.selectAll(".matrix-cell-hBorder").each(function(hBorder) {
37348
- select_default2(this).attr("style", hBorderStyles(matrix)(hBorder));
37352
+ select_default2(this).attr("style", hBorderStyles(matrix2)(hBorder));
37349
37353
  });
37350
37354
  rootElement.selectAll(".matrix-cell-vBorder").each(function(vBorder) {
37351
- select_default2(this).attr("style", vBorderStyles(matrix)(vBorder));
37355
+ select_default2(this).attr("style", vBorderStyles(matrix2)(vBorder));
37352
37356
  });
37353
37357
  };
37354
37358
  }
37355
- function createElement_({ val }, { title: title2, matrix }, parent) {
37359
+ function createElement_({ val }, { title: title2, matrix: matrix2 }, parent) {
37356
37360
  return () => {
37357
37361
  const strokeWidth = 0.5;
37358
37362
  const highlightStrokeWidth = 0.5;
37359
37363
  const highlightStrokeColor = "blue";
37360
37364
  const w = 30, h = 30;
37361
- const [width2, height] = [w * matrix.j + highlightStrokeWidth, h * matrix.i + highlightStrokeWidth];
37365
+ const [width2, height] = [w * matrix2.j + highlightStrokeWidth, h * matrix2.i + highlightStrokeWidth];
37362
37366
  const hMargin = w / 2;
37363
37367
  const vMargin = h / 2;
37364
37368
  const rootElement = parent.append("svg");
37365
37369
  rootElement.attr("width", width2 + hMargin).attr("height", height + vMargin);
37366
37370
  rootElement.append("text").text(title2 === "intermediate" ? " " : title2).attr("x", hMargin / 2).attr("y", vMargin / 2).attr("class", "title-text").attr("dominant-baseline", "middle").attr("text-anchor", "left");
37367
37371
  const matrixGrp = rootElement.append("g").attr("transform", `translate(${highlightStrokeWidth / 2 + hMargin / 2}, ${highlightStrokeWidth / 2 + vMargin})`).attr("fill", "currentColor").attr("stroke", "currentColor").attr("stroke-width", ".25");
37368
- const rowGrp = matrixGrp.selectAll("g").data([...matrix.cells.entries()].map(([i, ns]) => {
37372
+ const rowGrp = matrixGrp.selectAll("g").data([...matrix2.cells.entries()].map(([i, ns]) => {
37369
37373
  return { i: i + 1, ns };
37370
37374
  })).enter().append("g");
37371
37375
  const cells = rowGrp.selectAll("g").data(({ i, ns }) => [...ns.entries()].map(([j, n]) => {
@@ -37375,14 +37379,14 @@ function createElement_({ val }, { title: title2, matrix }, parent) {
37375
37379
  cells.append("text").text(({ n }) => val(n)).attr("x", ({ j }) => (j - 0.5) * w).attr("y", ({ i }) => (i - 0.5) * h).attr("class", "matrix-cell-text").attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("pointer-events", "none");
37376
37380
  const bordersGrp = rootElement.append("g").attr("transform", `translate(${highlightStrokeWidth / 2 + hMargin / 2}, ${highlightStrokeWidth / 2 + vMargin})`).attr("fill", "currentColor").attr("stroke", highlightStrokeColor).attr("stroke-width", highlightStrokeWidth);
37377
37381
  const hBordersGrp = bordersGrp.append("g");
37378
- const hBordersRowGrps = hBordersGrp.selectAll("g").data(range3(matrix.i + 1)).enter().append("g");
37382
+ const hBordersRowGrps = hBordersGrp.selectAll("g").data(range3(matrix2.i + 1)).enter().append("g");
37379
37383
  hBordersRowGrps.each(function(d) {
37380
- select_default2(this).selectAll("line").data(range3(1, matrix.j + 1).map((j) => ({ i: d, j })), (d2) => d2.j).enter().append("line").attr("x1", ({ j }) => (j - 1) * w).attr("y1", ({ i }) => i * h).attr("x2", ({ j }) => j * w).attr("y2", ({ i }) => i * h).attr("class", "matrix-cell-hBorder");
37384
+ select_default2(this).selectAll("line").data(range3(1, matrix2.j + 1).map((j) => ({ i: d, j })), (d2) => d2.j).enter().append("line").attr("x1", ({ j }) => (j - 1) * w).attr("y1", ({ i }) => i * h).attr("x2", ({ j }) => j * w).attr("y2", ({ i }) => i * h).attr("class", "matrix-cell-hBorder");
37381
37385
  });
37382
37386
  const vBordersGrp = bordersGrp.append("g");
37383
- const vBordersRowGrps = vBordersGrp.selectAll("g").data(range3(1, matrix.i + 1), (i) => i).enter().append("g");
37387
+ const vBordersRowGrps = vBordersGrp.selectAll("g").data(range3(1, matrix2.i + 1), (i) => i).enter().append("g");
37384
37388
  vBordersRowGrps.each(function(d) {
37385
- select_default2(this).selectAll("line").data(range3(matrix.j + 1).map((j) => ({ i: d, j }))).enter().append("line").attr("x1", ({ j }) => j * w).attr("y1", ({ i }) => (i - 1) * h).attr("x2", ({ j }) => j * w).attr("y2", ({ i }) => i * h).attr("class", "matrix-cell-vBorder");
37389
+ select_default2(this).selectAll("line").data(range3(matrix2.j + 1).map((j) => ({ i: d, j }))).enter().append("line").attr("x1", ({ j }) => j * w).attr("y1", ({ i }) => (i - 1) * h).attr("x2", ({ j }) => j * w).attr("y2", ({ i }) => i * h).attr("class", "matrix-cell-vBorder");
37386
37390
  });
37387
37391
  return rootElement;
37388
37392
  };
@@ -38665,7 +38669,7 @@ var assertPresent = (v) => (v1) => {
38665
38669
  }
38666
38670
  fail();
38667
38671
  })();
38668
- return assertWhen(true)($0 + " is an existing vertex")((v2) => present)(() => $Step("Loop", $1))();
38672
+ return assertWhen(false)($0 + " is an existing vertex")((v2) => present)(() => $Step("Loop", $1))();
38669
38673
  };
38670
38674
  }
38671
38675
  fail();
@@ -38894,7 +38898,7 @@ var runWithGraphT = (dictMonad) => {
38894
38898
  const freezeGraph2 = freezeGraph1(dictGraph);
38895
38899
  return (m) => (\u03B1s) => dictMonad.Bind1().bind(freezeGraph2(m)(\u03B1s))((v) => {
38896
38900
  const $0 = v._1;
38897
- return assertWhen(true)("edgeListGC")((v1) => dictGraph.Eq0().eq($0)(dictGraph.fromEdgeList(Leaf2)(toEdgeList(dictGraph)($0))))(dictMonad.Applicative0().pure($Tuple(
38901
+ return assertWhen(false)("edgeListGC")((v1) => dictGraph.Eq0().eq($0)(dictGraph.fromEdgeList(Leaf2)(toEdgeList(dictGraph)($0))))(dictMonad.Applicative0().pure($Tuple(
38898
38902
  $0,
38899
38903
  v._2
38900
38904
  )));
@@ -38971,7 +38975,7 @@ var fwdSlice = (dictGraph) => {
38971
38975
  return pure2($Step("Loop", { pending: insert3(ordVertex)(v1.es._1._1)(\u03B2s)(v1.pending), es: v1.es._2 }));
38972
38976
  }
38973
38977
  fail();
38974
- })({ pending: Leaf2, es: inEdges(dictGraph)($0)($1) }))(assertWhen(true)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(dictGraph.sinks($0)).tag === "Leaf")(map2(ordDVertex$p)((\u03B1) => $Tuple(
38978
+ })({ pending: Leaf2, es: inEdges(dictGraph)($0)($1) }))(assertWhen(false)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(dictGraph.sinks($0)).tag === "Leaf")(map2(ordDVertex$p)((\u03B1) => $Tuple(
38975
38979
  \u03B1,
38976
38980
  dictGraph.vertexData($0)(\u03B1)
38977
38981
  ))($1)))._1;
@@ -39015,7 +39019,7 @@ var bwdSlice = (dictGraph) => {
39015
39019
  fail();
39016
39020
  })({
39017
39021
  visited: Leaf2,
39018
- "\u03B1s": fromFoldable18(assertWhen(true)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(addresses2($0)).tag === "Leaf")($1)),
39022
+ "\u03B1s": fromFoldable18(assertWhen(false)("inputs are sinks")((v$1) => difference2(ordVertex)($1)(addresses2($0)).tag === "Leaf")($1)),
39019
39023
  pending: Nil
39020
39024
  }))(Leaf2)._1;
39021
39025
  };
@@ -39125,7 +39129,7 @@ var match = (dictMonadWithGraphAlloc) => {
39125
39129
  $Tuple(v2._2._1, insert3(ordVertex)($4)()(v2._2._2))
39126
39130
  )))));
39127
39131
  }
39128
- 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)));
39132
+ 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)));
39129
39133
  }
39130
39134
  if (v1.tag === "ElimDict") {
39131
39135
  if (v._3.tag === "Dictionary") {
@@ -39138,7 +39142,7 @@ var match = (dictMonadWithGraphAlloc) => {
39138
39142
  $Tuple(v2._2._1, insert3(ordVertex)($3)()(v2._2._2))
39139
39143
  ))));
39140
39144
  }
39141
- return MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected " + show22(v1._1)));
39145
+ return MonadThrow0.throwError(error("Pattern mismatch: found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected " + show22(v1._1)));
39142
39146
  }
39143
39147
  fail();
39144
39148
  };
@@ -39352,7 +39356,7 @@ var $$eval = (dictMonadWithGraphAlloc) => {
39352
39356
  return Nothing;
39353
39357
  })()));
39354
39358
  }
39355
- return MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected dictionary"));
39359
+ return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected dictionary"));
39356
39360
  });
39357
39361
  }
39358
39362
  if (e0.tag === "DProject") {
@@ -39368,9 +39372,9 @@ var $$eval = (dictMonadWithGraphAlloc) => {
39368
39372
  return Nothing;
39369
39373
  })()));
39370
39374
  }
39371
- return MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v$p)) + ", expected string"));
39375
+ return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v$p))._1 + ", expected string"));
39372
39376
  }
39373
- return MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v)) + ", expected dict"));
39377
+ return MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v))._1 + ", expected dict"));
39374
39378
  }));
39375
39379
  }
39376
39380
  if (e0.tag === "App") {
@@ -39425,7 +39429,7 @@ var apply2 = (dictMonadWithGraphAlloc) => {
39425
39429
  return (dictMonadReader) => (dictMonadAff) => {
39426
39430
  const Bind1 = dictMonadAff.MonadEffect0().Monad0().Bind1();
39427
39431
  return (dictLoadFile) => (v) => (v1) => {
39428
- const $0 = (v2) => MonadThrow0.throwError(error("Found " + renderWithIndent(0)(prettyVal(highlightableVertex).pretty(v2)) + ", expected function"));
39432
+ const $0 = (v2) => MonadThrow0.throwError(error("Found " + renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableVertex).pretty(v2))._1 + ", expected function"));
39429
39433
  if (v._3.tag === "Fun") {
39430
39434
  if (v._3._1.tag === "Closure") {
39431
39435
  const $1 = v._1;
@@ -39669,6 +39673,7 @@ var graphEval = (dictMonadAff) => {
39669
39673
  const monadAffState1 = monadAffState(monadAffState2);
39670
39674
  const $1 = monadAffState2.MonadEffect0().Monad0();
39671
39675
  const $2 = dictMonadAff.MonadEffect0().Monad0();
39676
+ const applicativeStateT2 = applicativeStateT(Monad0);
39672
39677
  return (dictMonadReader) => {
39673
39678
  const monadReaderStateT2 = monadReaderStateT(monadReaderStateT(dictMonadReader));
39674
39679
  return (dictLoadFile) => (dictMonadError) => {
@@ -39684,7 +39689,6 @@ var graphEval = (dictMonadAff) => {
39684
39689
  }
39685
39690
  };
39686
39691
  })());
39687
- const check2 = check(monadThrowStateT(dictMonadError.MonadThrow0()));
39688
39692
  return (v) => (e) => {
39689
39693
  const $3 = v["\u03B3"];
39690
39694
  const $4 = spyFunWhen(false)("fwdSlice")((x2) => $Tuple(showVertices(x2._1), showEdgeList(toEdgeList(graphGraphImpl)(x2._2))))(showGraph(graphGraphImpl))(fwdSlice2);
@@ -39695,10 +39699,7 @@ var graphEval = (dictMonadAff) => {
39695
39699
  ))))((v1) => {
39696
39700
  const $6 = v1._1;
39697
39701
  const $7 = v1._2;
39698
- return bindStateT2.bind(check2(difference2(ordDVertex$p)(verticesValVertex.vertices($7))(verticesGraphImpl.vertices($6)).tag === "Leaf")("outputs in graph"))(() => applicativeStateT(Monad0).pure($Tuple(
39699
- $6,
39700
- $Tuple($EnvExpr($3, e\u03B1), $7)
39701
- )));
39702
+ return bindStateT2.bind(applicativeStateT2.pure())(() => applicativeStateT2.pure($Tuple($6, $Tuple($EnvExpr($3, e\u03B1), $7))));
39702
39703
  })))(v.n))((v1) => Monad0.Applicative0().pure({
39703
39704
  g: v1._2._2._1,
39704
39705
  graph_fwd: (a) => (b) => $4($Tuple(a, b)),
@@ -40333,7 +40334,7 @@ var brackets = (e) => {
40333
40334
  )))
40334
40335
  )))));
40335
40336
  };
40336
- var block = (e) => {
40337
+ var block2 = (e) => {
40337
40338
  const $0 = delim(":");
40338
40339
  return (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => more((v2$1) => more((v1$1) => $0(
40339
40340
  state1,
@@ -41164,7 +41165,7 @@ var varDefs$lazy = /* @__PURE__ */ binding(() => {
41164
41165
  $2,
41165
41166
  (v2$1, $6) => $3($ParseState(v2$1._1, v2$1._2, $5), $6),
41166
41167
  (state2$1, a$1) => $1((v2$1) => {
41167
- const $6 = block(expr$lazy());
41168
+ const $6 = block2(expr$lazy());
41168
41169
  return $1((v1$3) => $6(
41169
41170
  state2$1,
41170
41171
  $1,
@@ -41250,7 +41251,7 @@ var recDefs$lazy = /* @__PURE__ */ binding(() => {
41250
41251
  $2,
41251
41252
  (v2$4, $9) => $3($ParseState(v2$4._1, v2$4._2, $5), $9),
41252
41253
  (state2$4, a$4) => $1((v2$4) => {
41253
- const $9 = block(expr$lazy());
41254
+ const $9 = block2(expr$lazy());
41254
41255
  return $1((v1$6) => $9(
41255
41256
  state2$4,
41256
41257
  $1,
@@ -41408,28 +41409,181 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41408
41409
  })());
41409
41410
  return foldlArray(makeParser)((() => {
41410
41411
  const $02 = context("simple")((() => {
41411
- const $03 = context("matrix")((state1, more, lift12, $$throw2, done) => more((v1) => {
41412
- const $04 = state1._3;
41412
+ const $03 = reserved("def");
41413
+ const varDef = (v1, $12, $22, $32, $42) => {
41414
+ const $52 = v1._3;
41415
+ return $12((v1$1) => $03(
41416
+ v1,
41417
+ $12,
41418
+ $22,
41419
+ (v2, $62) => $32($ParseState(v2._1, v2._2, $52), $62),
41420
+ (state2, a) => $12((v2) => $12((v1$2) => pattern(
41421
+ state2,
41422
+ $12,
41423
+ $22,
41424
+ (v2$1, $62) => $32($ParseState(v2$1._1, v2$1._2, $52), $62),
41425
+ (state2$1, a$1) => $12((v2$1) => {
41426
+ const $62 = delim(":");
41427
+ return $12((v1$3) => $62(
41428
+ state2$1,
41429
+ $12,
41430
+ $22,
41431
+ (v2$2, $72) => $32($ParseState(v2$2._1, v2$2._2, $52), $72),
41432
+ (state2$2, a$2) => $12((v2$2) => $12((v1$4) => opTree$lazy()(
41433
+ state2$2,
41434
+ $12,
41435
+ $22,
41436
+ (v2$3, $72) => $32($ParseState(v2$3._1, v2$3._2, $52), $72),
41437
+ (state2$3, a$3) => $12((v2$3) => {
41438
+ const $72 = delim(";");
41439
+ return $12((v1$5) => $72(
41440
+ state2$3,
41441
+ $12,
41442
+ $22,
41443
+ (v2$4, $82) => $32($ParseState(v2$4._1, v2$4._2, $52), $82),
41444
+ (state2$4, a$4) => $12((v2$4) => $42(state2$4, $VarDef2(a$1, a$3)))
41445
+ ));
41446
+ })
41447
+ )))
41448
+ ));
41449
+ })
41450
+ )))
41451
+ ));
41452
+ };
41453
+ const $1 = context("letExpr")((state1, more, lift12, $$throw2, done) => more((v1) => varDef(
41454
+ state1,
41455
+ more,
41456
+ lift12,
41457
+ $$throw2,
41458
+ (state2, a) => more((v2) => {
41459
+ const $12 = manyRec2(varDef);
41460
+ return more((v1$1) => $12(
41461
+ state2,
41462
+ more,
41463
+ lift12,
41464
+ $$throw2,
41465
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
41466
+ state2$1,
41467
+ more,
41468
+ lift12,
41469
+ $$throw2,
41470
+ (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("Let", nonEmptyListNonEmptyList.nonEmpty($List("Cons", a, a$1)), a$2)))
41471
+ )))
41472
+ ));
41473
+ })
41474
+ )));
41475
+ const $2 = reserved("def");
41476
+ const recDef = (v1, $32, $42, $52, $62) => {
41477
+ const $72 = v1._3;
41478
+ return $32((v1$1) => $2(
41479
+ v1,
41480
+ $32,
41481
+ $42,
41482
+ (v2, $82) => $52($ParseState(v2._1, v2._2, $72), $82),
41483
+ (state2, a) => $32((v2) => $32((v1$2) => variable(
41484
+ state2,
41485
+ $32,
41486
+ $42,
41487
+ (v2$1, $82) => $52($ParseState(v2$1._1, v2$1._2, $72), $82),
41488
+ (state2$1, a$1) => $32((v2$1) => {
41489
+ const $82 = delim("(");
41490
+ return $32((v1$3) => $82(
41491
+ state2$1,
41492
+ $32,
41493
+ $42,
41494
+ (v2$2, $9) => $52($ParseState(v2$2._1, v2$2._2, $72), $9),
41495
+ (state2$2, a$2) => $32((v2$2) => {
41496
+ const $9 = sepBy1(pattern)(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
41497
+ return $32((v1$4) => $9(
41498
+ state2$2,
41499
+ $32,
41500
+ $42,
41501
+ (v2$3, $10) => $52($ParseState(v2$3._1, v2$3._2, $72), $10),
41502
+ (state2$3, a$3) => $32((v2$3) => {
41503
+ const $10 = delim(")");
41504
+ return $32((v1$5) => $10(
41505
+ state2$3,
41506
+ $32,
41507
+ $42,
41508
+ (v2$4, $11) => $52($ParseState(v2$4._1, v2$4._2, $72), $11),
41509
+ (state2$4, a$4) => $32((v2$4) => {
41510
+ const $11 = delim(":");
41511
+ return $32((v1$6) => $11(
41512
+ state2$4,
41513
+ $32,
41514
+ $42,
41515
+ (v2$5, $12) => $52($ParseState(v2$5._1, v2$5._2, $72), $12),
41516
+ (state2$5, a$5) => $32((v2$5) => $32((v1$7) => opTree$lazy()(
41517
+ state2$5,
41518
+ $32,
41519
+ $42,
41520
+ (v2$6, $12) => $52($ParseState(v2$6._1, v2$6._2, $72), $12),
41521
+ (state2$6, a$6) => $32((v2$6) => {
41522
+ const $12 = delim(";");
41523
+ return $32((v1$8) => $12(
41524
+ state2$6,
41525
+ $32,
41526
+ $42,
41527
+ (v2$7, $13) => $52($ParseState(v2$7._1, v2$7._2, $72), $13),
41528
+ (state2$7, a$7) => $32((v2$7) => $62(state2$7, $Tuple(a$1, $Tuple(a$3, a$6))))
41529
+ ));
41530
+ })
41531
+ )))
41532
+ ));
41533
+ })
41534
+ ));
41535
+ })
41536
+ ));
41537
+ })
41538
+ ));
41539
+ })
41540
+ )))
41541
+ ));
41542
+ };
41543
+ const $3 = context("letRecExpr")((state1, more, lift12, $$throw2, done) => more((v1) => recDef(
41544
+ state1,
41545
+ more,
41546
+ lift12,
41547
+ $$throw2,
41548
+ (state2, a) => more((v2) => {
41549
+ const $32 = manyRec2(recDef);
41550
+ return more((v1$1) => $32(
41551
+ state2,
41552
+ more,
41553
+ lift12,
41554
+ $$throw2,
41555
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
41556
+ state2$1,
41557
+ more,
41558
+ lift12,
41559
+ $$throw2,
41560
+ (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("LetRec", nonEmptyListNonEmptyList.nonEmpty($List("Cons", a, a$1)), a$2)))
41561
+ )))
41562
+ ));
41563
+ })
41564
+ )));
41565
+ const $4 = context("matrix")((state1, more, lift12, $$throw2, done) => more((v1) => {
41566
+ const $42 = state1._3;
41413
41567
  return lexeme(string3("[|"))(
41414
41568
  state1,
41415
41569
  more,
41416
41570
  lift12,
41417
- (v2, $12) => $$throw2($ParseState(v2._1, v2._2, $04), $12),
41571
+ (v2, $52) => $$throw2($ParseState(v2._1, v2._2, $42), $52),
41418
41572
  (state2, a) => more((v2) => more((v1$1) => opTree$lazy()(
41419
41573
  state2,
41420
41574
  more,
41421
41575
  lift12,
41422
41576
  $$throw2,
41423
41577
  (state2$1, a$1) => more((v2$1) => {
41424
- const $12 = reserved("for");
41425
- return more((v1$2) => $12(
41578
+ const $52 = reserved("for");
41579
+ return more((v1$2) => $52(
41426
41580
  state2$1,
41427
41581
  more,
41428
41582
  lift12,
41429
41583
  $$throw2,
41430
41584
  (state2$2, a$2) => more((v2$2) => {
41431
- const $22 = delim("(");
41432
- return more((v1$3) => $22(
41585
+ const $62 = delim("(");
41586
+ return more((v1$3) => $62(
41433
41587
  state2$2,
41434
41588
  more,
41435
41589
  lift12,
@@ -41440,8 +41594,8 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41440
41594
  lift12,
41441
41595
  $$throw2,
41442
41596
  (state2$4, a$4) => more((v2$4) => {
41443
- const $32 = delim(",");
41444
- return more((v1$5) => $32(
41597
+ const $72 = delim(",");
41598
+ return more((v1$5) => $72(
41445
41599
  state2$4,
41446
41600
  more,
41447
41601
  lift12,
@@ -41452,15 +41606,15 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41452
41606
  lift12,
41453
41607
  $$throw2,
41454
41608
  (state2$6, a$6) => more((v2$6) => {
41455
- const $42 = delim(")");
41456
- return more((v1$7) => $42(
41609
+ const $82 = delim(")");
41610
+ return more((v1$7) => $82(
41457
41611
  state2$6,
41458
41612
  more,
41459
41613
  lift12,
41460
41614
  $$throw2,
41461
41615
  (state2$7, a$7) => more((v2$7) => {
41462
- const $52 = reserved("in");
41463
- return more((v1$8) => $52(
41616
+ const $9 = reserved("in");
41617
+ return more((v1$8) => $9(
41464
41618
  state2$7,
41465
41619
  more,
41466
41620
  lift12,
@@ -41493,98 +41647,98 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41493
41647
  )))
41494
41648
  );
41495
41649
  }));
41496
- const $1 = context("listExpr")((() => {
41497
- const $12 = delim("[");
41498
- return (state1, more, lift12, $$throw2, done) => more((v1) => $12(
41650
+ const $5 = context("listExpr")((() => {
41651
+ const $52 = delim("[");
41652
+ return (state1, more, lift12, $$throw2, done) => more((v1) => $52(
41499
41653
  state1,
41500
41654
  more,
41501
41655
  lift12,
41502
41656
  $$throw2,
41503
41657
  (state2, a) => more((v2) => {
41504
- const $22 = optionMaybe((v1$1, $23, $32, $42, $52) => {
41505
- const $62 = v1$1._3;
41506
- return opTree$lazy()(v1$1, $23, $32, (v2$1, $72) => $42($ParseState(v2$1._1, v2$1._2, $62), $72), $52);
41658
+ const $62 = optionMaybe((v1$1, $63, $72, $82, $9) => {
41659
+ const $10 = v1$1._3;
41660
+ return opTree$lazy()(v1$1, $63, $72, (v2$1, $11) => $82($ParseState(v2$1._1, v2$1._2, $10), $11), $9);
41507
41661
  });
41508
- return more((v1$1) => $22(
41662
+ return more((v1$1) => $62(
41509
41663
  state2,
41510
41664
  more,
41511
41665
  lift12,
41512
41666
  $$throw2,
41513
41667
  (state2$1, a$1) => more((v2$1) => {
41514
41668
  if (a$1.tag === "Nothing") {
41515
- const $32 = delim("]");
41516
- return more((v1$2) => $32(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListEmpty", void 0)))));
41669
+ const $72 = delim("]");
41670
+ return more((v1$2) => $72(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListEmpty", void 0)))));
41517
41671
  }
41518
41672
  if (a$1.tag === "Just") {
41519
- const $32 = a$1._1;
41520
- const $42 = context("listEnum")((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => {
41521
- const $43 = state1$1._3;
41673
+ const $72 = a$1._1;
41674
+ const $82 = context("listEnum")((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => {
41675
+ const $83 = state1$1._3;
41522
41676
  return lexeme(string3(".."))(
41523
41677
  state1$1,
41524
41678
  more$1,
41525
41679
  lift1$1,
41526
- (v2$2, $53) => throw$1($ParseState(v2$2._1, v2$2._2, $43), $53),
41680
+ (v2$2, $92) => throw$1($ParseState(v2$2._1, v2$2._2, $83), $92),
41527
41681
  (state2$2, a$2) => more$1((v2$2) => more$1((v1$3) => opTree$lazy()(
41528
41682
  state2$2,
41529
41683
  more$1,
41530
41684
  lift1$1,
41531
41685
  throw$1,
41532
41686
  (state2$3, a$3) => more$1((v2$3) => {
41533
- const $53 = delim("]");
41534
- 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)))));
41687
+ const $92 = delim("]");
41688
+ 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)))));
41535
41689
  })
41536
41690
  )))
41537
41691
  );
41538
41692
  }));
41539
- const $52 = context("listComp")((() => {
41540
- const $53 = many1((() => {
41541
- const $54 = reserved("if");
41542
- const $63 = reserved("for");
41543
- return (v2$2, $73, $82, $9, $10) => {
41544
- const $11 = v2$2._1;
41545
- const $122 = v2$2._2;
41546
- return $73((v3) => {
41547
- const $13 = (v4, $132) => {
41548
- const $14 = v4._3;
41549
- return $73((v5) => {
41550
- if ($14) {
41551
- return $9(v4, $132);
41693
+ const $9 = context("listComp")((() => {
41694
+ const $92 = many1((() => {
41695
+ const $93 = reserved("if");
41696
+ const $102 = reserved("for");
41697
+ return (v2$2, $112, $12, $13, $14) => {
41698
+ const $15 = v2$2._1;
41699
+ const $16 = v2$2._2;
41700
+ return $112((v3) => {
41701
+ const $17 = (v4, $172) => {
41702
+ const $18 = v4._3;
41703
+ return $112((v5) => {
41704
+ if ($18) {
41705
+ return $13(v4, $172);
41552
41706
  }
41553
- return $73((v1$2) => {
41554
- const $15 = v2$2._3;
41555
- return $63(
41707
+ return $112((v1$2) => {
41708
+ const $19 = v2$2._3;
41709
+ return $102(
41556
41710
  v2$2,
41557
- $73,
41558
- $82,
41559
- (v2$3, $16) => $9($ParseState(v2$3._1, v2$3._2, $15), $16),
41560
- (state2$2, a$2) => $73((v2$3) => $73((v1$3) => pattern(
41711
+ $112,
41712
+ $12,
41713
+ (v2$3, $20) => $13($ParseState(v2$3._1, v2$3._2, $19), $20),
41714
+ (state2$2, a$2) => $112((v2$3) => $112((v1$3) => pattern(
41561
41715
  state2$2,
41562
- $73,
41563
- $82,
41564
- $9,
41565
- (state2$3, a$3) => $73((v2$4) => {
41566
- const $16 = reserved("in");
41567
- return $73((v1$4) => $16(
41716
+ $112,
41717
+ $12,
41718
+ $13,
41719
+ (state2$3, a$3) => $112((v2$4) => {
41720
+ const $20 = reserved("in");
41721
+ return $112((v1$4) => $20(
41568
41722
  state2$3,
41569
- $73,
41570
- $82,
41571
- $9,
41572
- (state2$4, a$4) => $73((v2$5) => {
41573
- const $17 = brackets(opTree$lazy());
41574
- const $18 = state2$4._1;
41575
- const $19 = state2$4._2;
41576
- return $73((v3$1) => $73((v1$5) => $17(
41577
- $ParseState($18, $19, false),
41578
- $73,
41579
- $82,
41580
- (v2$6, $20) => $73((v5$1) => $73((v1$6) => opTree$lazy()(
41723
+ $112,
41724
+ $12,
41725
+ $13,
41726
+ (state2$4, a$4) => $112((v2$5) => {
41727
+ const $21 = brackets(opTree$lazy());
41728
+ const $22 = state2$4._1;
41729
+ const $23 = state2$4._2;
41730
+ return $112((v3$1) => $112((v1$5) => $21(
41731
+ $ParseState($22, $23, false),
41732
+ $112,
41733
+ $12,
41734
+ (v2$6, $24) => $112((v5$1) => $112((v1$6) => opTree$lazy()(
41581
41735
  state2$4,
41582
- $73,
41583
- $82,
41584
- $9,
41585
- (state2$5, a$5) => $73((v2$7) => $10(state2$5, $Qualifier("ListCompGen", a$3, a$5)))
41736
+ $112,
41737
+ $12,
41738
+ $13,
41739
+ (state2$5, a$5) => $112((v2$7) => $14(state2$5, $Qualifier("ListCompGen", a$3, a$5)))
41586
41740
  ))),
41587
- (state2$5, a$5) => $73((v2$6) => $10(state2$5, $Qualifier("ListCompDecl", $VarDef2(a$3, a$5))))
41741
+ (state2$5, a$5) => $112((v2$6) => $14(state2$5, $Qualifier("ListCompDecl", $VarDef2(a$3, a$5))))
41588
41742
  )));
41589
41743
  })
41590
41744
  ));
@@ -41594,111 +41748,111 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41594
41748
  });
41595
41749
  });
41596
41750
  };
41597
- return $73((v1$2) => $54(
41598
- $ParseState($11, $122, false),
41599
- $73,
41600
- $82,
41601
- (v2$3, $14) => $13($ParseState(v2$3._1, v2$3._2, false), $14),
41602
- (state2$2, a$2) => $73((v2$3) => $73((v1$3) => opTree$lazy()(
41751
+ return $112((v1$2) => $93(
41752
+ $ParseState($15, $16, false),
41753
+ $112,
41754
+ $12,
41755
+ (v2$3, $18) => $17($ParseState(v2$3._1, v2$3._2, false), $18),
41756
+ (state2$2, a$2) => $112((v2$3) => $112((v1$3) => opTree$lazy()(
41603
41757
  state2$2,
41604
- $73,
41605
- $82,
41606
- $13,
41607
- (state2$3, a$3) => $73((v2$4) => $10(state2$3, $Qualifier("ListCompGuard", a$3)))
41758
+ $112,
41759
+ $12,
41760
+ $17,
41761
+ (state2$3, a$3) => $112((v2$4) => $14(state2$3, $Qualifier("ListCompGuard", a$3)))
41608
41762
  )))
41609
41763
  ));
41610
41764
  });
41611
41765
  };
41612
41766
  })());
41613
- return (state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => $53(
41767
+ return (state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$2) => $92(
41614
41768
  state1$1,
41615
41769
  more$1,
41616
41770
  lift1$1,
41617
41771
  throw$1,
41618
41772
  (state2$2, a$2) => more$1((v2$2) => {
41619
- const $63 = delim("]");
41620
- return more$1((v1$3) => $63(
41773
+ const $102 = delim("]");
41774
+ return more$1((v1$3) => $102(
41621
41775
  state2$2,
41622
41776
  more$1,
41623
41777
  lift1$1,
41624
41778
  throw$1,
41625
- (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))))
41779
+ (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))))
41626
41780
  ));
41627
41781
  })
41628
41782
  ));
41629
41783
  })());
41630
41784
  const listRest$lazy = binding(() => {
41631
- const $63 = delim("]");
41632
- const $73 = delim(",");
41633
- return (v2$2, $82, $9, $10, $11) => {
41634
- const $122 = v2$2._1;
41635
- const $13 = v2$2._2;
41636
- return $82((v3) => $82((v1$2) => $63(
41637
- $ParseState($122, $13, false),
41638
- $82,
41639
- $9,
41640
- (v4, $14) => {
41641
- const $15 = v4._3;
41642
- return $82((v5) => {
41643
- if ($15) {
41644
- return $10(v4, $14);
41785
+ const $102 = delim("]");
41786
+ const $112 = delim(",");
41787
+ return (v2$2, $12, $13, $14, $15) => {
41788
+ const $16 = v2$2._1;
41789
+ const $17 = v2$2._2;
41790
+ return $12((v3) => $12((v1$2) => $102(
41791
+ $ParseState($16, $17, false),
41792
+ $12,
41793
+ $13,
41794
+ (v4, $18) => {
41795
+ const $19 = v4._3;
41796
+ return $12((v5) => {
41797
+ if ($19) {
41798
+ return $14(v4, $18);
41645
41799
  }
41646
- return $82((v1$3) => $73(
41800
+ return $12((v1$3) => $112(
41647
41801
  v2$2,
41648
- $82,
41649
- $9,
41650
- $10,
41651
- (state2$2, a$2) => $82((v2$3) => $82((v1$4) => opTree$lazy()(
41802
+ $12,
41803
+ $13,
41804
+ $14,
41805
+ (state2$2, a$2) => $12((v2$3) => $12((v1$4) => opTree$lazy()(
41652
41806
  state2$2,
41653
- $82,
41654
- $9,
41655
- $10,
41656
- (state2$3, a$3) => $82((v2$4) => $82((v1$5) => listRest$lazy()(
41807
+ $12,
41808
+ $13,
41809
+ $14,
41810
+ (state2$3, a$3) => $12((v2$4) => $12((v1$5) => listRest$lazy()(
41657
41811
  state2$3,
41658
- $82,
41659
- $9,
41660
- $10,
41661
- (state2$4, a$4) => $82((v2$5) => $11(state2$4, $ListRest("Next", void 0, a$3, a$4)))
41812
+ $12,
41813
+ $13,
41814
+ $14,
41815
+ (state2$4, a$4) => $12((v2$5) => $15(state2$4, $ListRest("Next", void 0, a$3, a$4)))
41662
41816
  )))
41663
41817
  )))
41664
41818
  ));
41665
41819
  });
41666
41820
  },
41667
- (state2$2, a$2) => $82((v2$3) => $11(state2$2, $ListRest("End", void 0)))
41821
+ (state2$2, a$2) => $12((v2$3) => $15(state2$2, $ListRest("End", void 0)))
41668
41822
  )));
41669
41823
  };
41670
41824
  });
41671
41825
  const listRest = listRest$lazy();
41672
- const $62 = state2$1._1;
41673
- const $72 = state2$1._2;
41674
- return more((v3) => $42(
41675
- $ParseState($62, $72, false),
41826
+ const $10 = state2$1._1;
41827
+ const $11 = state2$1._2;
41828
+ return more((v3) => $82(
41829
+ $ParseState($10, $11, false),
41676
41830
  more,
41677
41831
  lift12,
41678
- (v4, $82) => {
41679
- const $9 = v4._3;
41832
+ (v4, $12) => {
41833
+ const $13 = v4._3;
41680
41834
  return more((v5) => {
41681
- if ($9) {
41682
- return $$throw2(v4, $82);
41835
+ if ($13) {
41836
+ return $$throw2(v4, $12);
41683
41837
  }
41684
- const $10 = state2$1._1;
41685
- const $11 = state2$1._2;
41686
- return more((v3$1) => $52(
41687
- $ParseState($10, $11, false),
41838
+ const $14 = state2$1._1;
41839
+ const $15 = state2$1._2;
41840
+ return more((v3$1) => $9(
41841
+ $ParseState($14, $15, false),
41688
41842
  more,
41689
41843
  lift12,
41690
- (v4$1, $122) => {
41691
- const $13 = v4$1._3;
41844
+ (v4$1, $16) => {
41845
+ const $17 = v4$1._3;
41692
41846
  return more((v5$1) => {
41693
- if ($13) {
41694
- return $$throw2(v4$1, $122);
41847
+ if ($17) {
41848
+ return $$throw2(v4$1, $16);
41695
41849
  }
41696
41850
  return more((v1$2) => listRest(
41697
41851
  state2$1,
41698
41852
  more,
41699
41853
  lift12,
41700
41854
  $$throw2,
41701
- (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListNonEmpty", void 0, $32, a$2)))
41855
+ (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("ListNonEmpty", void 0, $72, a$2)))
41702
41856
  ));
41703
41857
  });
41704
41858
  },
@@ -41715,25 +41869,25 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41715
41869
  })
41716
41870
  ));
41717
41871
  })());
41718
- const $2 = context("lambda")((() => {
41719
- const $22 = reserved("lambda");
41872
+ const $6 = context("lambda")((() => {
41873
+ const $62 = reserved("lambda");
41720
41874
  return (state1, more, lift12, $$throw2, done) => more((v1) => {
41721
- const $32 = state1._3;
41722
- return $22(
41875
+ const $72 = state1._3;
41876
+ return $62(
41723
41877
  state1,
41724
41878
  more,
41725
41879
  lift12,
41726
- (v2, $42) => $$throw2($ParseState(v2._1, v2._2, $32), $42),
41880
+ (v2, $82) => $$throw2($ParseState(v2._1, v2._2, $72), $82),
41727
41881
  (state2, a) => more((v2) => {
41728
- const $42 = sepBy1(pattern)(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
41729
- return more((v1$1) => $42(
41882
+ const $82 = sepBy1(pattern)(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
41883
+ return more((v1$1) => $82(
41730
41884
  state2,
41731
41885
  more,
41732
41886
  lift12,
41733
41887
  $$throw2,
41734
41888
  (state2$1, a$1) => more((v2$1) => {
41735
- const $52 = delim(":");
41736
- return more((v1$2) => $52(
41889
+ const $9 = delim(":");
41890
+ return more((v1$2) => $9(
41737
41891
  state2$1,
41738
41892
  more,
41739
41893
  lift12,
@@ -41755,516 +41909,558 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
41755
41909
  );
41756
41910
  });
41757
41911
  })());
41758
- const $3 = delim("[");
41759
- const $4 = VarKey();
41760
- const $5 = context("dict")((() => {
41761
- const $52 = delim("{");
41762
- return (state1, more, lift12, $$throw2, done) => more((v1) => $52(
41763
- state1,
41764
- more,
41765
- lift12,
41766
- $$throw2,
41767
- (state2, a) => more((v2) => {
41768
- const $62 = sepBy((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$1) => {
41769
- const $63 = (state2$1, a$1) => more$1((v2$1) => {
41770
- const $64 = lexeme(withErrorMessage(satisfy((v) => v === ":"))("':'"));
41771
- return more$1((v1$2) => $64(
41772
- state2$1,
41773
- more$1,
41774
- lift1$1,
41775
- throw$1,
41776
- (state2$2, a$2) => more$1((v2$2) => more$1((v1$3) => opTree$lazy()(
41777
- state2$2,
41912
+ const $7 = delim("[");
41913
+ const $8 = (() => {
41914
+ const $82 = VarKey();
41915
+ const $9 = context("dict")((() => {
41916
+ const $92 = delim("{");
41917
+ return (state1, more, lift12, $$throw2, done) => more((v1) => $92(
41918
+ state1,
41919
+ more,
41920
+ lift12,
41921
+ $$throw2,
41922
+ (state2, a) => more((v2) => {
41923
+ const $102 = sepBy((state1$1, more$1, lift1$1, throw$1, done$1) => more$1((v1$1) => {
41924
+ const $103 = (state2$1, a$1) => more$1((v2$1) => {
41925
+ const $104 = lexeme(withErrorMessage(satisfy((v) => v === ":"))("':'"));
41926
+ return more$1((v1$2) => $104(
41927
+ state2$1,
41778
41928
  more$1,
41779
41929
  lift1$1,
41780
41930
  throw$1,
41781
- (state2$3, a$3) => more$1((v2$3) => done$1(state2$3, $Tuple(a$1, a$3)))
41782
- )))
41783
- ));
41784
- });
41785
- const $72 = state1$1._1;
41786
- const $82 = state1$1._2;
41787
- return more$1((v3) => {
41788
- const $9 = (v4, $92) => {
41789
- const $10 = v4._3;
41790
- return more$1((v5) => {
41791
- if ($10) {
41792
- return throw$1(v4, $92);
41793
- }
41794
- 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)))));
41795
- });
41796
- };
41797
- return more$1((v1$2) => $3(
41798
- $ParseState($72, $82, false),
41799
- more$1,
41800
- lift1$1,
41801
- $9,
41802
- (state2$1, a$1) => more$1((v2$1) => more$1((v1$3) => opTree$lazy()(
41803
- state2$1,
41931
+ (state2$2, a$2) => more$1((v2$2) => more$1((v1$3) => expr$lazy()(
41932
+ state2$2,
41933
+ more$1,
41934
+ lift1$1,
41935
+ throw$1,
41936
+ (state2$3, a$3) => more$1((v2$3) => done$1(state2$3, $Tuple(a$1, a$3)))
41937
+ )))
41938
+ ));
41939
+ });
41940
+ const $112 = state1$1._1;
41941
+ const $12 = state1$1._2;
41942
+ return more$1((v3) => {
41943
+ const $13 = (v4, $132) => {
41944
+ const $14 = v4._3;
41945
+ return more$1((v5) => {
41946
+ if ($14) {
41947
+ return throw$1(v4, $132);
41948
+ }
41949
+ 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)))));
41950
+ });
41951
+ };
41952
+ return more$1((v1$2) => $7(
41953
+ $ParseState($112, $12, false),
41804
41954
  more$1,
41805
41955
  lift1$1,
41806
- $9,
41807
- (state2$2, a$2) => more$1((v2$2) => {
41808
- const $10 = delim("]");
41809
- 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)))));
41810
- })
41811
- )))
41812
- ));
41813
- });
41814
- }))(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
41815
- return more((v1$1) => $62(
41816
- state2,
41817
- more,
41818
- lift12,
41819
- $$throw2,
41820
- (state2$1, a$1) => more((v2$1) => more((v1$2) => whitespace(
41821
- state2$1,
41956
+ $13,
41957
+ (state2$1, a$1) => more$1((v2$1) => more$1((v1$3) => opTree$lazy()(
41958
+ state2$1,
41959
+ more$1,
41960
+ lift1$1,
41961
+ $13,
41962
+ (state2$2, a$2) => more$1((v2$2) => {
41963
+ const $14 = delim("]");
41964
+ 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)))));
41965
+ })
41966
+ )))
41967
+ ));
41968
+ });
41969
+ }))(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
41970
+ return more((v1$1) => $102(
41971
+ state2,
41822
41972
  more,
41823
41973
  lift12,
41824
41974
  $$throw2,
41825
- (state2$2, a$2) => more((v2$2) => {
41826
- const $72 = delim("}");
41827
- 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)))));
41828
- })
41829
- )))
41830
- ));
41831
- })
41832
- ));
41833
- })());
41834
- const $6 = Float();
41835
- const $7 = Int();
41836
- const $8 = (() => {
41837
- const $82 = some(alternativeParserT)(lazyParserT)(satisfy((c) => c !== '"' && c !== "$" && !isSpace(toCharCode(c))));
41838
- const $9 = (() => {
41839
- const $92 = delim("$");
41840
- const $10 = (() => {
41841
- const $102 = Str();
41842
- const $11 = context("pair")((() => {
41843
- const $112 = delim("(");
41844
- return (state1, more, lift12, $$throw2, done) => more((v1) => {
41845
- const $122 = state1._3;
41846
- return more((v1$1) => $112(
41847
- state1,
41975
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => whitespace(
41976
+ state2$1,
41848
41977
  more,
41849
41978
  lift12,
41850
- (v2, $132) => $$throw2($ParseState(v2._1, v2._2, $122), $132),
41851
- (state2, a) => more((v2) => more((v1$2) => opTree$lazy()(
41852
- state2,
41853
- more,
41854
- lift12,
41855
- (v2$1, $132) => $$throw2($ParseState(v2$1._1, v2$1._2, $122), $132),
41856
- (state2$1, a$1) => more((v2$1) => {
41857
- const $132 = delim(",");
41858
- return more((v1$3) => $132(
41859
- state2$1,
41979
+ $$throw2,
41980
+ (state2$2, a$2) => more((v2$2) => {
41981
+ const $112 = delim("}");
41982
+ 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)))));
41983
+ })
41984
+ )))
41985
+ ));
41986
+ })
41987
+ ));
41988
+ })());
41989
+ const $10 = Float();
41990
+ const $11 = (() => {
41991
+ const $112 = Int();
41992
+ const $12 = (() => {
41993
+ const $122 = some(alternativeParserT)(lazyParserT)(satisfy((c) => c !== '"' && c !== "$" && !isSpace(toCharCode(c))));
41994
+ const $13 = (() => {
41995
+ const $132 = delim("$");
41996
+ const $14 = (() => {
41997
+ const $142 = Str();
41998
+ const $15 = context("pair")((() => {
41999
+ const $152 = delim("(");
42000
+ return (state1, more, lift12, $$throw2, done) => more((v1) => {
42001
+ const $162 = state1._3;
42002
+ return more((v1$1) => $152(
42003
+ state1,
42004
+ more,
42005
+ lift12,
42006
+ (v2, $172) => $$throw2($ParseState(v2._1, v2._2, $162), $172),
42007
+ (state2, a) => more((v2) => more((v1$2) => opTree$lazy()(
42008
+ state2,
41860
42009
  more,
41861
42010
  lift12,
41862
- (v2$2, $14) => $$throw2($ParseState(v2$2._1, v2$2._2, $122), $14),
41863
- (state2$2, a$2) => more((v2$2) => more((v2$3) => more((v1$4) => opTree$lazy()(
41864
- state2$2,
41865
- more,
41866
- lift12,
41867
- $$throw2,
41868
- (state2$3, a$3) => more((v2$4) => {
41869
- const $14 = delim(")");
41870
- return more((v1$5) => $14(
41871
- state2$3,
42011
+ (v2$1, $172) => $$throw2($ParseState(v2$1._1, v2$1._2, $162), $172),
42012
+ (state2$1, a$1) => more((v2$1) => {
42013
+ const $172 = delim(",");
42014
+ return more((v1$3) => $172(
42015
+ state2$1,
42016
+ more,
42017
+ lift12,
42018
+ (v2$2, $18) => $$throw2($ParseState(v2$2._1, v2$2._2, $162), $18),
42019
+ (state2$2, a$2) => more((v2$2) => more((v2$3) => more((v1$4) => opTree$lazy()(
42020
+ state2$2,
41872
42021
  more,
41873
42022
  lift12,
41874
42023
  $$throw2,
41875
- (state2$4, a$4) => more((v2$5) => done(
41876
- state2$4,
41877
- $Expr2("Constr", void 0, "Pair", $List("Cons", a$1, $List("Cons", a$3, Nil)))
41878
- ))
41879
- ));
41880
- })
41881
- ))))
41882
- ));
41883
- })
41884
- )))
41885
- ));
41886
- });
41887
- })());
41888
- const args = (e) => {
41889
- const $122 = delim("(");
41890
- return (state1, more, lift12, $$throw2, done) => more((v1) => {
41891
- const $132 = state1._3;
41892
- return more((v1$1) => $122(
41893
- state1,
41894
- more,
41895
- lift12,
41896
- (v2, $14) => $$throw2($ParseState(v2._1, v2._2, $132), $14),
41897
- (state2, a) => more((v2) => sameLine(
41898
- state2,
41899
- more,
41900
- lift12,
41901
- (v2$1, $14) => $$throw2($ParseState(v2$1._1, v2$1._2, $132), $14),
41902
- (state2$1, a$1) => more((v2$1) => {
41903
- const $14 = sepBy(opTree$lazy())(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
41904
- return more((v1$2) => $14(
41905
- state2$1,
42024
+ (state2$3, a$3) => more((v2$4) => {
42025
+ const $18 = delim(")");
42026
+ return more((v1$5) => $18(
42027
+ state2$3,
42028
+ more,
42029
+ lift12,
42030
+ $$throw2,
42031
+ (state2$4, a$4) => more((v2$5) => done(
42032
+ state2$4,
42033
+ $Expr2("Constr", void 0, "Pair", $List("Cons", a$1, $List("Cons", a$3, Nil)))
42034
+ ))
42035
+ ));
42036
+ })
42037
+ ))))
42038
+ ));
42039
+ })
42040
+ )))
42041
+ ));
42042
+ });
42043
+ })());
42044
+ const args = (e) => {
42045
+ const $162 = delim("(");
42046
+ return (state1, more, lift12, $$throw2, done) => more((v1) => {
42047
+ const $172 = state1._3;
42048
+ return more((v1$1) => $162(
42049
+ state1,
42050
+ more,
42051
+ lift12,
42052
+ (v2, $18) => $$throw2($ParseState(v2._1, v2._2, $172), $18),
42053
+ (state2, a) => more((v2) => sameLine(
42054
+ state2,
41906
42055
  more,
41907
42056
  lift12,
41908
- $$throw2,
41909
- (state2$2, a$2) => more((v2$2) => {
41910
- const $15 = delim(")");
41911
- return more((v1$3) => $15(
41912
- state2$2,
42057
+ (v2$1, $18) => $$throw2($ParseState(v2$1._1, v2$1._2, $172), $18),
42058
+ (state2$1, a$1) => more((v2$1) => {
42059
+ const $18 = sepBy(opTree$lazy())(lexeme(withErrorMessage(satisfy((v) => v === ","))("','")));
42060
+ return more((v1$2) => $18(
42061
+ state2$1,
41913
42062
  more,
41914
42063
  lift12,
41915
42064
  $$throw2,
41916
- (state2$3, a$3) => more((v2$3) => {
41917
- if (e.tag === "Constr") {
41918
- return app($Expr2(
41919
- "Constr",
41920
- e._1,
41921
- e._2,
41922
- foldableList.foldr(Cons)(foldableList.foldr(Cons)(Nil)(a$2))(e._3)
41923
- ))(state2$3, more, lift12, $$throw2, done);
41924
- }
41925
- return app((() => {
41926
- const go = (go$a0$copy) => (go$a1$copy) => {
41927
- let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
41928
- while (go$c) {
41929
- const b = go$a0, v = go$a1;
41930
- if (v.tag === "Nil") {
41931
- go$c = false;
41932
- go$r = b;
41933
- continue;
41934
- }
41935
- if (v.tag === "Cons") {
41936
- go$a0 = $Expr2("App", b, v._1);
41937
- go$a1 = v._2;
41938
- continue;
41939
- }
41940
- fail();
42065
+ (state2$2, a$2) => more((v2$2) => {
42066
+ const $19 = delim(")");
42067
+ return more((v1$3) => $19(
42068
+ state2$2,
42069
+ more,
42070
+ lift12,
42071
+ $$throw2,
42072
+ (state2$3, a$3) => more((v2$3) => {
42073
+ if (e.tag === "Constr") {
42074
+ return app($Expr2(
42075
+ "Constr",
42076
+ e._1,
42077
+ e._2,
42078
+ foldableList.foldr(Cons)(foldableList.foldr(Cons)(Nil)(a$2))(e._3)
42079
+ ))(state2$3, more, lift12, $$throw2, done);
41941
42080
  }
41942
- return go$r;
41943
- };
41944
- return go(e)(a$2);
41945
- })())(state2$3, more, lift12, $$throw2, done);
42081
+ return app((() => {
42082
+ const go = (go$a0$copy) => (go$a1$copy) => {
42083
+ let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
42084
+ while (go$c) {
42085
+ const b = go$a0, v = go$a1;
42086
+ if (v.tag === "Nil") {
42087
+ go$c = false;
42088
+ go$r = b;
42089
+ continue;
42090
+ }
42091
+ if (v.tag === "Cons") {
42092
+ go$a0 = $Expr2("App", b, v._1);
42093
+ go$a1 = v._2;
42094
+ continue;
42095
+ }
42096
+ fail();
42097
+ }
42098
+ return go$r;
42099
+ };
42100
+ return go(e)(a$2);
42101
+ })())(state2$3, more, lift12, $$throw2, done);
42102
+ })
42103
+ ));
41946
42104
  })
41947
42105
  ));
41948
42106
  })
41949
- ));
41950
- })
41951
- ))
41952
- ));
41953
- });
41954
- };
41955
- const app = (e) => {
41956
- const $122 = args(e);
41957
- return (v2, $132, $14, $15, $16) => {
41958
- const $17 = v2._1;
41959
- const $18 = v2._2;
41960
- return $132((v3) => {
41961
- const $19 = (v4, $192) => {
41962
- const $20 = v4._3;
41963
- return $132((v5) => {
41964
- if ($20) {
41965
- return $15(v4, $192);
41966
- }
41967
- return $16(v2, e);
41968
- });
41969
- };
41970
- return $132((v2$1) => $132((v1) => sameLine(
41971
- $ParseState($17, $18, false),
41972
- $132,
41973
- $14,
41974
- $19,
41975
- (state2, a) => $132((v2$2) => $132((v3$1) => $122(state2, $132, $14, $19, (state3, a$1) => $132((v4) => $16(state3, a$1)))))
41976
- )));
41977
- });
41978
- };
41979
- };
41980
- const $12 = context("app chain")(withPos((() => {
41981
- const $122 = Constr2();
41982
- const $132 = context("parens op")((() => {
41983
- const $133 = delim("(");
41984
- return (state1, more, lift12, $$throw2, done) => more((v1) => $133(
41985
- state1,
41986
- more,
41987
- lift12,
41988
- $$throw2,
41989
- (state2, a) => more((v2) => more((v1$1) => operator2(
41990
- state2,
41991
- more,
41992
- lift12,
41993
- $$throw2,
41994
- (state2$1, a$1) => more((v2$1) => {
41995
- const $14 = delim(")");
41996
- return more((v1$2) => $14(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("Op", a$1)))));
41997
- })
41998
- )))
41999
- ));
42000
- })());
42001
- return (state1, more, lift12, $$throw2, done) => more((v1) => {
42002
- const $14 = state1._1;
42003
- const $15 = state1._2;
42004
- return more((v3) => more((v1$1) => variable(
42005
- $ParseState($14, $15, false),
42006
- more,
42007
- lift12,
42008
- (v4, $16) => {
42009
- const $17 = v4._3;
42010
- return more((v5) => {
42011
- if ($17) {
42012
- return $$throw2(v4, $16);
42013
- }
42014
- const $18 = state1._1;
42015
- const $19 = state1._2;
42016
- return more((v3$1) => more((v1$2) => constructor(
42017
- $ParseState($18, $19, false),
42018
- more,
42019
- lift12,
42020
- (v4$1, $20) => {
42021
- const $21 = v4$1._3;
42022
- return more((v5$1) => {
42023
- if ($21) {
42024
- return $$throw2(v4$1, $20);
42025
- }
42026
- const $22 = state1._1;
42027
- const $23 = state1._2;
42028
- return more((v3$2) => parensExpr(
42029
- $ParseState($22, $23, false),
42030
- more,
42031
- lift12,
42032
- (v2, $24) => more((v5$2) => {
42033
- const $25 = state1._3;
42034
- return $132(
42035
- state1,
42036
- more,
42037
- lift12,
42038
- (v2$1, $26) => $$throw2($ParseState(v2$1._1, v2$1._2, $25), $26),
42039
- (state2, a) => more((v2$1) => app(a)(state2, more, lift12, $$throw2, done))
42040
- );
42041
- }),
42042
- (state2, a) => more((v2) => app(a)(state2, more, lift12, $$throw2, done))
42043
- ));
42044
- });
42045
- },
42046
- (state2, a) => more((v2) => {
42047
- const $20 = $122(a)(Nil);
42048
- return more((v2$1) => app($20)(state2, more, lift12, $$throw2, done));
42049
- })
42107
+ ))
42108
+ ));
42109
+ });
42110
+ };
42111
+ const app = (e) => {
42112
+ const $162 = args(e);
42113
+ return (v2, $172, $18, $19, $20) => {
42114
+ const $21 = v2._1;
42115
+ const $22 = v2._2;
42116
+ return $172((v3) => {
42117
+ const $23 = (v4, $232) => {
42118
+ const $24 = v4._3;
42119
+ return $172((v5) => {
42120
+ if ($24) {
42121
+ return $19(v4, $232);
42122
+ }
42123
+ return $20(v2, e);
42124
+ });
42125
+ };
42126
+ return $172((v2$1) => $172((v1) => sameLine(
42127
+ $ParseState($21, $22, false),
42128
+ $172,
42129
+ $18,
42130
+ $23,
42131
+ (state2, a) => $172((v2$2) => $172((v3$1) => $162(state2, $172, $18, $23, (state3, a$1) => $172((v4) => $20(state3, a$1)))))
42050
42132
  )));
42051
42133
  });
42052
- },
42053
- (state2, a) => more((v2) => more((v2$1) => app($Expr2("Var", a))(state2, more, lift12, $$throw2, done)))
42054
- )));
42055
- });
42056
- })()));
42057
- const $13 = (() => {
42058
- const $132 = withErrorMessage(context("doc expr")((state1, more, lift12, $$throw2, done) => more((v1) => {
42059
- const $133 = state1._3;
42060
- return lexeme(string3("@doc"))(
42061
- state1,
42062
- more,
42063
- lift12,
42064
- (v2, $14) => $$throw2($ParseState(v2._1, v2._2, $133), $14),
42065
- (state2, a) => more((v2) => {
42066
- const $14 = delim("(");
42067
- return more((v1$1) => $14(
42068
- state2,
42134
+ };
42135
+ };
42136
+ const $16 = context("app chain")(withPos((() => {
42137
+ const $162 = Constr2();
42138
+ const $172 = context("parens op")((() => {
42139
+ const $173 = delim("(");
42140
+ return (state1, more, lift12, $$throw2, done) => more((v1) => $173(
42141
+ state1,
42069
42142
  more,
42070
42143
  lift12,
42071
42144
  $$throw2,
42072
- (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
42073
- state2$1,
42145
+ (state2, a) => more((v2) => more((v1$1) => operator2(
42146
+ state2,
42074
42147
  more,
42075
42148
  lift12,
42076
42149
  $$throw2,
42077
- (state2$2, a$2) => more((v2$2) => {
42078
- const $15 = delim(")");
42079
- return more((v1$3) => $15(
42080
- state2$2,
42081
- more,
42082
- lift12,
42083
- $$throw2,
42084
- (state2$3, a$3) => more((v2$3) => more((v1$4) => opTree$lazy()(
42085
- state2$3,
42086
- more,
42087
- lift12,
42088
- $$throw2,
42089
- (state2$4, a$4) => more((v2$4) => done(state2$4, $Expr2("DocExpr", a$2, a$4)))
42090
- )))
42091
- ));
42150
+ (state2$1, a$1) => more((v2$1) => {
42151
+ const $18 = delim(")");
42152
+ return more((v1$2) => $18(state2$1, more, lift12, $$throw2, (state2$2, a$2) => more((v2$2) => done(state2$2, $Expr2("Op", a$1)))));
42092
42153
  })
42093
42154
  )))
42094
42155
  ));
42095
- })
42096
- );
42097
- })))("simple expression");
42098
- return (v2, $14, $15, $16, $17) => {
42099
- const $18 = v2._1;
42100
- const $19 = v2._2;
42101
- return $14((v3) => $14((v3$1) => $14((v1) => $$float(
42102
- $ParseState($18, $19, false),
42103
- $14,
42104
- $15,
42105
- (v2$1, $20) => $14((v5) => $14((v1$1) => integer(
42106
- $ParseState($18, $19, false),
42107
- $14,
42108
- $15,
42109
- (v4, $21) => {
42110
- const $22 = v4._3;
42111
- return $14((v5$1) => {
42112
- if ($22) {
42113
- return $16(v4, $21);
42114
- }
42115
- const $23 = v2._1;
42116
- const $24 = v2._2;
42117
- return $14((v3$2) => {
42118
- const $25 = (v4$1, $252) => {
42119
- const $26 = v4$1._3;
42120
- return $14((v5$2) => {
42121
- if ($26) {
42122
- return $16(v4$1, $252);
42123
- }
42124
- const $27 = v2._1;
42125
- const $28 = v2._2;
42126
- return $14((v3$3) => $14((v1$2) => stringLiteral(
42156
+ })());
42157
+ return (state1, more, lift12, $$throw2, done) => more((v1) => {
42158
+ const $18 = state1._1;
42159
+ const $19 = state1._2;
42160
+ return more((v3) => more((v1$1) => variable(
42161
+ $ParseState($18, $19, false),
42162
+ more,
42163
+ lift12,
42164
+ (v4, $20) => {
42165
+ const $21 = v4._3;
42166
+ return more((v5) => {
42167
+ if ($21) {
42168
+ return $$throw2(v4, $20);
42169
+ }
42170
+ const $22 = state1._1;
42171
+ const $23 = state1._2;
42172
+ return more((v3$1) => more((v1$2) => constructor(
42173
+ $ParseState($22, $23, false),
42174
+ more,
42175
+ lift12,
42176
+ (v4$1, $24) => {
42177
+ const $25 = v4$1._3;
42178
+ return more((v5$1) => {
42179
+ if ($25) {
42180
+ return $$throw2(v4$1, $24);
42181
+ }
42182
+ const $26 = state1._1;
42183
+ const $27 = state1._2;
42184
+ return more((v3$2) => parensExpr(
42185
+ $ParseState($26, $27, false),
42186
+ more,
42187
+ lift12,
42188
+ (v2, $28) => more((v5$2) => {
42189
+ const $29 = state1._3;
42190
+ return $172(
42191
+ state1,
42192
+ more,
42193
+ lift12,
42194
+ (v2$1, $30) => $$throw2($ParseState(v2$1._1, v2$1._2, $29), $30),
42195
+ (state2, a) => more((v2$1) => app(a)(state2, more, lift12, $$throw2, done))
42196
+ );
42197
+ }),
42198
+ (state2, a) => more((v2) => app(a)(state2, more, lift12, $$throw2, done))
42199
+ ));
42200
+ });
42201
+ },
42202
+ (state2, a) => more((v2) => {
42203
+ const $24 = $162(a)(Nil);
42204
+ return more((v2$1) => app($24)(state2, more, lift12, $$throw2, done));
42205
+ })
42206
+ )));
42207
+ });
42208
+ },
42209
+ (state2, a) => more((v2) => more((v2$1) => app($Expr2("Var", a))(state2, more, lift12, $$throw2, done)))
42210
+ )));
42211
+ });
42212
+ })()));
42213
+ const $17 = (() => {
42214
+ const $172 = withErrorMessage(context("doc expr")((state1, more, lift12, $$throw2, done) => more((v1) => {
42215
+ const $173 = state1._3;
42216
+ return lexeme(string3("@doc"))(
42217
+ state1,
42218
+ more,
42219
+ lift12,
42220
+ (v2, $18) => $$throw2($ParseState(v2._1, v2._2, $173), $18),
42221
+ (state2, a) => more((v2) => {
42222
+ const $18 = delim("(");
42223
+ return more((v1$1) => $18(
42224
+ state2,
42225
+ more,
42226
+ lift12,
42227
+ $$throw2,
42228
+ (state2$1, a$1) => more((v2$1) => more((v1$2) => opTree$lazy()(
42229
+ state2$1,
42230
+ more,
42231
+ lift12,
42232
+ $$throw2,
42233
+ (state2$2, a$2) => more((v2$2) => {
42234
+ const $19 = delim(")");
42235
+ return more((v1$3) => $19(
42236
+ state2$2,
42237
+ more,
42238
+ lift12,
42239
+ $$throw2,
42240
+ (state2$3, a$3) => more((v2$3) => more((v1$4) => opTree$lazy()(
42241
+ state2$3,
42242
+ more,
42243
+ lift12,
42244
+ $$throw2,
42245
+ (state2$4, a$4) => more((v2$4) => done(state2$4, $Expr2("DocExpr", a$2, a$4)))
42246
+ )))
42247
+ ));
42248
+ })
42249
+ )))
42250
+ ));
42251
+ })
42252
+ );
42253
+ })))("simple expression");
42254
+ return (v2, $18, $19, $20, $21) => {
42255
+ const $22 = v2._1;
42256
+ const $23 = v2._2;
42257
+ return $18((v3) => $18((v3$1) => $18((v1) => $$float(
42258
+ $ParseState($22, $23, false),
42259
+ $18,
42260
+ $19,
42261
+ (v2$1, $24) => $18((v5) => $18((v1$1) => integer(
42262
+ $ParseState($22, $23, false),
42263
+ $18,
42264
+ $19,
42265
+ (v4, $25) => {
42266
+ const $26 = v4._3;
42267
+ return $18((v5$1) => {
42268
+ if ($26) {
42269
+ return $20(v4, $25);
42270
+ }
42271
+ const $27 = v2._1;
42272
+ const $28 = v2._2;
42273
+ return $18((v3$2) => {
42274
+ const $29 = (v4$1, $292) => {
42275
+ const $30 = v4$1._3;
42276
+ return $18((v5$2) => {
42277
+ if ($30) {
42278
+ return $20(v4$1, $292);
42279
+ }
42280
+ const $31 = v2._1;
42281
+ const $32 = v2._2;
42282
+ return $18((v3$3) => $18((v1$2) => stringLiteral(
42283
+ $ParseState($31, $32, false),
42284
+ $18,
42285
+ $19,
42286
+ (v4$2, $33) => {
42287
+ const $34 = v4$2._3;
42288
+ return $18((v5$3) => {
42289
+ if ($34) {
42290
+ return $20(v4$2, $33);
42291
+ }
42292
+ const $35 = v2._1;
42293
+ const $36 = v2._2;
42294
+ return $18((v3$4) => $15(
42295
+ $ParseState($35, $36, false),
42296
+ $18,
42297
+ $19,
42298
+ (v4$3, $37) => {
42299
+ const $38 = v4$3._3;
42300
+ return $18((v5$4) => {
42301
+ if ($38) {
42302
+ return $20(v4$3, $37);
42303
+ }
42304
+ const $39 = v2._1;
42305
+ const $40 = v2._2;
42306
+ return $18((v3$5) => $16(
42307
+ $ParseState($39, $40, false),
42308
+ $18,
42309
+ $19,
42310
+ (v4$4, $41) => {
42311
+ const $42 = v4$4._3;
42312
+ return $18((v5$5) => {
42313
+ if ($42) {
42314
+ return $20(v4$4, $41);
42315
+ }
42316
+ const $43 = v2._1;
42317
+ const $44 = v2._2;
42318
+ return $18((v3$6) => parensExpr(
42319
+ $ParseState($43, $44, false),
42320
+ $18,
42321
+ $19,
42322
+ (v4$5, $45) => {
42323
+ const $46 = v4$5._3;
42324
+ return $18((v5$6) => {
42325
+ if ($46) {
42326
+ return $20(v4$5, $45);
42327
+ }
42328
+ return $172(v2, $18, $19, $20, $21);
42329
+ });
42330
+ },
42331
+ $21
42332
+ ));
42333
+ });
42334
+ },
42335
+ $21
42336
+ ));
42337
+ });
42338
+ },
42339
+ $21
42340
+ ));
42341
+ });
42342
+ },
42343
+ (state2, a) => $18((v2$2) => $21(state2, $142(a)))
42344
+ )));
42345
+ });
42346
+ };
42347
+ return $18((v1$2) => lexeme(string3('"""'))(
42127
42348
  $ParseState($27, $28, false),
42128
- $14,
42129
- $15,
42130
- (v4$2, $29) => {
42131
- const $30 = v4$2._3;
42132
- return $14((v5$3) => {
42133
- if ($30) {
42134
- return $16(v4$2, $29);
42135
- }
42136
- const $31 = v2._1;
42137
- const $32 = v2._2;
42138
- return $14((v3$4) => $11(
42139
- $ParseState($31, $32, false),
42140
- $14,
42141
- $15,
42142
- (v4$3, $33) => {
42143
- const $34 = v4$3._3;
42144
- return $14((v5$4) => {
42145
- if ($34) {
42146
- return $16(v4$3, $33);
42349
+ $18,
42350
+ $19,
42351
+ (v2$2, $30) => $29($ParseState(v2$2._1, v2$2._2, false), $30),
42352
+ (state2, a) => $18((v2$2) => {
42353
+ const $30 = manyRec2(lexeme((v2$3, $302, $31, $32, $33) => {
42354
+ const $34 = v2$3._1;
42355
+ const $35 = v2$3._2;
42356
+ return $302((v3$3) => $302((v1$3) => $122(
42357
+ $ParseState($34, $35, false),
42358
+ $302,
42359
+ $31,
42360
+ (v4$1, $36) => {
42361
+ const $37 = v4$1._3;
42362
+ return $302((v5$2) => {
42363
+ if ($37) {
42364
+ return $32(v4$1, $36);
42147
42365
  }
42148
- const $35 = v2._1;
42149
- const $36 = v2._2;
42150
- return $14((v3$5) => $12(
42151
- $ParseState($35, $36, false),
42152
- $14,
42153
- $15,
42154
- (v4$4, $37) => {
42155
- const $38 = v4$4._3;
42156
- return $14((v5$5) => {
42157
- if ($38) {
42158
- return $16(v4$4, $37);
42159
- }
42160
- const $39 = v2._1;
42161
- const $40 = v2._2;
42162
- return $14((v3$6) => parensExpr(
42163
- $ParseState($39, $40, false),
42164
- $14,
42165
- $15,
42166
- (v4$5, $41) => {
42167
- const $42 = v4$5._3;
42168
- return $14((v5$6) => {
42169
- if ($42) {
42170
- return $16(v4$5, $41);
42171
- }
42172
- return $132(v2, $14, $15, $16, $17);
42173
- });
42174
- },
42175
- $17
42176
- ));
42177
- });
42178
- },
42179
- $17
42366
+ return $302((v1$4) => $132(
42367
+ v2$3,
42368
+ $302,
42369
+ $31,
42370
+ $32,
42371
+ (state2$1, a$1) => $302((v2$4) => {
42372
+ const $38 = delim("{");
42373
+ return $302((v1$5) => $38(
42374
+ state2$1,
42375
+ $302,
42376
+ $31,
42377
+ $32,
42378
+ (state2$2, a$2) => $302((v2$5) => $302((v1$6) => opTree$lazy()(
42379
+ state2$2,
42380
+ $302,
42381
+ $31,
42382
+ $32,
42383
+ (state2$3, a$3) => $302((v2$6) => {
42384
+ const $39 = delim("}");
42385
+ return $302((v1$7) => $39(
42386
+ state2$3,
42387
+ $302,
42388
+ $31,
42389
+ $32,
42390
+ (state2$4, a$4) => $302((v2$7) => $33(state2$4, $ParagraphElem("Unquote", a$3)))
42391
+ ));
42392
+ })
42393
+ )))
42394
+ ));
42395
+ })
42180
42396
  ));
42181
42397
  });
42182
42398
  },
42183
- $17
42184
- ));
42185
- });
42186
- },
42187
- (state2, a) => $14((v2$2) => $17(state2, $102(a)))
42188
- )));
42189
- });
42190
- };
42191
- return $14((v1$2) => lexeme(string3('"""'))(
42192
- $ParseState($23, $24, false),
42193
- $14,
42194
- $15,
42195
- (v2$2, $26) => $25($ParseState(v2$2._1, v2$2._2, false), $26),
42196
- (state2, a) => $14((v2$2) => {
42197
- const $26 = manyRec2(lexeme((v2$3, $262, $27, $28, $29) => {
42198
- const $30 = v2$3._1;
42199
- const $31 = v2$3._2;
42200
- return $262((v3$3) => $262((v1$3) => $82(
42201
- $ParseState($30, $31, false),
42202
- $262,
42203
- $27,
42204
- (v4$1, $32) => {
42205
- const $33 = v4$1._3;
42206
- return $262((v5$2) => {
42207
- if ($33) {
42208
- return $28(v4$1, $32);
42209
- }
42210
- return $262((v1$4) => $92(
42211
- v2$3,
42212
- $262,
42213
- $27,
42214
- $28,
42215
- (state2$1, a$1) => $262((v2$4) => {
42216
- const $34 = delim("{");
42217
- return $262((v1$5) => $34(
42218
- state2$1,
42219
- $262,
42220
- $27,
42221
- $28,
42222
- (state2$2, a$2) => $262((v2$5) => $262((v1$6) => opTree$lazy()(
42223
- state2$2,
42224
- $262,
42225
- $27,
42226
- $28,
42227
- (state2$3, a$3) => $262((v2$6) => {
42228
- const $35 = delim("}");
42229
- return $262((v1$7) => $35(
42230
- state2$3,
42231
- $262,
42232
- $27,
42233
- $28,
42234
- (state2$4, a$4) => $262((v2$7) => $29(state2$4, $ParagraphElem("Unquote", a$3)))
42235
- ));
42236
- })
42237
- )))
42238
- ));
42239
- })
42240
- ));
42241
- });
42242
- },
42243
- (state2$1, a$1) => $262((v2$4) => $29(state2$1, $ParagraphElem("Token", fromCharArray(a$1))))
42244
- )));
42245
- }));
42246
- return $14((v1$3) => $26(
42247
- state2,
42248
- $14,
42249
- $15,
42250
- $25,
42251
- (state2$1, a$1) => $14((v2$3) => $14((v1$4) => lexeme(string3('"""'))(
42252
- state2$1,
42253
- $14,
42254
- $15,
42255
- $25,
42256
- (state2$2, a$2) => $14((v2$4) => $17(state2$2, $Expr2("Paragraph", a$1)))
42257
- )))
42399
+ (state2$1, a$1) => $302((v2$4) => $33(state2$1, $ParagraphElem("Token", fromCharArray(a$1))))
42400
+ )));
42401
+ }));
42402
+ return $18((v1$3) => $30(
42403
+ state2,
42404
+ $18,
42405
+ $19,
42406
+ $29,
42407
+ (state2$1, a$1) => $18((v2$3) => $18((v1$4) => lexeme(string3('"""'))(
42408
+ state2$1,
42409
+ $18,
42410
+ $19,
42411
+ $29,
42412
+ (state2$2, a$2) => $18((v2$4) => $21(state2$2, $Expr2("Paragraph", a$1)))
42413
+ )))
42414
+ ));
42415
+ })
42258
42416
  ));
42259
- })
42260
- ));
42261
- });
42417
+ });
42418
+ });
42419
+ },
42420
+ (state2, a) => $18((v2$2) => $21(state2, $112(a)))
42421
+ ))),
42422
+ (state2, a) => $18((v2$1) => $21(state2, $10(a)))
42423
+ ))));
42424
+ };
42425
+ })();
42426
+ return (v2, $18, $19, $20, $21) => {
42427
+ const $22 = v2._1;
42428
+ const $23 = v2._2;
42429
+ return $18((v3) => $9(
42430
+ $ParseState($22, $23, false),
42431
+ $18,
42432
+ $19,
42433
+ (v4, $24) => {
42434
+ const $25 = v4._3;
42435
+ return $18((v5) => {
42436
+ if ($25) {
42437
+ return $20(v4, $24);
42438
+ }
42439
+ return $17(v2, $18, $19, $20, $21);
42262
42440
  });
42263
42441
  },
42264
- (state2, a) => $14((v2$2) => $17(state2, $7(a)))
42265
- ))),
42266
- (state2, a) => $14((v2$1) => $17(state2, $6(a)))
42267
- ))));
42442
+ $21
42443
+ ));
42444
+ };
42445
+ })();
42446
+ return (v2, $15, $16, $17, $18) => {
42447
+ const $19 = v2._1;
42448
+ const $20 = v2._2;
42449
+ return $15((v3) => $6(
42450
+ $ParseState($19, $20, false),
42451
+ $15,
42452
+ $16,
42453
+ (v4, $21) => {
42454
+ const $22 = v4._3;
42455
+ return $15((v5) => {
42456
+ if ($22) {
42457
+ return $17(v4, $21);
42458
+ }
42459
+ return $14(v2, $15, $16, $17, $18);
42460
+ });
42461
+ },
42462
+ $18
42463
+ ));
42268
42464
  };
42269
42465
  })();
42270
42466
  return (v2, $14, $15, $16, $17) => {
@@ -42287,50 +42483,50 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42287
42483
  ));
42288
42484
  };
42289
42485
  })();
42290
- return (v2, $11, $12, $13, $14) => {
42291
- const $15 = v2._1;
42292
- const $16 = v2._2;
42293
- return $11((v3) => $2(
42294
- $ParseState($15, $16, false),
42295
- $11,
42296
- $12,
42297
- (v4, $17) => {
42298
- const $18 = v4._3;
42299
- return $11((v5) => {
42300
- if ($18) {
42301
- return $13(v4, $17);
42486
+ return (v2, $13, $14, $15, $16) => {
42487
+ const $17 = v2._1;
42488
+ const $18 = v2._2;
42489
+ return $13((v3) => $4(
42490
+ $ParseState($17, $18, false),
42491
+ $13,
42492
+ $14,
42493
+ (v4, $19) => {
42494
+ const $20 = v4._3;
42495
+ return $13((v5) => {
42496
+ if ($20) {
42497
+ return $15(v4, $19);
42302
42498
  }
42303
- return $10(v2, $11, $12, $13, $14);
42499
+ return $12(v2, $13, $14, $15, $16);
42304
42500
  });
42305
42501
  },
42306
- $14
42502
+ $16
42307
42503
  ));
42308
42504
  };
42309
42505
  })();
42310
- return (v2, $10, $11, $12, $13) => {
42311
- const $14 = v2._1;
42312
- const $15 = v2._2;
42313
- return $10((v3) => $1(
42314
- $ParseState($14, $15, false),
42315
- $10,
42316
- $11,
42317
- (v4, $16) => {
42318
- const $17 = v4._3;
42319
- return $10((v5) => {
42320
- if ($17) {
42321
- return $12(v4, $16);
42506
+ return (v2, $12, $13, $14, $15) => {
42507
+ const $16 = v2._1;
42508
+ const $17 = v2._2;
42509
+ return $12((v3) => $3(
42510
+ $ParseState($16, $17, false),
42511
+ $12,
42512
+ $13,
42513
+ (v4, $18) => {
42514
+ const $19 = v4._3;
42515
+ return $12((v5) => {
42516
+ if ($19) {
42517
+ return $14(v4, $18);
42322
42518
  }
42323
- return $9(v2, $10, $11, $12, $13);
42519
+ return $11(v2, $12, $13, $14, $15);
42324
42520
  });
42325
42521
  },
42326
- $13
42522
+ $15
42327
42523
  ));
42328
42524
  };
42329
42525
  })();
42330
42526
  return (v2, $9, $10, $11, $12) => {
42331
42527
  const $13 = v2._1;
42332
42528
  const $14 = v2._2;
42333
- return $9((v3) => $03(
42529
+ return $9((v3) => $1(
42334
42530
  $ParseState($13, $14, false),
42335
42531
  $9,
42336
42532
  $10,
@@ -42374,7 +42570,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42374
42570
  lift12,
42375
42571
  $$throw2,
42376
42572
  (state2$1, a$1) => more((v2$1) => {
42377
- const $22 = block(expr$lazy());
42573
+ const $22 = block2(expr$lazy());
42378
42574
  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)))));
42379
42575
  })
42380
42576
  )))
@@ -42383,7 +42579,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42383
42579
  const $1 = reserved("match");
42384
42580
  const $2 = reserved("if");
42385
42581
  const $3 = context("def")((() => {
42386
- const $32 = context("funDef")((state1, more, lift12, $$throw2, done) => more((v1) => {
42582
+ const $32 = context("funDef")(withPos((state1, more, lift12, $$throw2, done) => more((v1) => {
42387
42583
  const $33 = state1._3;
42388
42584
  return recDefs$lazy()(
42389
42585
  state1,
@@ -42398,8 +42594,8 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42398
42594
  (state2$1, a$1) => more((v2$1) => done(state2$1, $Expr2("LetRec", a, a$1)))
42399
42595
  )))
42400
42596
  );
42401
- }));
42402
- const $42 = context("valDef")((state1, more, lift12, $$throw2, done) => more((v1) => {
42597
+ })));
42598
+ const $42 = context("valDef")(withPos((state1, more, lift12, $$throw2, done) => more((v1) => {
42403
42599
  const $43 = state1._3;
42404
42600
  return varDefs$lazy()(
42405
42601
  state1,
@@ -42414,7 +42610,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42414
42610
  (state2$1, a$1) => more((v2$1) => done(state2$1, $Expr2("Let", a, a$1)))
42415
42611
  )))
42416
42612
  );
42417
- }));
42613
+ })));
42418
42614
  return (v2, $5, $6, $7, $8) => {
42419
42615
  const $9 = v2._1;
42420
42616
  const $10 = v2._2;
@@ -42471,7 +42667,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42471
42667
  $6,
42472
42668
  $15,
42473
42669
  (state2$1, a$1) => $5((v2$2) => {
42474
- const $16 = block(expr$lazy());
42670
+ const $16 = block2(expr$lazy());
42475
42671
  return $5((v1$2) => $16(
42476
42672
  state2$1,
42477
42673
  $5,
@@ -42485,7 +42681,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42485
42681
  $6,
42486
42682
  $15,
42487
42683
  (state2$3, a$3) => $5((v2$4) => {
42488
- const $18 = block(expr$lazy());
42684
+ const $18 = block2(expr$lazy());
42489
42685
  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)))));
42490
42686
  })
42491
42687
  ));
@@ -42508,7 +42704,7 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42508
42704
  $6,
42509
42705
  $11,
42510
42706
  (state2$1, a$1) => $5((v2$2) => {
42511
- const $12 = block((state1, more, lift12, $$throw2, done) => more((v1$2) => branch(
42707
+ const $12 = block2((state1, more, lift12, $$throw2, done) => more((v1$2) => branch(
42512
42708
  state1,
42513
42709
  more,
42514
42710
  lift12,
@@ -42537,9 +42733,9 @@ var expr$lazy = /* @__PURE__ */ binding(() => {
42537
42733
  });
42538
42734
  var varDefs = /* @__PURE__ */ varDefs$lazy();
42539
42735
  var recDefs = /* @__PURE__ */ recDefs$lazy();
42540
- var expr = /* @__PURE__ */ expr$lazy();
42736
+ var expr2 = /* @__PURE__ */ expr$lazy();
42541
42737
  var parsePy$p = (input) => {
42542
- const $0 = runParserT2(input)(withImports(expr))(initialPos)._1;
42738
+ const $0 = runParserT2(input)(withImports(expr2))(initialPos)._1;
42543
42739
  if ($0.tag === "Left") {
42544
42740
  return $Either("Left", prettyParseError($0._1));
42545
42741
  }
@@ -43839,8 +44035,8 @@ var selectionResult = (v) => {
43839
44035
  fail();
43840
44036
  })();
43841
44037
  return {
43842
- v: spyWhen(false)("Mediating outputs")((x2) => renderWithIndent(0)(prettyVal(highlightableUnit).pretty(functorVal.map((v$1) => {
43843
- })(x2))))(applyVal.apply(functorVal.map((v4) => (v5) => {
44038
+ v: spyWhen(false)("Mediating outputs")((x2) => renderWithIndent(Stmt)(0)(0)(prettyVal(highlightableUnit).pretty(functorVal.map((v$1) => {
44039
+ })(x2)))._1)(applyVal.apply(functorVal.map((v4) => (v5) => {
43844
44040
  if (v4.tag === "Inert") {
43845
44041
  return Inert;
43846
44042
  }
@@ -43852,11 +44048,11 @@ var selectionResult = (v) => {
43852
44048
  }
43853
44049
  fail();
43854
44050
  })(v2._2._1))(v3._2._1)),
43855
- "\u03B3": spyWhen(false)("Mediating inputs")((x2) => renderWithIndent(0)(prettyEnv(highlightableUnit).pretty(_fmapObject(
44051
+ "\u03B3": spyWhen(false)("Mediating inputs")((x2) => renderWithIndent(Stmt)(0)(0)(prettyEnv(highlightableUnit).pretty(_fmapObject(
43856
44052
  x2,
43857
44053
  functorVal.map((v$1) => {
43858
44054
  })
43859
- ))))(intersectionWith_Object(apply)(_fmapObject(
44055
+ )))._1)(intersectionWith_Object(apply)(_fmapObject(
43860
44056
  _fmapObject(
43861
44057
  v2._1,
43862
44058
  functorVal.map((v4) => (v5) => {