@fncts/base 0.0.29 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/_cjs/collection/immutable/HashSet/api.cjs +18 -7
  2. package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
  3. package/_cjs/collection/immutable/HashSet/definition.cjs +2 -2
  4. package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -1
  5. package/_cjs/control/Eval/api.cjs +4 -1
  6. package/_cjs/control/Eval/api.cjs.map +1 -1
  7. package/_cjs/control/Eval/constructors.cjs +9 -2
  8. package/_cjs/control/Eval/constructors.cjs.map +1 -1
  9. package/_cjs/control/Eval/definition.cjs +10 -28
  10. package/_cjs/control/Eval/definition.cjs.map +1 -1
  11. package/_cjs/control/Eval/run.cjs +7 -7
  12. package/_cjs/control/Eval/run.cjs.map +1 -1
  13. package/_cjs/control/{Z → Pure}/api.cjs +146 -115
  14. package/_cjs/control/Pure/api.cjs.map +1 -0
  15. package/_cjs/control/Pure/definition.cjs +78 -0
  16. package/_cjs/control/Pure/definition.cjs.map +1 -0
  17. package/_cjs/control/{Z → Pure}/instances.cjs +1 -1
  18. package/_cjs/control/Pure/instances.cjs.map +1 -0
  19. package/_cjs/control/{Z → Pure}/runtime.cjs +67 -66
  20. package/_cjs/control/Pure/runtime.cjs.map +1 -0
  21. package/_cjs/control/{Z.cjs → Pure.cjs} +5 -5
  22. package/_cjs/control/Pure.cjs.map +1 -0
  23. package/_cjs/data/Date/definition.cjs +6 -0
  24. package/_cjs/data/Date/definition.cjs.map +1 -0
  25. package/_cjs/data/Date.cjs +17 -0
  26. package/_cjs/data/Date.cjs.map +1 -0
  27. package/_cjs/data/Showable/show.cjs +31 -31
  28. package/_cjs/data/Showable/show.cjs.map +1 -1
  29. package/_mjs/collection/immutable/HashSet/api.mjs +17 -7
  30. package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
  31. package/_mjs/collection/immutable/HashSet/definition.mjs +2 -2
  32. package/_mjs/collection/immutable/HashSet/definition.mjs.map +1 -1
  33. package/_mjs/control/Eval/api.mjs +5 -2
  34. package/_mjs/control/Eval/api.mjs.map +1 -1
  35. package/_mjs/control/Eval/constructors.mjs +10 -3
  36. package/_mjs/control/Eval/constructors.mjs.map +1 -1
  37. package/_mjs/control/Eval/definition.mjs +7 -25
  38. package/_mjs/control/Eval/definition.mjs.map +1 -1
  39. package/_mjs/control/Eval/run.mjs +7 -7
  40. package/_mjs/control/Eval/run.mjs.map +1 -1
  41. package/_mjs/control/{Z → Pure}/api.mjs +134 -104
  42. package/_mjs/control/Pure/api.mjs.map +1 -0
  43. package/_mjs/control/Pure/definition.mjs +60 -0
  44. package/_mjs/control/Pure/definition.mjs.map +1 -0
  45. package/_mjs/control/{Z → Pure}/instances.mjs +1 -1
  46. package/_mjs/control/Pure/instances.mjs.map +1 -0
  47. package/_mjs/control/{Z → Pure}/runtime.mjs +68 -67
  48. package/_mjs/control/Pure/runtime.mjs.map +1 -0
  49. package/_mjs/control/Pure.mjs +6 -0
  50. package/_mjs/control/Pure.mjs.map +1 -0
  51. package/_mjs/data/Date/definition.mjs +2 -0
  52. package/_mjs/data/Date/definition.mjs.map +1 -0
  53. package/_mjs/data/Date.mjs +3 -0
  54. package/_mjs/data/Date.mjs.map +1 -0
  55. package/_mjs/data/Showable/show.mjs +31 -31
  56. package/_mjs/data/Showable/show.mjs.map +1 -1
  57. package/_src/collection/immutable/HashSet/api.ts +12 -1
  58. package/_src/collection/immutable/HashSet/definition.ts +2 -2
  59. package/_src/control/Eval/api.ts +5 -2
  60. package/_src/control/Eval/constructors.ts +10 -3
  61. package/_src/control/Eval/definition.ts +39 -27
  62. package/_src/control/Eval/run.ts +7 -7
  63. package/_src/control/Pure/api.ts +629 -0
  64. package/_src/control/Pure/definition.ts +222 -0
  65. package/_src/control/{Z → Pure}/instances.ts +3 -3
  66. package/_src/control/{Z → Pure}/runtime.ts +73 -76
  67. package/_src/control/Pure.ts +6 -0
  68. package/_src/control.ts +1 -1
  69. package/_src/data/Date/definition.ts +6 -0
  70. package/_src/data/Date.ts +3 -0
  71. package/_src/data/Showable/show.ts +55 -53
  72. package/_src/data.ts +1 -0
  73. package/_src/global.ts +1 -1
  74. package/collection/immutable/HashSet/api.d.ts +5 -0
  75. package/collection/immutable/HashSet/definition.d.ts +1 -1
  76. package/control/Eval/constructors.d.ts +4 -0
  77. package/control/Eval/definition.d.ts +25 -28
  78. package/control/Pure/api.d.ts +345 -0
  79. package/control/Pure/definition.d.ts +156 -0
  80. package/control/Pure/instances.d.ts +8 -0
  81. package/control/Pure/runtime.d.ts +56 -0
  82. package/control/Pure.d.ts +4 -0
  83. package/control.d.ts +1 -1
  84. package/data/Date/definition.d.ts +9 -0
  85. package/data/Date.d.ts +1 -0
  86. package/data/Showable/show.d.ts +2 -2
  87. package/data.d.ts +1 -0
  88. package/global.d.ts +1 -1
  89. package/package.json +1 -1
  90. package/_cjs/control/Z/api.cjs.map +0 -1
  91. package/_cjs/control/Z/definition.cjs +0 -163
  92. package/_cjs/control/Z/definition.cjs.map +0 -1
  93. package/_cjs/control/Z/instances.cjs.map +0 -1
  94. package/_cjs/control/Z/runtime.cjs.map +0 -1
  95. package/_cjs/control/Z.cjs.map +0 -1
  96. package/_mjs/control/Z/api.mjs.map +0 -1
  97. package/_mjs/control/Z/definition.mjs +0 -145
  98. package/_mjs/control/Z/definition.mjs.map +0 -1
  99. package/_mjs/control/Z/instances.mjs.map +0 -1
  100. package/_mjs/control/Z/runtime.mjs.map +0 -1
  101. package/_mjs/control/Z.mjs +0 -6
  102. package/_mjs/control/Z.mjs.map +0 -1
  103. package/_src/control/Z/api.ts +0 -590
  104. package/_src/control/Z/definition.ts +0 -199
  105. package/_src/control/Z.ts +0 -6
  106. package/control/Z/api.d.ts +0 -345
  107. package/control/Z/definition.d.ts +0 -151
  108. package/control/Z/instances.d.ts +0 -8
  109. package/control/Z/runtime.d.ts +0 -56
  110. package/control/Z.d.ts +0 -4
@@ -71,7 +71,7 @@ export interface ShowOptions {
71
71
  }
72
72
 
73
73
  export class ShowContext extends CaseClass<ShowContextArgs> {}
74
- export type ShowComputationZ<A> = Z<never, ShowContext, ShowContext, never, never, A>;
74
+ export type ShowComputationZ<A> = Pure<never, ShowContext, ShowContext, never, never, A>;
75
75
  export type ShowComputation = ShowComputationZ<string>;
76
76
  export type ShowComputationChunk = ShowComputationZ<Conc<string>>;
77
77
 
@@ -134,24 +134,24 @@ export function showWithOptions(value: unknown, options: Partial<ShowOptions>):
134
134
  }
135
135
 
136
136
  export function _show(value: unknown): ShowComputation {
137
- return Z.getsZ((context) => {
137
+ return Pure.getsPure((context) => {
138
138
  if (value === undefined) {
139
- return Z.succeedNow(context.stylize("undefined", "undefined"));
139
+ return Pure.succeedNow(context.stylize("undefined", "undefined"));
140
140
  }
141
141
  if (value === null) {
142
- return Z.succeedNow(context.stylize("null", "null"));
142
+ return Pure.succeedNow(context.stylize("null", "null"));
143
143
  }
144
144
  if (!isObject(value) && !isFunction(value)) {
145
- return Z.succeedNow(_showPrimitive(context, value as Primitive));
145
+ return Pure.succeedNow(_showPrimitive(context, value as Primitive));
146
146
  }
147
147
  return showValue(value);
148
148
  });
149
149
  }
150
150
 
151
151
  function showValue(value: object): ShowComputation {
152
- return Z.getsZ((context) => {
152
+ return Pure.getsPure((context) => {
153
153
  if (context.seen.findIndex((v) => v === value) !== -1) {
154
- return Z.modify((context: ShowContext) =>
154
+ return Pure.modify((context: ShowContext) =>
155
155
  context.circular.get(value).match(
156
156
  () => [
157
157
  context.circular.size + 1,
@@ -224,7 +224,7 @@ function getInspectionInfo(context: ShowContext, value: object, typedArray?: str
224
224
  let keys = [] as Array<PropertyKey>;
225
225
  let tag = value[Symbol.toStringTag as keyof typeof value] as string;
226
226
  let base = "";
227
- let formatter = (_: any) => Z.succeedNow(Conc.empty<string>()) as ShowComputationChunk;
227
+ let formatter = (_: any) => Pure.succeedNow(Conc.empty<string>()) as ShowComputationChunk;
228
228
  let braces = ["", ""] as [string, string];
229
229
  let noIterator = true;
230
230
  let extrasType = OBJECT_TYPE;
@@ -342,7 +342,7 @@ function getInspectionInfo(context: ShowContext, value: object, typedArray?: str
342
342
  return inspectionEarlyReturn(`${getPrefix(constructor, tag, "WeakSet")}{}`);
343
343
  } else if (isWeakMap(value)) {
344
344
  return inspectionEarlyReturn(`${getPrefix(constructor, tag, "WeakMap")}{}`);
345
- } else if (Z.isZ(value)) {
345
+ } else if (Pure.isPure(value)) {
346
346
  return constructor !== null ? inspectionEarlyReturn(`Z (${constructor}) {}`) : inspectionEarlyReturn("Z {}");
347
347
  } else {
348
348
  if (keys.length === 0) {
@@ -369,28 +369,28 @@ function getInspectionInfo(context: ShowContext, value: object, typedArray?: str
369
369
  * into a human-readable, formatted string
370
370
  */
371
371
  function showRaw(value: object, typedArray?: string): ShowComputation {
372
- return Z.gets((context: ShowContext) => tuple(context, getInspectionInfo(context, value, typedArray))).flatMap(
372
+ return Pure.gets((context: ShowContext) => tuple(context, getInspectionInfo(context, value, typedArray))).flatMap(
373
373
  ([context, info]) => {
374
374
  if (info._tag === "InspectionInfo" && context.recurseTimes > context.depth) {
375
375
  let constructorName = getPrefix(info.constructor, info.tag, "Object").slice(0, -1);
376
376
  if (info.constructor !== null) {
377
377
  constructorName = `[${constructorName}]`;
378
378
  }
379
- return Z.update((context: ShowContext) =>
379
+ return Pure.update((context: ShowContext) =>
380
380
  context.copy({
381
381
  recurseTimes: context.recurseTimes - 1,
382
382
  currentDepth: context.currentDepth - 1,
383
383
  }),
384
- ).zipRight(Z.succeedNow(context.stylize(constructorName, "special")));
384
+ ).zipRight(Pure.succeedNow(context.stylize(constructorName, "special")));
385
385
  }
386
386
  if (info._tag === "InspectionEarlyReturn") {
387
- return Z.succeedNow(info.shown);
387
+ return Pure.succeedNow(info.shown);
388
388
  } else {
389
- return Z.update((context: ShowContext) => {
389
+ return Pure.update((context: ShowContext) => {
390
390
  context.seen.push(value);
391
391
  return context;
392
392
  }).zipRight(
393
- Z.defer(() => {
393
+ Pure.defer(() => {
394
394
  let keys: ShowComputationChunk;
395
395
  let indices: ShowComputationChunk;
396
396
  let base: ShowComputation;
@@ -398,11 +398,11 @@ function showRaw(value: object, typedArray?: string): ShowComputation {
398
398
  let extrasType: number;
399
399
  switch (info._tag) {
400
400
  case "InspectionInfo": {
401
- base = Z.succeedNow(info.base);
401
+ base = Pure.succeedNow(info.base);
402
402
  keys = Conc.from(info.keys)
403
- .traverse(Z.Applicative)((key) => showProperty(value, key, info.extrasType))
403
+ .traverse(Pure.Applicative)((key) => showProperty(value, key, info.extrasType))
404
404
  .crossWith(
405
- info.protoProps.traverse(Z.Applicative)((key) => showProperty(value, key, PROTO_TYPE)),
405
+ info.protoProps.traverse(Pure.Applicative)((key) => showProperty(value, key, PROTO_TYPE)),
406
406
  (k1, k2) => k1.concat(k2),
407
407
  );
408
408
  indices = info.formatter(value);
@@ -413,15 +413,15 @@ function showRaw(value: object, typedArray?: string): ShowComputation {
413
413
  case "InspectionExternal": {
414
414
  const externalComputation = info.computation;
415
415
  if (externalComputation._tag === "Primitive") {
416
- return Z.getsZ((context) =>
416
+ return Pure.getsPure((context) =>
417
417
  externalComputation.computation.map((str) =>
418
418
  str.replace(/\n/g, `\n${" ".repeat(context.indentationLevel)}`),
419
419
  ),
420
420
  );
421
421
  } else {
422
- base = externalComputation.base || Z.succeedNow("");
423
- keys = externalComputation.keys || Z.succeedNow(Conc.empty());
424
- indices = externalComputation.indices || Z.succeedNow(Conc.empty());
422
+ base = externalComputation.base || Pure.succeedNow("");
423
+ keys = externalComputation.keys || Pure.succeedNow(Conc.empty());
424
+ indices = externalComputation.indices || Pure.succeedNow(Conc.empty());
425
425
  braces = externalComputation.braces || ["", ""];
426
426
  extrasType = externalComputation.extrasType || OBJECT_TYPE;
427
427
  }
@@ -429,7 +429,7 @@ function showRaw(value: object, typedArray?: string): ShowComputation {
429
429
  }
430
430
  }
431
431
  const output = indices.crossWith(keys, (idxs, ks) => idxs.concat(ks));
432
- const baseWithRef = Z.getsZ((context: ShowContext) =>
432
+ const baseWithRef = Pure.getsPure((context: ShowContext) =>
433
433
  context.circular.get(value).match(
434
434
  () => base,
435
435
  (index) =>
@@ -439,7 +439,7 @@ function showRaw(value: object, typedArray?: string): ShowComputation {
439
439
  }),
440
440
  ),
441
441
  );
442
- return Z.update((_: ShowContext) =>
442
+ return Pure.update((_: ShowContext) =>
443
443
  _.copy({
444
444
  recurseTimes: context.recurseTimes + 1,
445
445
  currentDepth: _.recurseTimes + 1,
@@ -448,7 +448,7 @@ function showRaw(value: object, typedArray?: string): ShowComputation {
448
448
  .zipRight(output)
449
449
  .cross(baseWithRef)
450
450
  .flatMap(([output, base]) =>
451
- Z.modify((context) => {
451
+ Pure.modify((context) => {
452
452
  const res = reduceToSingleString(context, output, base, braces, extrasType, value);
453
453
  const budget = context.budget[context.indentationLevel] || 0;
454
454
  const newLength = budget + res.length;
@@ -463,7 +463,7 @@ function showRaw(value: object, typedArray?: string): ShowComputation {
463
463
  }),
464
464
  )
465
465
  .zipLeft(
466
- Z.update((context: ShowContext) => {
466
+ Pure.update((context: ShowContext) => {
467
467
  context.seen.pop();
468
468
  return context.copy({
469
469
  recurseTimes: context.recurseTimes - 1,
@@ -531,20 +531,20 @@ function removeColors(str: string): string {
531
531
  }
532
532
 
533
533
  function showSet(value: Set<unknown>): ShowComputationChunk {
534
- return Z.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel + 2 }))
535
- .zipRight((value as Iterable<unknown>).traverseToConc(Z.Applicative)(_show))
536
- .zipLeft(Z.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel - 2 })));
534
+ return Pure.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel + 2 }))
535
+ .zipRight((value as Iterable<unknown>).traverseToConc(Pure.Applicative)(_show))
536
+ .zipLeft(Pure.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel - 2 })));
537
537
  }
538
538
 
539
539
  function showMap(value: Map<unknown, unknown>): ShowComputationChunk {
540
- return Z.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel + 2 }))
540
+ return Pure.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel + 2 }))
541
541
  .zipRight(
542
- (value as Iterable<[unknown, unknown]>).traverseToConc(Z.Applicative)(([k, v]) =>
542
+ (value as Iterable<[unknown, unknown]>).traverseToConc(Pure.Applicative)(([k, v]) =>
543
543
  _show(k).crossWith(_show(v), (k, v) => `${k} => ${v}`),
544
544
  ),
545
545
  )
546
546
  .zipLeft(
547
- Z.update((_: ShowContext) =>
547
+ Pure.update((_: ShowContext) =>
548
548
  _.copy({
549
549
  indentationLevel: _.indentationLevel - 2,
550
550
  }),
@@ -553,8 +553,8 @@ function showMap(value: Map<unknown, unknown>): ShowComputationChunk {
553
553
  }
554
554
 
555
555
  function showTypedArray(value: TypedArray): ShowComputationChunk {
556
- return Z.getsZ((context) =>
557
- Z.defer(() => {
556
+ return Pure.getsPure((context) =>
557
+ Pure.defer(() => {
558
558
  const maxLength = Math.min(Math.max(0, context.maxArrayLength), value.length);
559
559
  const remaining = value.length - maxLength;
560
560
  let output = Conc.empty<string>();
@@ -567,26 +567,26 @@ function showTypedArray(value: TypedArray): ShowComputationChunk {
567
567
  output = output.append(`... ${remaining} more item${pluralize(remaining)}`);
568
568
  }
569
569
  if (context.showHidden) {
570
- return Z.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel + 2 }))
570
+ return Pure.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel + 2 }))
571
571
  .zipRight(
572
- Z.succeedNow(output).flatMap((output) =>
572
+ Pure.succeedNow(output).flatMap((output) =>
573
573
  Conc("BYTES_PER_ELEMENT", "length", "byteLength", "byteOffset", "buffer")
574
- .traverse(Z.Applicative)((key) =>
574
+ .traverse(Pure.Applicative)((key) =>
575
575
  _show(value[key as keyof TypedArray]).map((shown) => `[${key}]: ${shown}`),
576
576
  )
577
577
  .map((shownKeys) => output.concat(shownKeys)),
578
578
  ),
579
579
  )
580
- .zipLeft(Z.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel - 2 })));
580
+ .zipLeft(Pure.update((_: ShowContext) => _.copy({ indentationLevel: _.indentationLevel - 2 })));
581
581
  } else {
582
- return Z.succeedNow(output);
582
+ return Pure.succeedNow(output);
583
583
  }
584
584
  }),
585
585
  );
586
586
  }
587
587
 
588
588
  function showArrayBuffer(value: ArrayBuffer | SharedArrayBuffer): ShowComputationChunk {
589
- return Z.gets((context: ShowContext) => {
589
+ return Pure.gets((context: ShowContext) => {
590
590
  let buffer;
591
591
  try {
592
592
  buffer = new Uint8Array(value);
@@ -613,7 +613,7 @@ function showSpecialArray(
613
613
  currentIndex: number,
614
614
  currentLength: number,
615
615
  ): ShowComputationChunk {
616
- return Z.getsZ((context) => {
616
+ return Pure.getsPure((context) => {
617
617
  const keys = Object.keys(value);
618
618
  let index = currentIndex;
619
619
  let i = currentIndex;
@@ -657,7 +657,7 @@ function showSpecialArray(
657
657
  }
658
658
 
659
659
  function showArray(value: ReadonlyArray<unknown>): ShowComputationChunk {
660
- return Z.gets((context: ShowContext) => {
660
+ return Pure.gets((context: ShowContext) => {
661
661
  let chunk = Conc.from(value);
662
662
  const valLen = chunk.length;
663
663
  const len = Math.min(Math.max(0, context.maxArrayLength), valLen);
@@ -665,7 +665,7 @@ function showArray(value: ReadonlyArray<unknown>): ShowComputationChunk {
665
665
  chunk = chunk.take(len);
666
666
  return tuple(remaining, chunk);
667
667
  }).flatMap(([remaining, chunk]) => {
668
- let computation = Z.succeedNow(Conc.empty()) as ShowComputationChunk;
668
+ let computation = Pure.succeedNow(Conc.empty()) as ShowComputationChunk;
669
669
  for (let i = 0; i < chunk.length; i++) {
670
670
  if (!Object.prototype.hasOwnProperty.call(value, i)) {
671
671
  return showSpecialArray(value, chunk.length, computation, i, i);
@@ -680,7 +680,7 @@ function showArray(value: ReadonlyArray<unknown>): ShowComputationChunk {
680
680
  }
681
681
 
682
682
  function showChunk(value: Conc<unknown>): ShowComputationChunk {
683
- return Z.gets((context: ShowContext) => {
683
+ return Pure.gets((context: ShowContext) => {
684
684
  const valLen = value.length;
685
685
  const len = Math.min(Math.max(0, context.maxArrayLength), valLen);
686
686
  const remaining = valLen - len;
@@ -688,7 +688,7 @@ function showChunk(value: Conc<unknown>): ShowComputationChunk {
688
688
  return tuple(remaining, chunk);
689
689
  }).flatMap(([remaining, chunk]) =>
690
690
  chunk
691
- .traverse(Z.Applicative)(_show)
691
+ .traverse(Pure.Applicative)(_show)
692
692
  .map((chunk) => (remaining > 0 ? chunk.append(`... ${remaining} more item${pluralize(remaining)}`) : chunk)),
693
693
  );
694
694
  }
@@ -699,8 +699,8 @@ export function showProperty(
699
699
  type: number,
700
700
  desc?: PropertyDescriptor,
701
701
  ): ShowComputation {
702
- return Z.getsZ((context: ShowContext) =>
703
- Z.defer(() => {
702
+ return Pure.getsPure((context: ShowContext) =>
703
+ Pure.defer(() => {
704
704
  const descriptor = desc ||
705
705
  Object.getOwnPropertyDescriptor(value, key) || {
706
706
  value: value[key as keyof typeof value],
@@ -708,22 +708,24 @@ export function showProperty(
708
708
  };
709
709
  if (isDefined(descriptor.value)) {
710
710
  const diff = context.compact !== true || (type !== OBJECT_TYPE && type !== PROTO_TYPE) ? 2 : 3;
711
- return Z.update((_: ShowContext): ShowContext => _.copy({ indentationLevel: _.indentationLevel + diff }))
711
+ return Pure.update((_: ShowContext): ShowContext => _.copy({ indentationLevel: _.indentationLevel + diff }))
712
712
  .zipRight(_show(descriptor.value))
713
713
  .flatMap((shown: string) =>
714
- Z.gets((_: ShowContext) =>
714
+ Pure.gets((_: ShowContext) =>
715
715
  diff === 3 && _.breakLength < getStringWidth(shown, _.colors)
716
716
  ? tuple(descriptor, `\n${" ".repeat(_.indentationLevel)}`, shown)
717
717
  : tuple(descriptor, " ", shown),
718
718
  ),
719
719
  )
720
- .zipLeft(Z.update((_: ShowContext): ShowContext => _.copy({ indentationLevel: _.indentationLevel - diff })));
720
+ .zipLeft(
721
+ Pure.update((_: ShowContext): ShowContext => _.copy({ indentationLevel: _.indentationLevel - diff })),
722
+ );
721
723
  } else if (isDefined(descriptor.get)) {
722
- return Z.succeedNow(tuple(descriptor, " ", `[${descriptor.set ? "Getter/Settter" : "Getter"}]`));
724
+ return Pure.succeedNow(tuple(descriptor, " ", `[${descriptor.set ? "Getter/Settter" : "Getter"}]`));
723
725
  } else if (isDefined(descriptor.set)) {
724
- return Z.succeedNow(tuple(descriptor, " ", "Setter"));
726
+ return Pure.succeedNow(tuple(descriptor, " ", "Setter"));
725
727
  } else {
726
- return Z.succeedNow(tuple(descriptor, " ", "undefined"));
728
+ return Pure.succeedNow(tuple(descriptor, " ", "undefined"));
727
729
  }
728
730
  }).map(([descriptor, extra, shown]) => {
729
731
  if (type === ARRAY_TYPE) {
package/_src/data.ts CHANGED
@@ -6,6 +6,7 @@ export type {} from "./data/Byte.js";
6
6
  export type {} from "./data/CaseClass.js";
7
7
  export type {} from "./data/Cause.js";
8
8
  export type {} from "./data/Const.js";
9
+ export type {} from "./data/Date.js";
9
10
  export type {} from "./data/DatumEither.js";
10
11
  export type {} from "./data/DecodeError.js";
11
12
  export type {} from "./data/Decoder.js";
package/_src/global.ts CHANGED
@@ -82,7 +82,7 @@ import { LazyValue } from "@fncts/base/control/LazyValue";
82
82
  /**
83
83
  * @tsplus global
84
84
  */
85
- import { Z } from "@fncts/base/control/Z/definition";
85
+ import { Pure } from "@fncts/base/control/Pure/definition";
86
86
  /**
87
87
  * @tsplus global
88
88
  */
@@ -5,6 +5,11 @@ import { Either } from "@fncts/base/data/Either/definition";
5
5
  import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
6
6
  import * as P from "@fncts/base/typeclass";
7
7
  import { HashEq } from "@fncts/base/typeclass";
8
+ /**
9
+ * @tsplus static fncts.HashSetOps from
10
+ * @tsplus location "@fncts/base/collection/immutable/HashSet/api"
11
+ */
12
+ export declare function from<A>(items: Iterable<A>): HashSet<A>;
8
13
  /**
9
14
  * @tsplus pipeable fncts.HashSet add
10
15
  * @tsplus location "@fncts/base/collection/immutable/HashSet/api"
@@ -97,7 +97,7 @@ export declare class IndexedNode<A> {
97
97
  edit: number;
98
98
  mask: number;
99
99
  children: Array<Node<A>>;
100
- readonly _tag = "IndexNode";
100
+ readonly _tag = "IndexedNode";
101
101
  constructor(edit: number, mask: number, children: Array<Node<A>>);
102
102
  modify(remove: boolean, edit: number, eq: (y: A) => (x: A) => boolean, shift: number, hash: number, value: A, size: SizeRef): Node<A>;
103
103
  }
@@ -16,4 +16,8 @@ export declare function defer<A>(make: Lazy<Eval<A>>): Eval<A>;
16
16
  * @tsplus location "@fncts/base/control/Eval/constructors"
17
17
  */
18
18
  export declare function always<A>(make: Lazy<A>): Eval<A>;
19
+ /**
20
+ * @tsplus static fncts.control.EvalOps later
21
+ * @tsplus location "@fncts/base/control/Eval/constructors"
22
+ */
19
23
  export declare function later<A>(make: Lazy<A>): Eval<A>;
@@ -3,6 +3,19 @@ export declare const EvalVariance: unique symbol;
3
3
  export type EvalVariance = typeof EvalVariance;
4
4
  export declare const EvalTypeId: unique symbol;
5
5
  export type EvalTypeId = typeof EvalTypeId;
6
+ export declare class EvalPrimitive {
7
+ readonly _tag: unknown;
8
+ readonly [EvalTypeId]: EvalTypeId;
9
+ [EvalVariance]: {
10
+ readonly _A: (_: never) => never;
11
+ };
12
+ constructor(_tag: unknown);
13
+ readonly i0: unknown;
14
+ readonly i1: unknown;
15
+ }
16
+ export type EvalOp<Tag extends number, Body = {}> = EvalPrimitive & Body & {
17
+ _tag: Tag;
18
+ };
6
19
  export interface EvalF extends HKT {
7
20
  type: Eval<this["A"]>;
8
21
  variance: {
@@ -29,40 +42,24 @@ export declare const enum EvalTag {
29
42
  Defer = 1,
30
43
  Chain = 2
31
44
  }
32
- export declare class Value<A> implements Eval<A> {
33
- readonly value: A;
34
- readonly _tag = EvalTag.Value;
35
- readonly [EvalTypeId]: EvalTypeId;
36
- [EvalVariance]: {
37
- readonly _A: (_: never) => A;
38
- };
39
- constructor(value: A);
45
+ export interface Value extends EvalOp<EvalTag.Value, {
46
+ readonly i0: any;
47
+ }> {
40
48
  }
41
- export declare class Defer<A> implements Eval<A> {
42
- readonly make: () => Eval<A>;
43
- readonly [EvalTypeId]: EvalTypeId;
44
- [EvalVariance]: {
45
- readonly _A: (_: never) => A;
46
- };
47
- readonly _tag = EvalTag.Defer;
48
- readonly _A: () => A;
49
- constructor(make: () => Eval<A>);
49
+ export interface Defer extends EvalOp<EvalTag.Defer, {
50
+ readonly i0: () => Primitive;
51
+ }> {
50
52
  }
51
- export declare class Chain<A, B> implements Eval<B> {
52
- readonly self: Eval<A>;
53
- readonly f: (a: A) => Eval<B>;
54
- readonly [EvalTypeId]: EvalTypeId;
55
- [EvalVariance]: {
56
- readonly _A: (_: never) => B;
57
- };
58
- readonly _tag = EvalTag.Chain;
59
- constructor(self: Eval<A>, f: (a: A) => Eval<B>);
53
+ export interface FlatMap extends EvalOp<EvalTag.Chain, {
54
+ readonly i0: Primitive;
55
+ readonly i1: (a: any) => Primitive;
56
+ }> {
60
57
  }
61
- type Concrete = Value<any> | Defer<any> | Chain<any, any>;
58
+ type Primitive = Value | Defer | FlatMap;
62
59
  /**
63
60
  * @tsplus smart:remove
64
61
  */
65
- export declare function concrete(_: Eval<any>): asserts _ is Concrete;
62
+ export declare function concrete(_: Eval<any>): asserts _ is Primitive;
66
63
  /**
67
64
  * @tsplus unify fncts.control.Eval
68
65
  */