@fncts/schema 0.0.24 → 0.0.25

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.
Files changed (135) hide show
  1. package/LICENSE +26 -0
  2. package/_cjs/AST.cjs +1093 -1226
  3. package/_cjs/AST.cjs.map +1 -1
  4. package/_cjs/ASTAnnotation.cjs +114 -85
  5. package/_cjs/ASTAnnotation.cjs.map +1 -1
  6. package/_cjs/ASTAnnotationMap.cjs +43 -41
  7. package/_cjs/ASTAnnotationMap.cjs.map +1 -1
  8. package/_cjs/Eq.cjs +113 -145
  9. package/_cjs/Eq.cjs.map +1 -1
  10. package/_cjs/Gen.cjs +131 -167
  11. package/_cjs/Gen.cjs.map +1 -1
  12. package/_cjs/Guard.cjs +167 -267
  13. package/_cjs/Guard.cjs.map +1 -1
  14. package/_cjs/InvalidInterpretationError.cjs +9 -10
  15. package/_cjs/InvalidInterpretationError.cjs.map +1 -1
  16. package/_cjs/ParseError/ParseError.cjs +283 -284
  17. package/_cjs/ParseError/ParseError.cjs.map +1 -1
  18. package/_cjs/ParseError/ParseErrorFormatter.cjs +0 -2
  19. package/_cjs/ParseError/PathFormatter.cjs +55 -87
  20. package/_cjs/ParseError/PathFormatter.cjs.map +1 -1
  21. package/_cjs/ParseError/TreeFormatter.cjs +70 -102
  22. package/_cjs/ParseError/TreeFormatter.cjs.map +1 -1
  23. package/_cjs/ParseError.cjs +35 -50
  24. package/_cjs/ParseResult.cjs +15 -15
  25. package/_cjs/ParseResult.cjs.map +1 -1
  26. package/_cjs/Parser/api.cjs +54 -50
  27. package/_cjs/Parser/api.cjs.map +1 -1
  28. package/_cjs/Parser/definition.cjs +17 -16
  29. package/_cjs/Parser/definition.cjs.map +1 -1
  30. package/_cjs/Parser/interpreter.cjs +276 -358
  31. package/_cjs/Parser/interpreter.cjs.map +1 -1
  32. package/_cjs/Parser.cjs +12 -39
  33. package/_cjs/Schema/api/conc.cjs +64 -59
  34. package/_cjs/Schema/api/conc.cjs.map +1 -1
  35. package/_cjs/Schema/api/either.cjs +73 -72
  36. package/_cjs/Schema/api/either.cjs.map +1 -1
  37. package/_cjs/Schema/api/hashMap.cjs +85 -85
  38. package/_cjs/Schema/api/hashMap.cjs.map +1 -1
  39. package/_cjs/Schema/api/hashSet.cjs +75 -69
  40. package/_cjs/Schema/api/hashSet.cjs.map +1 -1
  41. package/_cjs/Schema/api/list.cjs +74 -66
  42. package/_cjs/Schema/api/list.cjs.map +1 -1
  43. package/_cjs/Schema/api/map.cjs +81 -83
  44. package/_cjs/Schema/api/map.cjs.map +1 -1
  45. package/_cjs/Schema/api/maybe.cjs +56 -49
  46. package/_cjs/Schema/api/maybe.cjs.map +1 -1
  47. package/_cjs/Schema/api/set.cjs +68 -61
  48. package/_cjs/Schema/api/set.cjs.map +1 -1
  49. package/_cjs/Schema/api.cjs +332 -350
  50. package/_cjs/Schema/api.cjs.map +1 -1
  51. package/_cjs/Schema/definition.cjs +28 -26
  52. package/_cjs/Schema/definition.cjs.map +1 -1
  53. package/_cjs/Schema/derivations.cjs +85 -100
  54. package/_cjs/Schema/derivations.cjs.map +1 -1
  55. package/_cjs/Schema.cjs +95 -127
  56. package/_cjs/Show.cjs +91 -151
  57. package/_cjs/Show.cjs.map +1 -1
  58. package/_cjs/chunk.cjs +28 -0
  59. package/_cjs/global.cjs +0 -2
  60. package/_cjs/index.cjs +0 -2
  61. package/_cjs/utils.cjs +41 -46
  62. package/_cjs/utils.cjs.map +1 -1
  63. package/_mjs/AST.mjs +996 -1161
  64. package/_mjs/AST.mjs.map +1 -1
  65. package/_mjs/ASTAnnotation.mjs +77 -73
  66. package/_mjs/ASTAnnotation.mjs.map +1 -1
  67. package/_mjs/ASTAnnotationMap.mjs +31 -29
  68. package/_mjs/ASTAnnotationMap.mjs.map +1 -1
  69. package/_mjs/Eq.mjs +101 -134
  70. package/_mjs/Eq.mjs.map +1 -1
  71. package/_mjs/Gen.mjs +117 -157
  72. package/_mjs/Gen.mjs.map +1 -1
  73. package/_mjs/Guard.mjs +154 -257
  74. package/_mjs/Guard.mjs.map +1 -1
  75. package/_mjs/InvalidInterpretationError.mjs +8 -4
  76. package/_mjs/InvalidInterpretationError.mjs.map +1 -1
  77. package/_mjs/ParseError/ParseError.mjs +266 -262
  78. package/_mjs/ParseError/ParseError.mjs.map +1 -1
  79. package/_mjs/ParseError/ParseErrorFormatter.mjs +0 -2
  80. package/_mjs/ParseError/PathFormatter.mjs +51 -80
  81. package/_mjs/ParseError/PathFormatter.mjs.map +1 -1
  82. package/_mjs/ParseError/TreeFormatter.mjs +62 -94
  83. package/_mjs/ParseError/TreeFormatter.mjs.map +1 -1
  84. package/_mjs/ParseError.mjs +5 -6
  85. package/_mjs/ParseResult.mjs +13 -9
  86. package/_mjs/ParseResult.mjs.map +1 -1
  87. package/_mjs/Parser/api.mjs +43 -39
  88. package/_mjs/Parser/api.mjs.map +1 -1
  89. package/_mjs/Parser/definition.mjs +12 -8
  90. package/_mjs/Parser/definition.mjs.map +1 -1
  91. package/_mjs/Parser/interpreter.mjs +262 -348
  92. package/_mjs/Parser/interpreter.mjs.map +1 -1
  93. package/_mjs/Parser.mjs +4 -5
  94. package/_mjs/Schema/api/conc.mjs +41 -45
  95. package/_mjs/Schema/api/conc.mjs.map +1 -1
  96. package/_mjs/Schema/api/either.mjs +55 -61
  97. package/_mjs/Schema/api/either.mjs.map +1 -1
  98. package/_mjs/Schema/api/hashMap.mjs +61 -71
  99. package/_mjs/Schema/api/hashMap.mjs.map +1 -1
  100. package/_mjs/Schema/api/hashSet.mjs +53 -56
  101. package/_mjs/Schema/api/hashSet.mjs.map +1 -1
  102. package/_mjs/Schema/api/list.mjs +50 -53
  103. package/_mjs/Schema/api/list.mjs.map +1 -1
  104. package/_mjs/Schema/api/map.mjs +59 -69
  105. package/_mjs/Schema/api/map.mjs.map +1 -1
  106. package/_mjs/Schema/api/maybe.mjs +34 -36
  107. package/_mjs/Schema/api/maybe.mjs.map +1 -1
  108. package/_mjs/Schema/api/set.mjs +47 -48
  109. package/_mjs/Schema/api/set.mjs.map +1 -1
  110. package/_mjs/Schema/api.mjs +304 -346
  111. package/_mjs/Schema/api.mjs.map +1 -1
  112. package/_mjs/Schema/definition.mjs +21 -17
  113. package/_mjs/Schema/definition.mjs.map +1 -1
  114. package/_mjs/Schema/derivations.mjs +71 -90
  115. package/_mjs/Schema/derivations.mjs.map +1 -1
  116. package/_mjs/Schema.mjs +12 -15
  117. package/_mjs/Show.mjs +79 -139
  118. package/_mjs/Show.mjs.map +1 -1
  119. package/_mjs/global.mjs +0 -2
  120. package/_mjs/index.mjs +0 -2
  121. package/_mjs/utils.mjs +35 -37
  122. package/_mjs/utils.mjs.map +1 -1
  123. package/package.json +7 -3
  124. package/_cjs/ParseError/ParseErrorFormatter.cjs.map +0 -1
  125. package/_cjs/ParseError.cjs.map +0 -1
  126. package/_cjs/Parser.cjs.map +0 -1
  127. package/_cjs/Schema.cjs.map +0 -1
  128. package/_cjs/global.cjs.map +0 -1
  129. package/_cjs/index.cjs.map +0 -1
  130. package/_mjs/ParseError/ParseErrorFormatter.mjs.map +0 -1
  131. package/_mjs/ParseError.mjs.map +0 -1
  132. package/_mjs/Parser.mjs.map +0 -1
  133. package/_mjs/Schema.mjs.map +0 -1
  134. package/_mjs/global.mjs.map +0 -1
  135. package/_mjs/index.mjs.map +0 -1
package/_cjs/AST.cjs CHANGED
@@ -1,1371 +1,1238 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.anyKeyword = exports.VoidKeyword = exports.Validation = exports.UnknownKeyword = exports.UniqueSymbol = exports.Union = exports.UndefinedKeyword = exports.TypeLiteral = exports.Tuple = exports.Transform = exports.TemplateLiteralSpan = exports.TemplateLiteral = exports.SymbolKeyword = exports.StringKeyword = exports.Refinement = exports.PropertySignature = exports.ObjectKeyword = exports.NumberKeyword = exports.NeverKeyword = exports.Literal = exports.Lazy = exports.IndexSignature = exports.Enum = exports.Element = exports.Declaration = exports.BooleanKeyword = exports.BigIntKeyword = exports.AnyKeyword = exports.Annotated = exports.ASTTypeId = exports.AST = void 0;
7
- exports.appendElement = appendElement;
8
- exports.appendRestElement = appendRestElement;
9
- exports.booleanKeyword = exports.bigIntKeyword = void 0;
10
- exports.combineAnnotations = combineAnnotations;
11
- exports.concrete = concrete;
12
- exports.createDeclaration = createDeclaration;
13
- exports.createElement = void 0;
14
- exports.createEnum = createEnum;
15
- exports.createIndexSignature = void 0;
16
- exports.createKey = createKey;
17
- exports.createPropertySignature = exports.createLiteral = exports.createLazy = void 0;
18
- exports.createRecord = createRecord;
19
- exports.createTemplateLiteral = exports.createRefinement = void 0;
20
- exports.createTransform = createTransform;
21
- exports.createUniqueSymbol = exports.createUnion = exports.createTypeLiteral = exports.createTuple = void 0;
22
- exports.createValidation = createValidation;
23
- exports.getAnnotations = getAnnotations;
24
- exports.getCardinality = getCardinality;
25
- exports.getCompiler = getCompiler;
26
- exports.getFormattedExpected = getFormattedExpected;
27
- exports.getFrom = void 0;
28
- exports.getLiterals = getLiterals;
29
- exports.getParameter = getParameter;
30
- exports.getPropertySignatures = void 0;
31
- exports.getSearchTree = getSearchTree;
32
- exports.getTo = void 0;
33
- exports.getWeight = getWeight;
34
- exports.isAST = isAST;
35
- exports.isBigIntKeyword = isBigIntKeyword;
36
- exports.isBooleanKeyword = isBooleanKeyword;
37
- exports.isDeclaration = isDeclaration;
38
- exports.isLazy = isLazy;
39
- exports.isNumberKeyword = exports.isLiteral = void 0;
40
- exports.isRefinement = isRefinement;
41
- exports.isSymbolKeyword = exports.isStringKeyword = void 0;
42
- exports.isTypeLiteral = isTypeLiteral;
43
- exports.isUnion = isUnion;
44
- exports.isUniqueSymbol = void 0;
45
- exports.keyof = keyof;
46
- exports.objectKeyword = exports.numberKeyword = exports.neverKeyword = exports.keysOf = void 0;
47
- exports.omit = omit;
48
- exports.partial = void 0;
49
- exports.pick = pick;
50
- exports.setAnnotation = setAnnotation;
51
- exports.voidKeyword = exports.unknownRecord = exports.unknownKeyword = exports.unknownArray = exports.undefinedKeyword = exports.symbolKeyword = exports.stringKeyword = void 0;
52
- var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Equatable/definition"));
53
- var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/Show"));
54
- var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/util/predicates"));
55
- var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ASTAnnotation"));
56
- var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/definition"));
57
- var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/api"));
58
- var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
59
- var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseResult"));
60
- var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseError/ParseError"));
61
- var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/number/instances"));
62
- var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api/contramap"));
63
- var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api"));
64
- var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api/max"));
65
- var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/Iterable/api"));
66
- var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
67
- var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
68
- var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/internal"));
69
- var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/api"));
70
- var _Showable = /*#__PURE__*/require("@fncts/base/data/Showable");
71
- var _utils = /*#__PURE__*/require("@fncts/schema/utils");
72
- var _ASTAnnotationMap = /*#__PURE__*/require("./ASTAnnotationMap.cjs");
73
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_chunk = require("./chunk.cjs");
3
+ const require_ASTAnnotationMap = require("./ASTAnnotationMap.cjs");
4
+ let _fncts_base_collection_immutable_Vector_api = require("@fncts/base/collection/immutable/Vector/api");
5
+ _fncts_base_collection_immutable_Vector_api = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_api, 1);
6
+ let _fncts_base_data_Showable = require("@fncts/base/data/Showable");
7
+ let _fncts_base_data_Maybe_api = require("@fncts/base/data/Maybe/api");
8
+ _fncts_base_data_Maybe_api = require_chunk.__toESM(_fncts_base_data_Maybe_api, 1);
9
+ let _fncts_base_data_Maybe_constructors = require("@fncts/base/data/Maybe/constructors");
10
+ _fncts_base_data_Maybe_constructors = require_chunk.__toESM(_fncts_base_data_Maybe_constructors, 1);
11
+ let _fncts_base_data_Maybe_destructors = require("@fncts/base/data/Maybe/destructors");
12
+ _fncts_base_data_Maybe_destructors = require_chunk.__toESM(_fncts_base_data_Maybe_destructors, 1);
13
+ let _fncts_schema_utils = require("@fncts/schema/utils");
14
+ let _fncts_schema_ASTAnnotation = require("@fncts/schema/ASTAnnotation");
15
+ _fncts_schema_ASTAnnotation = require_chunk.__toESM(_fncts_schema_ASTAnnotation, 1);
16
+ let _fncts_schema_ParseResult = require("@fncts/schema/ParseResult");
17
+ _fncts_schema_ParseResult = require_chunk.__toESM(_fncts_schema_ParseResult, 1);
18
+ let _fncts_base_data_Maybe_definition = require("@fncts/base/data/Maybe/definition");
19
+ _fncts_base_data_Maybe_definition = require_chunk.__toESM(_fncts_base_data_Maybe_definition, 1);
20
+ let _fncts_base_data_Equatable_definition = require("@fncts/base/data/Equatable/definition");
21
+ _fncts_base_data_Equatable_definition = require_chunk.__toESM(_fncts_base_data_Equatable_definition, 1);
22
+ let _fncts_schema_Show = require("@fncts/schema/Show");
23
+ _fncts_schema_Show = require_chunk.__toESM(_fncts_schema_Show, 1);
24
+ let _fncts_base_util_predicates = require("@fncts/base/util/predicates");
25
+ _fncts_base_util_predicates = require_chunk.__toESM(_fncts_base_util_predicates, 1);
26
+ let _fncts_base_collection_immutable_Vector_definition = require("@fncts/base/collection/immutable/Vector/definition");
27
+ _fncts_base_collection_immutable_Vector_definition = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_definition, 1);
28
+ let _fncts_schema_ParseError_ParseError = require("@fncts/schema/ParseError/ParseError");
29
+ _fncts_schema_ParseError_ParseError = require_chunk.__toESM(_fncts_schema_ParseError_ParseError, 1);
30
+ let _fncts_base_data_number_instances = require("@fncts/base/data/number/instances");
31
+ _fncts_base_data_number_instances = require_chunk.__toESM(_fncts_base_data_number_instances, 1);
32
+ let _fncts_base_data_Ord_api_contramap = require("@fncts/base/data/Ord/api/contramap");
33
+ _fncts_base_data_Ord_api_contramap = require_chunk.__toESM(_fncts_base_data_Ord_api_contramap, 1);
34
+ let _fncts_base_data_Ord_api = require("@fncts/base/data/Ord/api");
35
+ _fncts_base_data_Ord_api = require_chunk.__toESM(_fncts_base_data_Ord_api, 1);
36
+ let _fncts_base_data_Ord_api_max = require("@fncts/base/data/Ord/api/max");
37
+ _fncts_base_data_Ord_api_max = require_chunk.__toESM(_fncts_base_data_Ord_api_max, 1);
38
+ let _fncts_base_collection_Iterable_api = require("@fncts/base/collection/Iterable/api");
39
+ _fncts_base_collection_Iterable_api = require_chunk.__toESM(_fncts_base_collection_Iterable_api, 1);
40
+ let _fncts_base_collection_immutable_Vector_internal = require("@fncts/base/collection/immutable/Vector/internal");
41
+ _fncts_base_collection_immutable_Vector_internal = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_internal, 1);
42
+ //#region build/esm/AST.js
74
43
  const fileName_1 = "(@fncts/schema) src/AST.ts";
75
- const createLiteral = exports.createLiteral = createLiteral_1;
76
- const isLiteral = exports.isLiteral = isLiteral_1;
77
- const createUniqueSymbol = exports.createUniqueSymbol = createUniqueSymbol_1;
78
- const isUniqueSymbol = exports.isUniqueSymbol = isUniqueSymbol_1;
79
- const isStringKeyword = exports.isStringKeyword = isStringKeyword_1;
80
- const isNumberKeyword = exports.isNumberKeyword = isNumberKeyword_1;
81
- const isSymbolKeyword = exports.isSymbolKeyword = isSymbolKeyword_1;
82
- const createTemplateLiteral = exports.createTemplateLiteral = createTemplateLiteral_1;
83
- const createElement = exports.createElement = createElement_1;
84
- const createTuple = exports.createTuple = createTuple_1;
85
- const createPropertySignature = exports.createPropertySignature = createPropertySignature_1;
86
- const createIndexSignature = exports.createIndexSignature = createIndexSignature_1;
87
- const createTypeLiteral = exports.createTypeLiteral = createTypeLiteral_1;
88
- const createUnion = exports.createUnion = createUnion_1;
89
- const createLazy = exports.createLazy = createLazy_1;
90
- const createRefinement = exports.createRefinement = createRefinement_1;
91
- const getPropertySignatures = exports.getPropertySignatures = getPropertySignatures_1;
92
- const keysOf = exports.keysOf = keysOf_1;
93
- const partial = exports.partial = partial_1;
94
- const getFrom = exports.getFrom = getFrom_1;
95
- const getTo = exports.getTo = getTo_1;
96
- const ASTTypeId = exports.ASTTypeId = /*#__PURE__*/Symbol.for("fncts.schema.AST");
97
- class Annotated {
98
- annotations = _ASTAnnotationMap.ASTAnnotationMap.empty;
99
- }
44
+ const createLiteral = createLiteral_1;
45
+ const isLiteral = isLiteral_1;
46
+ const createUniqueSymbol = createUniqueSymbol_1;
47
+ const isUniqueSymbol = isUniqueSymbol_1;
48
+ const isStringKeyword = isStringKeyword_1;
49
+ const isNumberKeyword = isNumberKeyword_1;
50
+ const isSymbolKeyword = isSymbolKeyword_1;
51
+ const createTemplateLiteral = createTemplateLiteral_1;
52
+ const createElement = createElement_1;
53
+ const createTuple = createTuple_1;
54
+ const createPropertySignature = createPropertySignature_1;
55
+ const createIndexSignature = createIndexSignature_1;
56
+ const createTypeLiteral = createTypeLiteral_1;
57
+ const createUnion = createUnion_1;
58
+ const createLazy = createLazy_1;
59
+ const createRefinement = createRefinement_1;
60
+ const getPropertySignatures = getPropertySignatures_1;
61
+ const keysOf = keysOf_1;
62
+ const partial = partial_1;
63
+ const getFrom = getFrom_1;
64
+ const getTo = getTo_1;
65
+ const ASTTypeId = Symbol.for("fncts.schema.AST");
66
+ var Annotated = class {
67
+ annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty;
68
+ };
100
69
  /**
101
- * @tsplus type fncts.schema.AST
102
- * @tsplus companion fncts.schema.ASTOps
103
- */
104
- exports.Annotated = Annotated;
105
- class AST extends Annotated {
106
- [ASTTypeId] = ASTTypeId;
107
- toString(verbose = false) {
108
- return tsplus_module_2.showAST(verbose)(this);
109
- }
110
- }
70
+ * @tsplus type fncts.schema.AST
71
+ * @tsplus companion fncts.schema.ASTOps
72
+ */
73
+ var AST = class extends Annotated {
74
+ [ASTTypeId] = ASTTypeId;
75
+ toString(verbose = false) {
76
+ return _fncts_schema_Show.showAST(verbose)(this);
77
+ }
78
+ };
111
79
  /**
112
- * @tsplus static fncts.schema.ASTOps concrete
113
- * @tsplus macro remove
114
- */
115
- exports.AST = AST;
116
- function concrete(_) {
117
- //
118
- }
80
+ * @tsplus static fncts.schema.ASTOps concrete
81
+ * @tsplus macro remove
82
+ */
83
+ function concrete(_) {}
119
84
  function isAST(u) {
120
- return tsplus_module_3.isObject(u) && ASTTypeId in u;
85
+ return _fncts_base_util_predicates.isObject(u) && ASTTypeId in u;
121
86
  }
122
87
  function hasTag(u, tag) {
123
- return isAST(u) && u._tag === tag;
88
+ return isAST(u) && u._tag === tag;
124
89
  }
125
90
  function getAnnotations(key) {
126
- return self => {
127
- return self.annotations.get(key);
128
- };
91
+ return (self) => {
92
+ return self.annotations.get(key);
93
+ };
129
94
  }
130
- /*
131
- * Declaration
132
- */
133
95
  /**
134
- * @tsplus type fncts.schema.AST.Declaration
135
- */
136
- class Declaration extends AST {
137
- typeParameters;
138
- decode;
139
- encode;
140
- annotations;
141
- _tag = 0 /* ASTTag.Declaration */;
142
- constructor(typeParameters, decode, encode, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
143
- super();
144
- this.typeParameters = typeParameters;
145
- this.decode = decode;
146
- this.encode = encode;
147
- this.annotations = annotations;
148
- }
149
- clone(newProperties) {
150
- return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
151
- }
152
- [tsplus_module_1.equalsSymbol](that, context) {
153
- return hasTag(that, 0 /* ASTTag.Declaration */) && context.comparator(this.typeParameters, that.typeParameters) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
154
- }
155
- }
96
+ * @tsplus type fncts.schema.AST.Declaration
97
+ */
98
+ var Declaration = class Declaration extends AST {
99
+ typeParameters;
100
+ decode;
101
+ encode;
102
+ annotations;
103
+ _tag = 0;
104
+ constructor(typeParameters, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
105
+ super();
106
+ this.typeParameters = typeParameters;
107
+ this.decode = decode;
108
+ this.encode = encode;
109
+ this.annotations = annotations;
110
+ }
111
+ clone(newProperties) {
112
+ return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
113
+ }
114
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
115
+ return hasTag(that, 0) && context.comparator(this.typeParameters, that.typeParameters) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
116
+ }
117
+ };
156
118
  /**
157
- * @tsplus static fncts.schema.ASTOps createDeclaration
158
- */
159
- exports.Declaration = Declaration;
160
- function createDeclaration(typeParameters, decode, encode, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
161
- return new Declaration(typeParameters, decode, encode, annotations);
119
+ * @tsplus static fncts.schema.ASTOps createDeclaration
120
+ */
121
+ function createDeclaration(typeParameters, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
122
+ return new Declaration(typeParameters, decode, encode, annotations);
162
123
  }
163
124
  /**
164
- * @tsplus fluent fncts.schema.AST isDeclaration
165
- */
125
+ * @tsplus fluent fncts.schema.AST isDeclaration
126
+ */
166
127
  function isDeclaration(self) {
167
- void 0;
168
- return self._tag === 0 /* ASTTag.Declaration */;
169
- }
170
- class Literal extends AST {
171
- literal;
172
- annotations;
173
- _tag = 1 /* ASTTag.Literal */;
174
- constructor(literal, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
175
- super();
176
- this.literal = literal;
177
- this.annotations = annotations;
178
- }
179
- clone(newProperties) {
180
- return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);
181
- }
182
- [tsplus_module_1.equalsSymbol](that, context) {
183
- return hasTag(that, 1 /* ASTTag.Literal */) && context.comparator(this.literal, that.literal) && context.comparator(this.annotations, that.annotations);
184
- }
185
- }
128
+ return self._tag === 0;
129
+ }
130
+ var Literal = class Literal extends AST {
131
+ literal;
132
+ annotations;
133
+ _tag = 1;
134
+ constructor(literal, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
135
+ super();
136
+ this.literal = literal;
137
+ this.annotations = annotations;
138
+ }
139
+ clone(newProperties) {
140
+ return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);
141
+ }
142
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
143
+ return hasTag(that, 1) && context.comparator(this.literal, that.literal) && context.comparator(this.annotations, that.annotations);
144
+ }
145
+ };
186
146
  /**
187
- * @tsplus static fncts.schema.ASTOps createLiteral
188
- */
189
- exports.Literal = Literal;
190
- function createLiteral_1(literal, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
191
- return new Literal(literal, annotations);
147
+ * @tsplus static fncts.schema.ASTOps createLiteral
148
+ */
149
+ function createLiteral_1(literal, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
150
+ return new Literal(literal, annotations);
192
151
  }
193
152
  /**
194
- * @tsplus fluent fncts.schema.AST isLiteral
195
- */
153
+ * @tsplus fluent fncts.schema.AST isLiteral
154
+ */
196
155
  function isLiteral_1(self) {
197
- void 0;
198
- return self._tag === 1 /* ASTTag.Literal */;
199
- }
200
- /*
201
- * UniqueSymbol
202
- */
203
- class UniqueSymbol extends AST {
204
- symbol;
205
- annotations;
206
- _tag = 2 /* ASTTag.UniqueSymbol */;
207
- constructor(symbol, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
208
- super();
209
- this.symbol = symbol;
210
- this.annotations = annotations;
211
- }
212
- clone(newProperties) {
213
- return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);
214
- }
215
- [tsplus_module_1.equalsSymbol](that, context) {
216
- return hasTag(that, 2 /* ASTTag.UniqueSymbol */) && context.comparator(this.symbol, that.symbol) && context.comparator(this.annotations, that.annotations);
217
- }
218
- }
156
+ return self._tag === 1;
157
+ }
158
+ var UniqueSymbol = class UniqueSymbol extends AST {
159
+ symbol;
160
+ annotations;
161
+ _tag = 2;
162
+ constructor(symbol, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
163
+ super();
164
+ this.symbol = symbol;
165
+ this.annotations = annotations;
166
+ }
167
+ clone(newProperties) {
168
+ return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);
169
+ }
170
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
171
+ return hasTag(that, 2) && context.comparator(this.symbol, that.symbol) && context.comparator(this.annotations, that.annotations);
172
+ }
173
+ };
219
174
  /**
220
- * @tsplus static fncts.schema.ASTOps createUniqueSymbol
221
- */
222
- exports.UniqueSymbol = UniqueSymbol;
223
- function createUniqueSymbol_1(symbol, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
224
- return new UniqueSymbol(symbol, annotations);
175
+ * @tsplus static fncts.schema.ASTOps createUniqueSymbol
176
+ */
177
+ function createUniqueSymbol_1(symbol, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
178
+ return new UniqueSymbol(symbol, annotations);
225
179
  }
226
180
  /**
227
- * @tsplus fluent fncts.schema.AST isUniqueSymbol
228
- */
181
+ * @tsplus fluent fncts.schema.AST isUniqueSymbol
182
+ */
229
183
  function isUniqueSymbol_1(self) {
230
- void 0;
231
- return self._tag === 2 /* ASTTag.UniqueSymbol */;
232
- }
233
- /*
234
- * UndefinedKeyword
235
- */
236
- class UndefinedKeyword extends AST {
237
- annotations;
238
- _tag = 3 /* ASTTag.UndefinedKeyword */;
239
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
240
- super();
241
- this.annotations = annotations;
242
- }
243
- clone(newProperties) {
244
- return new UndefinedKeyword(newProperties.annotations ?? this.annotations);
245
- }
246
- [tsplus_module_1.equalsSymbol](that, context) {
247
- return hasTag(that, 3 /* ASTTag.UndefinedKeyword */) && context.comparator(this.annotations, that.annotations);
248
- }
249
- }
184
+ return self._tag === 2;
185
+ }
186
+ var UndefinedKeyword = class UndefinedKeyword extends AST {
187
+ annotations;
188
+ _tag = 3;
189
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
190
+ super();
191
+ this.annotations = annotations;
192
+ }
193
+ clone(newProperties) {
194
+ return new UndefinedKeyword(newProperties.annotations ?? this.annotations);
195
+ }
196
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
197
+ return hasTag(that, 3) && context.comparator(this.annotations, that.annotations);
198
+ }
199
+ };
250
200
  /**
251
- * @tsplus static fncts.schema.ASTOps undefinedKeyword
252
- */
253
- exports.UndefinedKeyword = UndefinedKeyword;
254
- const undefinedKeyword_1 = /*#__PURE__*/new UndefinedKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "undefined"));
255
- const undefinedKeyword = exports.undefinedKeyword = undefinedKeyword_1;
256
- /*
257
- * VoidKeyword
258
- */
259
- class VoidKeyword extends AST {
260
- annotations;
261
- _tag = 4 /* ASTTag.VoidKeyword */;
262
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
263
- super();
264
- this.annotations = annotations;
265
- }
266
- clone(newProperties) {
267
- return new VoidKeyword(newProperties.annotations ?? this.annotations);
268
- }
269
- [tsplus_module_1.equalsSymbol](that, context) {
270
- return hasTag(that, 4 /* ASTTag.VoidKeyword */) && context.comparator(this.annotations, that.annotations);
271
- }
272
- }
201
+ * @tsplus static fncts.schema.ASTOps undefinedKeyword
202
+ */
203
+ const undefinedKeyword_1 = new UndefinedKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "undefined"));
204
+ const undefinedKeyword = undefinedKeyword_1;
205
+ var VoidKeyword = class VoidKeyword extends AST {
206
+ annotations;
207
+ _tag = 4;
208
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
209
+ super();
210
+ this.annotations = annotations;
211
+ }
212
+ clone(newProperties) {
213
+ return new VoidKeyword(newProperties.annotations ?? this.annotations);
214
+ }
215
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
216
+ return hasTag(that, 4) && context.comparator(this.annotations, that.annotations);
217
+ }
218
+ };
273
219
  /**
274
- * @tsplus static fncts.schema.ASTOps voidKeyword
275
- */
276
- exports.VoidKeyword = VoidKeyword;
277
- const voidKeyword = exports.voidKeyword = /*#__PURE__*/new VoidKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "void"));
278
- /*
279
- * NeverKeyword
280
- */
281
- class NeverKeyword extends AST {
282
- annotations;
283
- _tag = 5 /* ASTTag.NeverKeyword */;
284
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
285
- super();
286
- this.annotations = annotations;
287
- }
288
- clone(newProperties) {
289
- return new NeverKeyword(newProperties.annotations ?? this.annotations);
290
- }
291
- [tsplus_module_1.equalsSymbol](that, context) {
292
- return hasTag(that, 5 /* ASTTag.NeverKeyword */) && context.comparator(this.annotations, that.annotations);
293
- }
294
- }
220
+ * @tsplus static fncts.schema.ASTOps voidKeyword
221
+ */
222
+ const voidKeyword = new VoidKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "void"));
223
+ var NeverKeyword = class NeverKeyword extends AST {
224
+ annotations;
225
+ _tag = 5;
226
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
227
+ super();
228
+ this.annotations = annotations;
229
+ }
230
+ clone(newProperties) {
231
+ return new NeverKeyword(newProperties.annotations ?? this.annotations);
232
+ }
233
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
234
+ return hasTag(that, 5) && context.comparator(this.annotations, that.annotations);
235
+ }
236
+ };
295
237
  /**
296
- * @tsplus static fncts.schema.ASTOps neverKeyword
297
- */
298
- exports.NeverKeyword = NeverKeyword;
299
- const neverKeyword_1 = /*#__PURE__*/new NeverKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "never"));
300
- const neverKeyword = exports.neverKeyword = neverKeyword_1;
301
- /*
302
- * UnknownKeyword
303
- */
304
- class UnknownKeyword extends AST {
305
- annotations;
306
- _tag = 6 /* ASTTag.UnknownKeyword */;
307
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
308
- super();
309
- this.annotations = annotations;
310
- }
311
- clone(newProperties) {
312
- return new UnknownKeyword(newProperties.annotations ?? this.annotations);
313
- }
314
- [tsplus_module_1.equalsSymbol](that, context) {
315
- return hasTag(that, 6 /* ASTTag.UnknownKeyword */) && context.comparator(this.annotations, that.annotations);
316
- }
317
- }
238
+ * @tsplus static fncts.schema.ASTOps neverKeyword
239
+ */
240
+ const neverKeyword_1 = new NeverKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "never"));
241
+ const neverKeyword = neverKeyword_1;
242
+ var UnknownKeyword = class UnknownKeyword extends AST {
243
+ annotations;
244
+ _tag = 6;
245
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
246
+ super();
247
+ this.annotations = annotations;
248
+ }
249
+ clone(newProperties) {
250
+ return new UnknownKeyword(newProperties.annotations ?? this.annotations);
251
+ }
252
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
253
+ return hasTag(that, 6) && context.comparator(this.annotations, that.annotations);
254
+ }
255
+ };
318
256
  /**
319
- * @tsplus static fncts.schema.ASTOps unknownKeyword
320
- */
321
- exports.UnknownKeyword = UnknownKeyword;
322
- const unknownKeyword_1 = /*#__PURE__*/new UnknownKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "unknown"));
323
- const unknownKeyword = exports.unknownKeyword = unknownKeyword_1;
324
- /*
325
- * AnyKeyword
326
- */
327
- class AnyKeyword extends AST {
328
- annotations;
329
- _tag = 7 /* ASTTag.AnyKeyword */;
330
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
331
- super();
332
- this.annotations = annotations;
333
- }
334
- clone(newProperties) {
335
- return new AnyKeyword(newProperties.annotations ?? this.annotations);
336
- }
337
- [tsplus_module_1.equalsSymbol](that, context) {
338
- return hasTag(that, 7 /* ASTTag.AnyKeyword */) && context.comparator(this.annotations, that.annotations);
339
- }
340
- }
257
+ * @tsplus static fncts.schema.ASTOps unknownKeyword
258
+ */
259
+ const unknownKeyword_1 = new UnknownKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "unknown"));
260
+ const unknownKeyword = unknownKeyword_1;
261
+ var AnyKeyword = class AnyKeyword extends AST {
262
+ annotations;
263
+ _tag = 7;
264
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
265
+ super();
266
+ this.annotations = annotations;
267
+ }
268
+ clone(newProperties) {
269
+ return new AnyKeyword(newProperties.annotations ?? this.annotations);
270
+ }
271
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
272
+ return hasTag(that, 7) && context.comparator(this.annotations, that.annotations);
273
+ }
274
+ };
341
275
  /**
342
- * @tsplus static fncts.schema.ASTOps anyKeyword
343
- */
344
- exports.AnyKeyword = AnyKeyword;
345
- const anyKeyword = exports.anyKeyword = /*#__PURE__*/new AnyKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "any"));
346
- /*
347
- * StringKeyword
348
- */
349
- class StringKeyword extends AST {
350
- annotations;
351
- _tag = 8 /* ASTTag.StringKeyword */;
352
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
353
- super();
354
- this.annotations = annotations;
355
- }
356
- clone(newProperties) {
357
- return new StringKeyword(newProperties.annotations ?? this.annotations);
358
- }
359
- [tsplus_module_1.equalsSymbol](that, context) {
360
- return hasTag(that, 8 /* ASTTag.StringKeyword */) && context.comparator(this.annotations, that.annotations);
361
- }
362
- }
276
+ * @tsplus static fncts.schema.ASTOps anyKeyword
277
+ */
278
+ const anyKeyword = new AnyKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "any"));
279
+ var StringKeyword = class StringKeyword extends AST {
280
+ annotations;
281
+ _tag = 8;
282
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
283
+ super();
284
+ this.annotations = annotations;
285
+ }
286
+ clone(newProperties) {
287
+ return new StringKeyword(newProperties.annotations ?? this.annotations);
288
+ }
289
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
290
+ return hasTag(that, 8) && context.comparator(this.annotations, that.annotations);
291
+ }
292
+ };
363
293
  /**
364
- * @tsplus static fncts.schema.ASTOps stringKeyword
365
- */
366
- exports.StringKeyword = StringKeyword;
367
- const stringKeyword_1 = /*#__PURE__*/new StringKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "string"));
368
- const stringKeyword = exports.stringKeyword = stringKeyword_1;
294
+ * @tsplus static fncts.schema.ASTOps stringKeyword
295
+ */
296
+ const stringKeyword_1 = new StringKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "string"));
297
+ const stringKeyword = stringKeyword_1;
369
298
  /**
370
- * @tsplus fluent fncts.schema.AST isStringKeyword
371
- */
299
+ * @tsplus fluent fncts.schema.AST isStringKeyword
300
+ */
372
301
  function isStringKeyword_1(self) {
373
- void 0;
374
- return self._tag === 8 /* ASTTag.StringKeyword */;
375
- }
376
- /*
377
- * NumberKeyword
378
- */
379
- class NumberKeyword extends AST {
380
- annotations;
381
- _tag = 9 /* ASTTag.NumberKeyword */;
382
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
383
- super();
384
- this.annotations = annotations;
385
- }
386
- clone(newProperties) {
387
- return new NumberKeyword(newProperties.annotations ?? this.annotations);
388
- }
389
- [tsplus_module_1.equalsSymbol](that, context) {
390
- return hasTag(that, 9 /* ASTTag.NumberKeyword */) && context.comparator(this.annotations, that.annotations);
391
- }
392
- }
302
+ return self._tag === 8;
303
+ }
304
+ var NumberKeyword = class NumberKeyword extends AST {
305
+ annotations;
306
+ _tag = 9;
307
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
308
+ super();
309
+ this.annotations = annotations;
310
+ }
311
+ clone(newProperties) {
312
+ return new NumberKeyword(newProperties.annotations ?? this.annotations);
313
+ }
314
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
315
+ return hasTag(that, 9) && context.comparator(this.annotations, that.annotations);
316
+ }
317
+ };
393
318
  /**
394
- * @tsplus static fncts.schema.ASTOps numberKeyword
395
- */
396
- exports.NumberKeyword = NumberKeyword;
397
- const numberKeyword_1 = /*#__PURE__*/new NumberKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "number"));
398
- const numberKeyword = exports.numberKeyword = numberKeyword_1;
319
+ * @tsplus static fncts.schema.ASTOps numberKeyword
320
+ */
321
+ const numberKeyword_1 = new NumberKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "number"));
322
+ const numberKeyword = numberKeyword_1;
399
323
  /**
400
- * @tsplus fluent fncts.schema.AST isNumberKeyword
401
- */
324
+ * @tsplus fluent fncts.schema.AST isNumberKeyword
325
+ */
402
326
  function isNumberKeyword_1(self) {
403
- void 0;
404
- return self._tag === 9 /* ASTTag.NumberKeyword */;
405
- }
406
- /*
407
- * BooleanKeyword
408
- */
409
- class BooleanKeyword extends AST {
410
- annotations;
411
- _tag = 10 /* ASTTag.BooleanKeyword */;
412
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
413
- super();
414
- this.annotations = annotations;
415
- }
416
- clone(newProperties) {
417
- return new BooleanKeyword(newProperties.annotations ?? this.annotations);
418
- }
419
- [tsplus_module_1.equalsSymbol](that, context) {
420
- return hasTag(that, 10 /* ASTTag.BooleanKeyword */) && context.comparator(this.annotations, that.annotations);
421
- }
422
- }
327
+ return self._tag === 9;
328
+ }
329
+ var BooleanKeyword = class BooleanKeyword extends AST {
330
+ annotations;
331
+ _tag = 10;
332
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
333
+ super();
334
+ this.annotations = annotations;
335
+ }
336
+ clone(newProperties) {
337
+ return new BooleanKeyword(newProperties.annotations ?? this.annotations);
338
+ }
339
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
340
+ return hasTag(that, 10) && context.comparator(this.annotations, that.annotations);
341
+ }
342
+ };
423
343
  /**
424
- * @tsplus static fncts.schema.ASTOps booleanKeyword
425
- */
426
- exports.BooleanKeyword = BooleanKeyword;
427
- const booleanKeyword = exports.booleanKeyword = /*#__PURE__*/new BooleanKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "boolean"));
344
+ * @tsplus static fncts.schema.ASTOps booleanKeyword
345
+ */
346
+ const booleanKeyword = new BooleanKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "boolean"));
428
347
  /**
429
- * @tsplus fluent fncts.schema.AST isBooleanKeyword
430
- */
348
+ * @tsplus fluent fncts.schema.AST isBooleanKeyword
349
+ */
431
350
  function isBooleanKeyword(self) {
432
- void 0;
433
- return self._tag === 10 /* ASTTag.BooleanKeyword */;
434
- }
435
- /*
436
- * BigIntKeyword
437
- */
438
- class BigIntKeyword extends AST {
439
- annotations;
440
- _tag = 11 /* ASTTag.BigIntKeyword */;
441
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
442
- super();
443
- this.annotations = annotations;
444
- }
445
- clone(newProperties) {
446
- return new BigIntKeyword(newProperties.annotations ?? this.annotations);
447
- }
448
- [tsplus_module_1.equalsSymbol](that, context) {
449
- return hasTag(that, 11 /* ASTTag.BigIntKeyword */) && context.comparator(this.annotations, that.annotations);
450
- }
451
- }
351
+ return self._tag === 10;
352
+ }
353
+ var BigIntKeyword = class BigIntKeyword extends AST {
354
+ annotations;
355
+ _tag = 11;
356
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
357
+ super();
358
+ this.annotations = annotations;
359
+ }
360
+ clone(newProperties) {
361
+ return new BigIntKeyword(newProperties.annotations ?? this.annotations);
362
+ }
363
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
364
+ return hasTag(that, 11) && context.comparator(this.annotations, that.annotations);
365
+ }
366
+ };
452
367
  /**
453
- * @tsplus static fncts.schema.ASTOps bigIntKeyword
454
- */
455
- exports.BigIntKeyword = BigIntKeyword;
456
- const bigIntKeyword = exports.bigIntKeyword = /*#__PURE__*/new BigIntKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "bigint"));
368
+ * @tsplus static fncts.schema.ASTOps bigIntKeyword
369
+ */
370
+ const bigIntKeyword = new BigIntKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "bigint"));
457
371
  /**
458
- * @tsplus fluent fncts.schema.AST isBigIntKeyword
459
- */
372
+ * @tsplus fluent fncts.schema.AST isBigIntKeyword
373
+ */
460
374
  function isBigIntKeyword(self) {
461
- void 0;
462
- return self._tag === 11 /* ASTTag.BigIntKeyword */;
463
- }
464
- /*
465
- * SymbolKeyword
466
- */
467
- class SymbolKeyword extends AST {
468
- annotations;
469
- _tag = 12 /* ASTTag.SymbolKeyword */;
470
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
471
- super();
472
- this.annotations = annotations;
473
- }
474
- clone(newProperties) {
475
- return new SymbolKeyword(newProperties.annotations ?? this.annotations);
476
- }
477
- [tsplus_module_1.equalsSymbol](that, context) {
478
- return hasTag(that, 12 /* ASTTag.SymbolKeyword */) && context.comparator(this.annotations, that.annotations);
479
- }
480
- }
375
+ return self._tag === 11;
376
+ }
377
+ var SymbolKeyword = class SymbolKeyword extends AST {
378
+ annotations;
379
+ _tag = 12;
380
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
381
+ super();
382
+ this.annotations = annotations;
383
+ }
384
+ clone(newProperties) {
385
+ return new SymbolKeyword(newProperties.annotations ?? this.annotations);
386
+ }
387
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
388
+ return hasTag(that, 12) && context.comparator(this.annotations, that.annotations);
389
+ }
390
+ };
481
391
  /**
482
- * @tsplus static fncts.schema.ASTOps symbolKeyword
483
- */
484
- exports.SymbolKeyword = SymbolKeyword;
485
- const symbolKeyword_1 = /*#__PURE__*/new SymbolKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "symbol"));
486
- const symbolKeyword = exports.symbolKeyword = symbolKeyword_1;
392
+ * @tsplus static fncts.schema.ASTOps symbolKeyword
393
+ */
394
+ const symbolKeyword_1 = new SymbolKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "symbol"));
395
+ const symbolKeyword = symbolKeyword_1;
487
396
  /**
488
- * @tsplus fluent fncts.schema.AST isSymbolKeyword
489
- */
397
+ * @tsplus fluent fncts.schema.AST isSymbolKeyword
398
+ */
490
399
  function isSymbolKeyword_1(self) {
491
- void 0;
492
- return self._tag === 12 /* ASTTag.SymbolKeyword */;
493
- }
494
- /*
495
- * ObjectKeyword
496
- */
497
- class ObjectKeyword extends AST {
498
- annotations;
499
- _tag = 13 /* ASTTag.ObjectKeyword */;
500
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
501
- super();
502
- this.annotations = annotations;
503
- }
504
- clone(newProperties) {
505
- return new ObjectKeyword(newProperties.annotations ?? this.annotations);
506
- }
507
- [tsplus_module_1.equalsSymbol](that, context) {
508
- return hasTag(that, 13 /* ASTTag.ObjectKeyword */) && context.comparator(this.annotations, that.annotations);
509
- }
510
- }
400
+ return self._tag === 12;
401
+ }
402
+ var ObjectKeyword = class ObjectKeyword extends AST {
403
+ annotations;
404
+ _tag = 13;
405
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
406
+ super();
407
+ this.annotations = annotations;
408
+ }
409
+ clone(newProperties) {
410
+ return new ObjectKeyword(newProperties.annotations ?? this.annotations);
411
+ }
412
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
413
+ return hasTag(that, 13) && context.comparator(this.annotations, that.annotations);
414
+ }
415
+ };
511
416
  /**
512
- * @tsplus static fncts.schema.ASTOps objectKeyword
513
- */
514
- exports.ObjectKeyword = ObjectKeyword;
515
- const objectKeyword = exports.objectKeyword = /*#__PURE__*/new ObjectKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_4.Title, "object"));
516
- /*
517
- * Enum
518
- */
519
- class Enum extends AST {
520
- enums;
521
- annotations;
522
- _tag = 14 /* ASTTag.Enum */;
523
- constructor(enums, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
524
- super();
525
- this.enums = enums;
526
- this.annotations = annotations;
527
- }
528
- clone(newProperties) {
529
- return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);
530
- }
531
- [tsplus_module_1.equalsSymbol](that, context) {
532
- return hasTag(that, 14 /* ASTTag.Enum */) && tsplus_module_5.corresponds(that.enums, ([leftName, leftValue], [rightName, rightValue]) => context.comparator(leftName, rightName) && context.comparator(leftValue, rightValue))(this.enums) && context.comparator(this.annotations, that.annotations);
533
- }
534
- }
417
+ * @tsplus static fncts.schema.ASTOps objectKeyword
418
+ */
419
+ const objectKeyword = new ObjectKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "object"));
420
+ var Enum = class Enum extends AST {
421
+ enums;
422
+ annotations;
423
+ _tag = 14;
424
+ constructor(enums, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
425
+ super();
426
+ this.enums = enums;
427
+ this.annotations = annotations;
428
+ }
429
+ clone(newProperties) {
430
+ return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);
431
+ }
432
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
433
+ return hasTag(that, 14) && _fncts_base_collection_immutable_Vector_definition.corresponds(that.enums, ([leftName, leftValue], [rightName, rightValue]) => context.comparator(leftName, rightName) && context.comparator(leftValue, rightValue))(this.enums) && context.comparator(this.annotations, that.annotations);
434
+ }
435
+ };
535
436
  /**
536
- * @tsplus static fncts.schema.ASTOps createEnum
537
- */
538
- exports.Enum = Enum;
539
- function createEnum(enums, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
540
- return new Enum(enums, annotations);
541
- }
542
- class TemplateLiteralSpan {
543
- type;
544
- literal;
545
- constructor(type, literal) {
546
- this.type = type;
547
- this.literal = literal;
548
- }
549
- [tsplus_module_1.equalsSymbol](that, context) {
550
- return that instanceof TemplateLiteralSpan && context.comparator(this.type, that.type) && context.comparator(this.literal, that.literal);
551
- }
552
- toString() {
553
- switch (this.type._tag) {
554
- case 8 /* ASTTag.StringKeyword */:
555
- return "${string}";
556
- case 9 /* ASTTag.NumberKeyword */:
557
- return "${number}";
558
- }
559
- }
560
- }
561
- /*
562
- * TemplateLiteral
563
- */
564
- exports.TemplateLiteralSpan = TemplateLiteralSpan;
565
- class TemplateLiteral extends AST {
566
- head;
567
- spans;
568
- annotations;
569
- _tag = 15 /* ASTTag.TemplateLiteral */;
570
- constructor(head, spans, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
571
- super();
572
- this.head = head;
573
- this.spans = spans;
574
- this.annotations = annotations;
575
- }
576
- clone(newProperties) {
577
- return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
578
- }
579
- [tsplus_module_1.equalsSymbol](that, context) {
580
- return hasTag(that, 15 /* ASTTag.TemplateLiteral */) && context.comparator(this.head, that.head) && context.comparator(this.spans, that.spans) && context.comparator(this.annotations, that.annotations);
581
- }
582
- }
437
+ * @tsplus static fncts.schema.ASTOps createEnum
438
+ */
439
+ function createEnum(enums, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
440
+ return new Enum(enums, annotations);
441
+ }
442
+ var TemplateLiteralSpan = class TemplateLiteralSpan {
443
+ type;
444
+ literal;
445
+ constructor(type, literal) {
446
+ this.type = type;
447
+ this.literal = literal;
448
+ }
449
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
450
+ return that instanceof TemplateLiteralSpan && context.comparator(this.type, that.type) && context.comparator(this.literal, that.literal);
451
+ }
452
+ toString() {
453
+ switch (this.type._tag) {
454
+ case 8: return "${string}";
455
+ case 9: return "${number}";
456
+ }
457
+ }
458
+ };
459
+ var TemplateLiteral = class extends AST {
460
+ head;
461
+ spans;
462
+ annotations;
463
+ _tag = 15;
464
+ constructor(head, spans, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
465
+ super();
466
+ this.head = head;
467
+ this.spans = spans;
468
+ this.annotations = annotations;
469
+ }
470
+ clone(newProperties) {
471
+ return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
472
+ }
473
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
474
+ return hasTag(that, 15) && context.comparator(this.head, that.head) && context.comparator(this.spans, that.spans) && context.comparator(this.annotations, that.annotations);
475
+ }
476
+ };
583
477
  /**
584
- * @tsplus static fncts.schema.ASTOps createTemplateLiteral
585
- */
586
- exports.TemplateLiteral = TemplateLiteral;
587
- function createTemplateLiteral_1(head, spans, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
588
- if (tsplus_module_6.isNonEmpty(spans)) {
589
- return new TemplateLiteral(head, spans, annotations);
590
- } else {
591
- return createLiteral_1(head, annotations);
592
- }
593
- }
594
- /*
595
- * Element
596
- */
597
- class Element {
598
- type;
599
- isOptional;
600
- constructor(type, isOptional) {
601
- this.type = type;
602
- this.isOptional = isOptional;
603
- }
604
- [tsplus_module_1.equalsSymbol](that, context) {
605
- return that instanceof Element && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional);
606
- }
607
- toString() {
608
- return String(this.type) + (this.isOptional ? "?" : "");
609
- }
610
- }
478
+ * @tsplus static fncts.schema.ASTOps createTemplateLiteral
479
+ */
480
+ function createTemplateLiteral_1(head, spans, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
481
+ if (_fncts_base_collection_immutable_Vector_api.isNonEmpty(spans)) return new TemplateLiteral(head, spans, annotations);
482
+ else return createLiteral_1(head, annotations);
483
+ }
484
+ var Element = class Element {
485
+ type;
486
+ isOptional;
487
+ constructor(type, isOptional) {
488
+ this.type = type;
489
+ this.isOptional = isOptional;
490
+ }
491
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
492
+ return that instanceof Element && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional);
493
+ }
494
+ toString() {
495
+ return String(this.type) + (this.isOptional ? "?" : "");
496
+ }
497
+ };
611
498
  /**
612
- * @tsplus static fncts.schema.ASTOps createElement
613
- */
614
- exports.Element = Element;
499
+ * @tsplus static fncts.schema.ASTOps createElement
500
+ */
615
501
  function createElement_1(type, isOptional) {
616
- return new Element(type, isOptional);
617
- }
618
- /*
619
- * Tuple
620
- */
621
- class Tuple extends AST {
622
- elements;
623
- rest;
624
- isReadonly;
625
- annotations;
626
- _tag = 16 /* ASTTag.Tuple */;
627
- constructor(elements, rest, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
628
- super();
629
- this.elements = elements;
630
- this.rest = rest;
631
- this.isReadonly = isReadonly;
632
- this.annotations = annotations;
633
- }
634
- clone(newProperties) {
635
- return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
636
- }
637
- [tsplus_module_1.equalsSymbol](that, context) {
638
- return hasTag(that, 16 /* ASTTag.Tuple */) && context.comparator(this.elements, that.elements) && context.comparator(this.rest, that.rest) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
639
- }
640
- }
502
+ return new Element(type, isOptional);
503
+ }
504
+ var Tuple = class Tuple extends AST {
505
+ elements;
506
+ rest;
507
+ isReadonly;
508
+ annotations;
509
+ _tag = 16;
510
+ constructor(elements, rest, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
511
+ super();
512
+ this.elements = elements;
513
+ this.rest = rest;
514
+ this.isReadonly = isReadonly;
515
+ this.annotations = annotations;
516
+ }
517
+ clone(newProperties) {
518
+ return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
519
+ }
520
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
521
+ return hasTag(that, 16) && context.comparator(this.elements, that.elements) && context.comparator(this.rest, that.rest) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
522
+ }
523
+ };
641
524
  /**
642
- * @tsplus static fncts.schema.ASTOps createTuple
643
- */
644
- exports.Tuple = Tuple;
645
- function createTuple_1(elements, rest, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
646
- return new Tuple(elements, rest, isReadonly, annotations);
525
+ * @tsplus static fncts.schema.ASTOps createTuple
526
+ */
527
+ function createTuple_1(elements, rest, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
528
+ return new Tuple(elements, rest, isReadonly, annotations);
647
529
  }
648
530
  /**
649
- * @tsplus static fncts.schema.ASTOps unknownArray
650
- */
651
- const unknownArray = exports.unknownArray = /*#__PURE__*/createTuple_1(/*#__PURE__*/tsplus_module_6.empty(), /*#__PURE__*/tsplus_module_7.just(/*#__PURE__*/tsplus_module_6.vector(unknownKeyword_1), fileName_1 + ":779:65"), true);
652
- /*
653
- * PropertySignature
654
- */
655
- class PropertySignature {
656
- name;
657
- type;
658
- isOptional;
659
- isReadonly;
660
- annotations;
661
- constructor(name, type, isOptional, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
662
- this.name = name;
663
- this.type = type;
664
- this.isOptional = isOptional;
665
- this.isReadonly = isReadonly;
666
- this.annotations = annotations;
667
- }
668
- clone(newProperties) {
669
- return new PropertySignature(newProperties.name ?? this.name, newProperties.type ?? this.type, newProperties.isOptional ?? this.isOptional, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
670
- }
671
- [tsplus_module_1.equalsSymbol](that, context) {
672
- return that instanceof PropertySignature && context.comparator(this.name, that.name) && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
673
- }
674
- }
531
+ * @tsplus static fncts.schema.ASTOps unknownArray
532
+ */
533
+ const unknownArray = createTuple_1(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(unknownKeyword_1), fileName_1 + ":779:65"), true);
534
+ var PropertySignature = class PropertySignature {
535
+ name;
536
+ type;
537
+ isOptional;
538
+ isReadonly;
539
+ annotations;
540
+ constructor(name, type, isOptional, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
541
+ this.name = name;
542
+ this.type = type;
543
+ this.isOptional = isOptional;
544
+ this.isReadonly = isReadonly;
545
+ this.annotations = annotations;
546
+ }
547
+ clone(newProperties) {
548
+ return new PropertySignature(newProperties.name ?? this.name, newProperties.type ?? this.type, newProperties.isOptional ?? this.isOptional, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
549
+ }
550
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
551
+ return that instanceof PropertySignature && context.comparator(this.name, that.name) && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
552
+ }
553
+ };
675
554
  /**
676
- * @tsplus static fncts.schema.ASTOps createPropertySignature
677
- */
678
- exports.PropertySignature = PropertySignature;
679
- function createPropertySignature_1(name, type, isOptional, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
680
- return new PropertySignature(name, type, isOptional, isReadonly, annotations);
681
- }
682
- /*
683
- * IndexSignature
684
- */
685
- class IndexSignature {
686
- parameter;
687
- type;
688
- isReadonly;
689
- constructor(parameter, type, isReadonly) {
690
- this.parameter = parameter;
691
- this.type = type;
692
- this.isReadonly = isReadonly;
693
- }
694
- [tsplus_module_1.equalsSymbol](that, context) {
695
- return that instanceof IndexSignature && context.comparator(this.parameter, that.parameter) && context.comparator(this.type, that.type) && context.comparator(this.isReadonly, that.isReadonly);
696
- }
697
- }
555
+ * @tsplus static fncts.schema.ASTOps createPropertySignature
556
+ */
557
+ function createPropertySignature_1(name, type, isOptional, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
558
+ return new PropertySignature(name, type, isOptional, isReadonly, annotations);
559
+ }
560
+ var IndexSignature = class IndexSignature {
561
+ parameter;
562
+ type;
563
+ isReadonly;
564
+ constructor(parameter, type, isReadonly) {
565
+ this.parameter = parameter;
566
+ this.type = type;
567
+ this.isReadonly = isReadonly;
568
+ }
569
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
570
+ return that instanceof IndexSignature && context.comparator(this.parameter, that.parameter) && context.comparator(this.type, that.type) && context.comparator(this.isReadonly, that.isReadonly);
571
+ }
572
+ };
698
573
  /**
699
- * @tsplus static fncts.schema.ASTOps createIndexSignature
700
- */
701
- exports.IndexSignature = IndexSignature;
574
+ * @tsplus static fncts.schema.ASTOps createIndexSignature
575
+ */
702
576
  function createIndexSignature_1(parameter, type, isReadonly) {
703
- return new IndexSignature(parameter, type, isReadonly);
704
- }
705
- /*
706
- * TypeLiteral
707
- */
708
- class TypeLiteral extends AST {
709
- annotations;
710
- _tag = 17 /* ASTTag.TypeLiteral */;
711
- propertySignatures;
712
- indexSignatures;
713
- constructor(propertySignatures, indexSignatures, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
714
- super();
715
- this.annotations = annotations;
716
- this.propertySignatures = sortByAscendingCardinality(propertySignatures);
717
- this.indexSignatures = sortByAscendingCardinality(indexSignatures);
718
- }
719
- clone(newProperties) {
720
- return new TypeLiteral(newProperties.propertySignatures ?? this.propertySignatures, newProperties.indexSignatures ?? this.indexSignatures, newProperties.annotations ?? this.annotations);
721
- }
722
- [tsplus_module_1.equalsSymbol](that, context) {
723
- return hasTag(that, 17 /* ASTTag.TypeLiteral */) && context.comparator(this.propertySignatures, that.propertySignatures) && context.comparator(this.indexSignatures, that.indexSignatures) && context.comparator(this.annotations, that.annotations);
724
- }
725
- }
577
+ return new IndexSignature(parameter, type, isReadonly);
578
+ }
579
+ var TypeLiteral = class TypeLiteral extends AST {
580
+ annotations;
581
+ _tag = 17;
582
+ propertySignatures;
583
+ indexSignatures;
584
+ constructor(propertySignatures, indexSignatures, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
585
+ super();
586
+ this.annotations = annotations;
587
+ this.propertySignatures = sortByAscendingCardinality(propertySignatures);
588
+ this.indexSignatures = sortByAscendingCardinality(indexSignatures);
589
+ }
590
+ clone(newProperties) {
591
+ return new TypeLiteral(newProperties.propertySignatures ?? this.propertySignatures, newProperties.indexSignatures ?? this.indexSignatures, newProperties.annotations ?? this.annotations);
592
+ }
593
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
594
+ return hasTag(that, 17) && context.comparator(this.propertySignatures, that.propertySignatures) && context.comparator(this.indexSignatures, that.indexSignatures) && context.comparator(this.annotations, that.annotations);
595
+ }
596
+ };
726
597
  /**
727
- * @tsplus static fncts.schema.ASTOps isTypeLiteral
728
- * @tsplus fluent fncts.schema.AST isTypeLiteral
729
- */
730
- exports.TypeLiteral = TypeLiteral;
598
+ * @tsplus static fncts.schema.ASTOps isTypeLiteral
599
+ * @tsplus fluent fncts.schema.AST isTypeLiteral
600
+ */
731
601
  function isTypeLiteral(self) {
732
- void 0;
733
- return self._tag === 17 /* ASTTag.TypeLiteral */;
602
+ return self._tag === 17;
734
603
  }
735
604
  /**
736
- * @tsplus static fncts.schema.ASTOps createTypeLiteral
737
- */
605
+ * @tsplus static fncts.schema.ASTOps createTypeLiteral
606
+ */
738
607
  function createTypeLiteral_1(propertySignatures, indexSignatures, annotations) {
739
- return new TypeLiteral(propertySignatures, indexSignatures, annotations);
608
+ return new TypeLiteral(propertySignatures, indexSignatures, annotations);
740
609
  }
741
610
  /**
742
- * @tsplus static fncts.schema.ASTOps unknownRecord
743
- */
744
- const unknownRecord = exports.unknownRecord = /*#__PURE__*/createTypeLiteral_1(/*#__PURE__*/tsplus_module_6.empty(), /*#__PURE__*/tsplus_module_6.vector(/*#__PURE__*/createIndexSignature_1(stringKeyword_1, unknownKeyword_1, true), /*#__PURE__*/createIndexSignature_1(symbolKeyword_1, unknownKeyword_1, true)));
745
- /*
746
- * Union
747
- */
748
- class Union extends AST {
749
- types;
750
- annotations;
751
- _tag = 18 /* ASTTag.Union */;
752
- constructor(types, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
753
- super();
754
- this.types = types;
755
- this.annotations = annotations;
756
- }
757
- clone(newProperties) {
758
- return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);
759
- }
760
- [tsplus_module_1.equalsSymbol](that, context) {
761
- return hasTag(that, 18 /* ASTTag.Union */) && context.comparator(this.types, that.types) && context.comparator(this.annotations, that.annotations);
762
- }
763
- }
611
+ * @tsplus static fncts.schema.ASTOps unknownRecord
612
+ */
613
+ const unknownRecord = createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_collection_immutable_Vector_api.vector(createIndexSignature_1(stringKeyword_1, unknownKeyword_1, true), createIndexSignature_1(symbolKeyword_1, unknownKeyword_1, true)));
614
+ var Union = class extends AST {
615
+ types;
616
+ annotations;
617
+ _tag = 18;
618
+ constructor(types, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
619
+ super();
620
+ this.types = types;
621
+ this.annotations = annotations;
622
+ }
623
+ clone(newProperties) {
624
+ return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);
625
+ }
626
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
627
+ return hasTag(that, 18) && context.comparator(this.types, that.types) && context.comparator(this.annotations, that.annotations);
628
+ }
629
+ };
764
630
  /**
765
- * @tsplus fluent fncts.schema.AST isUnion
766
- */
767
- exports.Union = Union;
631
+ * @tsplus fluent fncts.schema.AST isUnion
632
+ */
768
633
  function isUnion(self) {
769
- void 0;
770
- return self._tag === 18 /* ASTTag.Union */;
634
+ return self._tag === 18;
771
635
  }
772
636
  /**
773
- * @tsplus static fncts.schema.ASTOps createUnion
774
- */
775
- function createUnion_1(candidates, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
776
- const types = unify(candidates);
777
- switch (types.length) {
778
- case 0:
779
- return neverKeyword_1;
780
- case 1:
781
- return tsplus_module_6.unsafeGet(0)(types);
782
- default:
783
- return new Union(sortByDescendingWeight(types), annotations);
784
- }
785
- }
786
- /*
787
- * Lazy
788
- */
789
- class Lazy extends AST {
790
- getAST;
791
- annotations;
792
- _tag = 19 /* ASTTag.Lazy */;
793
- constructor(getAST, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
794
- super();
795
- this.getAST = getAST;
796
- this.annotations = annotations;
797
- }
798
- clone(newProperties) {
799
- return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
800
- }
801
- [tsplus_module_1.equalsSymbol](that) {
802
- return this === that;
803
- }
804
- }
637
+ * @tsplus static fncts.schema.ASTOps createUnion
638
+ */
639
+ function createUnion_1(candidates, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
640
+ const types = unify(candidates);
641
+ switch (types.length) {
642
+ case 0: return neverKeyword_1;
643
+ case 1: return _fncts_base_collection_immutable_Vector_api.unsafeGet(0)(types);
644
+ default: return new Union(sortByDescendingWeight(types), annotations);
645
+ }
646
+ }
647
+ var Lazy = class Lazy extends AST {
648
+ getAST;
649
+ annotations;
650
+ _tag = 19;
651
+ constructor(getAST, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
652
+ super();
653
+ this.getAST = getAST;
654
+ this.annotations = annotations;
655
+ }
656
+ clone(newProperties) {
657
+ return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
658
+ }
659
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that) {
660
+ return this === that;
661
+ }
662
+ };
805
663
  /**
806
- * @tsplus static fncts.schema.ASTOps createLazy
807
- */
808
- exports.Lazy = Lazy;
664
+ * @tsplus static fncts.schema.ASTOps createLazy
665
+ */
809
666
  function createLazy_1(getAST, annotations) {
810
- return new Lazy(getAST, annotations);
667
+ return new Lazy(getAST, annotations);
811
668
  }
812
669
  /**
813
- * @tsplus fluent fncts.schema.AST isLazy
814
- */
670
+ * @tsplus fluent fncts.schema.AST isLazy
671
+ */
815
672
  function isLazy(self) {
816
- void 0;
817
- return self._tag === 19 /* ASTTag.Lazy */;
818
- }
819
- /*
820
- * Refinement
821
- */
822
- class Refinement extends AST {
823
- from;
824
- predicate;
825
- annotations;
826
- _tag = 20 /* ASTTag.Refinement */;
827
- constructor(from, predicate, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
828
- super();
829
- this.from = from;
830
- this.predicate = predicate;
831
- this.annotations = annotations;
832
- }
833
- decode(input, options) {
834
- return this.predicate(input) ? tsplus_module_8.succeed(input) : tsplus_module_8.fail(tsplus_module_9.typeError(this, input));
835
- }
836
- clone(newProperties) {
837
- return new Refinement(newProperties.from ?? this.from, newProperties.predicate ?? this.predicate, newProperties.annotations ?? this.annotations);
838
- }
839
- [tsplus_module_1.equalsSymbol](that, context) {
840
- return hasTag(that, 20 /* ASTTag.Refinement */) && context.comparator(this.from, that.from) && context.comparator(this.predicate, that.predicate) && context.comparator(this.annotations, that.annotations);
841
- }
842
- }
673
+ return self._tag === 19;
674
+ }
675
+ var Refinement = class Refinement extends AST {
676
+ from;
677
+ predicate;
678
+ annotations;
679
+ _tag = 20;
680
+ constructor(from, predicate, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
681
+ super();
682
+ this.from = from;
683
+ this.predicate = predicate;
684
+ this.annotations = annotations;
685
+ }
686
+ decode(input, options) {
687
+ return this.predicate(input) ? _fncts_schema_ParseResult.succeed(input) : _fncts_schema_ParseResult.fail(_fncts_schema_ParseError_ParseError.typeError(this, input));
688
+ }
689
+ clone(newProperties) {
690
+ return new Refinement(newProperties.from ?? this.from, newProperties.predicate ?? this.predicate, newProperties.annotations ?? this.annotations);
691
+ }
692
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
693
+ return hasTag(that, 20) && context.comparator(this.from, that.from) && context.comparator(this.predicate, that.predicate) && context.comparator(this.annotations, that.annotations);
694
+ }
695
+ };
843
696
  /**
844
- * @tsplus static fncts.schema.ASTOps createRefinement
845
- */
846
- exports.Refinement = Refinement;
697
+ * @tsplus static fncts.schema.ASTOps createRefinement
698
+ */
847
699
  function createRefinement_1(from, predicate, annotations) {
848
- return new Refinement(from, predicate, annotations);
700
+ return new Refinement(from, predicate, annotations);
849
701
  }
850
702
  function isRefinement(self) {
851
- void 0;
852
- return self._tag === 20 /* ASTTag.Refinement */;
853
- }
854
- /*
855
- * Transform
856
- */
857
- class Transform extends AST {
858
- from;
859
- to;
860
- decode;
861
- encode;
862
- annotations;
863
- _tag = 21 /* ASTTag.Transform */;
864
- constructor(from, to, decode, encode, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
865
- super();
866
- this.from = from;
867
- this.to = to;
868
- this.decode = decode;
869
- this.encode = encode;
870
- this.annotations = annotations;
871
- }
872
- clone(newProperties) {
873
- return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
874
- }
875
- [tsplus_module_1.equalsSymbol](that, context) {
876
- return hasTag(that, 21 /* ASTTag.Transform */) && context.comparator(this.from, that.from) && context.comparator(this.to, that.to) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
877
- }
878
- }
703
+ return self._tag === 20;
704
+ }
705
+ var Transform = class Transform extends AST {
706
+ from;
707
+ to;
708
+ decode;
709
+ encode;
710
+ annotations;
711
+ _tag = 21;
712
+ constructor(from, to, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
713
+ super();
714
+ this.from = from;
715
+ this.to = to;
716
+ this.decode = decode;
717
+ this.encode = encode;
718
+ this.annotations = annotations;
719
+ }
720
+ clone(newProperties) {
721
+ return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
722
+ }
723
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
724
+ return hasTag(that, 21) && context.comparator(this.from, that.from) && context.comparator(this.to, that.to) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
725
+ }
726
+ };
879
727
  /**
880
- * @tsplus static fncts.schema.ASTOps createTransform
881
- */
882
- exports.Transform = Transform;
728
+ * @tsplus static fncts.schema.ASTOps createTransform
729
+ */
883
730
  function createTransform(from, to, decode, encode, annotations) {
884
- return new Transform(from, getTo_1(to), decode, encode, annotations);
885
- }
886
- /*
887
- * Validation
888
- */
889
- class Validation extends AST {
890
- from;
891
- validation;
892
- annotations;
893
- _tag = 22 /* ASTTag.Validation */;
894
- constructor(from, validation, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
895
- super();
896
- this.from = from;
897
- this.validation = validation;
898
- this.annotations = annotations;
899
- }
900
- clone(newProperties) {
901
- return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);
902
- }
903
- [tsplus_module_1.equalsSymbol](that, context) {
904
- return hasTag(that, 22 /* ASTTag.Validation */) && context.comparator(this.from, that.from) && context.comparator(this.validation, that.validation) && context.comparator(this.annotations, that.annotations);
905
- }
906
- }
731
+ return new Transform(from, getTo_1(to), decode, encode, annotations);
732
+ }
733
+ var Validation = class Validation extends AST {
734
+ from;
735
+ validation;
736
+ annotations;
737
+ _tag = 22;
738
+ constructor(from, validation, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
739
+ super();
740
+ this.from = from;
741
+ this.validation = validation;
742
+ this.annotations = annotations;
743
+ }
744
+ clone(newProperties) {
745
+ return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);
746
+ }
747
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
748
+ return hasTag(that, 22) && context.comparator(this.from, that.from) && context.comparator(this.validation, that.validation) && context.comparator(this.annotations, that.annotations);
749
+ }
750
+ };
907
751
  /**
908
- * @tsplus static fncts.schema.ASTOps createValidation
909
- */
910
- exports.Validation = Validation;
752
+ * @tsplus static fncts.schema.ASTOps createValidation
753
+ */
911
754
  function createValidation(from, validation, annotations) {
912
- return new Validation(from, validation, annotations);
755
+ return new Validation(from, validation, annotations);
913
756
  }
914
757
  /**
915
- * @tsplus tailRec
916
- */
758
+ * @tsplus tailRec
759
+ */
917
760
  function getCardinality(ast) {
918
- var ast_1 = ast;
919
- var ast_2 = ast;
920
- while (1) {
921
- void 0;
922
- switch (ast_1._tag) {
923
- case 5 /* ASTTag.NeverKeyword */:
924
- return 0;
925
- case 1 /* ASTTag.Literal */:
926
- case 3 /* ASTTag.UndefinedKeyword */:
927
- case 4 /* ASTTag.VoidKeyword */:
928
- case 2 /* ASTTag.UniqueSymbol */:
929
- return 1;
930
- case 10 /* ASTTag.BooleanKeyword */:
931
- return 2;
932
- case 8 /* ASTTag.StringKeyword */:
933
- case 9 /* ASTTag.NumberKeyword */:
934
- case 11 /* ASTTag.BigIntKeyword */:
935
- case 12 /* ASTTag.SymbolKeyword */:
936
- return 3;
937
- case 13 /* ASTTag.ObjectKeyword */:
938
- return 5;
939
- case 6 /* ASTTag.UnknownKeyword */:
940
- case 7 /* ASTTag.AnyKeyword */:
941
- return 6;
942
- case 20 /* ASTTag.Refinement */:
943
- ast_2 = ast_1.from;
944
- ast_1 = ast_2;
945
- continue;
946
- case 21 /* ASTTag.Transform */:
947
- ast_2 = ast_1.to;
948
- ast_1 = ast_2;
949
- continue;
950
- default:
951
- return 4;
952
- }
953
- }
761
+ var ast_1 = ast;
762
+ var ast_2 = ast;
763
+ while (1) switch (ast_1._tag) {
764
+ case 5: return 0;
765
+ case 1:
766
+ case 3:
767
+ case 4:
768
+ case 2: return 1;
769
+ case 10: return 2;
770
+ case 8:
771
+ case 9:
772
+ case 11:
773
+ case 12: return 3;
774
+ case 13: return 5;
775
+ case 6:
776
+ case 7: return 6;
777
+ case 20:
778
+ ast_2 = ast_1.from;
779
+ ast_1 = ast_2;
780
+ continue;
781
+ case 21:
782
+ ast_2 = ast_1.to;
783
+ ast_1 = ast_2;
784
+ continue;
785
+ default: return 4;
786
+ }
954
787
  }
955
788
  function sortByAscendingCardinality(types) {
956
- return tsplus_module_6.sort(tsplus_module_11.contramap(({
957
- type
958
- }) => getCardinality(type))(tsplus_module_10.Ord))(types);
789
+ return _fncts_base_collection_immutable_Vector_api.sort(_fncts_base_data_Ord_api_contramap.contramap(({ type }) => getCardinality(type))(_fncts_base_data_number_instances.Ord))(types);
959
790
  }
960
- const OrdWeight = /*#__PURE__*/tsplus_module_12.tuple(tsplus_module_10.Ord, tsplus_module_10.Ord, tsplus_module_10.Ord);
961
- const maxWeight = /*#__PURE__*/tsplus_module_13.max(OrdWeight);
791
+ const OrdWeight = _fncts_base_data_Ord_api.tuple(_fncts_base_data_number_instances.Ord, _fncts_base_data_number_instances.Ord, _fncts_base_data_number_instances.Ord);
792
+ const maxWeight = _fncts_base_data_Ord_api_max.max(OrdWeight);
962
793
  function maxWeightAll(weights) {
963
- return tsplus_module_14.foldLeft(emptyWeight, (b, a) => maxWeight(b)(a))(weights);
794
+ return _fncts_base_collection_Iterable_api.foldLeft(emptyWeight, (b, a) => maxWeight(b)(a))(weights);
964
795
  }
965
- const emptyWeight = [0, 0, 0];
796
+ const emptyWeight = [
797
+ 0,
798
+ 0,
799
+ 0
800
+ ];
966
801
  function getWeight(ast) {
967
- void 0;
968
- switch (ast._tag) {
969
- case 0 /* ASTTag.Declaration */:
970
- return tsplus_module_15.match(() => [6, 0, 0], ast => {
971
- const [_, y, z] = getWeight(ast);
972
- return [6, y, z];
973
- })(ast.annotations.get(tsplus_module_4.Surrogate));
974
- case 16 /* ASTTag.Tuple */:
975
- return [2, ast.elements.length, tsplus_module_15.match(() => 0, rest => rest.length)(ast.rest)];
976
- case 17 /* ASTTag.TypeLiteral */:
977
- {
978
- const y = ast.propertySignatures.length;
979
- const z = ast.indexSignatures.length;
980
- return y + z === 0 ? [-4, 0, 0] : [4, y, z];
981
- }
982
- case 18 /* ASTTag.Union */:
983
- return maxWeightAll(tsplus_module_6.map(getWeight)(ast.types));
984
- case 19 /* ASTTag.Lazy */:
985
- return [8, 0, 0];
986
- case 20 /* ASTTag.Refinement */:
987
- const [x, y, z] = getWeight(ast.from);
988
- return [x + 1, y, z];
989
- case 21 /* ASTTag.Transform */:
990
- return getWeight(ast.from);
991
- case 13 /* ASTTag.ObjectKeyword */:
992
- return [-2, 0, 0];
993
- case 6 /* ASTTag.UnknownKeyword */:
994
- case 7 /* ASTTag.AnyKeyword */:
995
- return [-4, 0, 0];
996
- default:
997
- return emptyWeight;
998
- }
802
+ switch (ast._tag) {
803
+ case 0: return _fncts_base_data_Maybe_destructors.match(() => [
804
+ 6,
805
+ 0,
806
+ 0
807
+ ], (ast) => {
808
+ const [_, y, z] = getWeight(ast);
809
+ return [
810
+ 6,
811
+ y,
812
+ z
813
+ ];
814
+ })(ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
815
+ case 16: return [
816
+ 2,
817
+ ast.elements.length,
818
+ _fncts_base_data_Maybe_destructors.match(() => 0, (rest) => rest.length)(ast.rest)
819
+ ];
820
+ case 17: {
821
+ const y = ast.propertySignatures.length;
822
+ const z = ast.indexSignatures.length;
823
+ return y + z === 0 ? [
824
+ -4,
825
+ 0,
826
+ 0
827
+ ] : [
828
+ 4,
829
+ y,
830
+ z
831
+ ];
832
+ }
833
+ case 18: return maxWeightAll(_fncts_base_collection_immutable_Vector_api.map(getWeight)(ast.types));
834
+ case 19: return [
835
+ 8,
836
+ 0,
837
+ 0
838
+ ];
839
+ case 20:
840
+ const [x, y, z] = getWeight(ast.from);
841
+ return [
842
+ x + 1,
843
+ y,
844
+ z
845
+ ];
846
+ case 21: return getWeight(ast.from);
847
+ case 13: return [
848
+ -2,
849
+ 0,
850
+ 0
851
+ ];
852
+ case 6:
853
+ case 7: return [
854
+ -4,
855
+ 0,
856
+ 0
857
+ ];
858
+ default: return emptyWeight;
859
+ }
999
860
  }
1000
861
  function sortByDescendingWeight(types) {
1001
- return tsplus_module_6.sort(tsplus_module_11.contramap(getWeight)(OrdWeight))(types);
862
+ return _fncts_base_collection_immutable_Vector_api.sort(_fncts_base_data_Ord_api_contramap.contramap(getWeight)(OrdWeight))(types);
1002
863
  }
1003
864
  function unify(candidates) {
1004
- let out = tsplus_module_6.flatMap(ast => {
1005
- void 0;
1006
- switch (ast._tag) {
1007
- case 5 /* ASTTag.NeverKeyword */:
1008
- return tsplus_module_6.empty();
1009
- case 18 /* ASTTag.Union */:
1010
- return ast.types;
1011
- default:
1012
- return tsplus_module_6.vector(ast);
1013
- }
1014
- })(candidates);
1015
- if (tsplus_module_6.some(isStringKeyword_1)(out)) {
1016
- out = tsplus_module_6.filter(m => !(isLiteral_1(m) && typeof m.literal === "string"))(out);
1017
- }
1018
- if (tsplus_module_6.some(isNumberKeyword_1)(out)) {
1019
- out = tsplus_module_6.filter(m => !(isLiteral_1(m) && typeof m.literal === "number"))(out);
1020
- }
1021
- if (tsplus_module_6.some(isSymbolKeyword_1)(out)) {
1022
- out = tsplus_module_6.filter(m => !isUniqueSymbol_1(m))(out);
1023
- }
1024
- return out;
865
+ let out = _fncts_base_collection_immutable_Vector_api.flatMap((ast) => {
866
+ switch (ast._tag) {
867
+ case 5: return _fncts_base_collection_immutable_Vector_api.empty();
868
+ case 18: return ast.types;
869
+ default: return _fncts_base_collection_immutable_Vector_api.vector(ast);
870
+ }
871
+ })(candidates);
872
+ if (_fncts_base_collection_immutable_Vector_api.some(isStringKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !(isLiteral_1(m) && typeof m.literal === "string"))(out);
873
+ if (_fncts_base_collection_immutable_Vector_api.some(isNumberKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !(isLiteral_1(m) && typeof m.literal === "number"))(out);
874
+ if (_fncts_base_collection_immutable_Vector_api.some(isSymbolKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !isUniqueSymbol_1(m))(out);
875
+ return out;
1025
876
  }
1026
877
  /**
1027
- * @tsplus pipeable fncts.schema.AST combineAnnotations
1028
- */
878
+ * @tsplus pipeable fncts.schema.AST combineAnnotations
879
+ */
1029
880
  function combineAnnotations(annotations) {
1030
- return self => {
1031
- return self.clone({
1032
- annotations: self.annotations.combine(annotations)
1033
- });
1034
- };
881
+ return (self) => {
882
+ return self.clone({ annotations: self.annotations.combine(annotations) });
883
+ };
1035
884
  }
1036
885
  /**
1037
- * @tsplus pipeable fncts.schema.AST setAnnotation
1038
- */
886
+ * @tsplus pipeable fncts.schema.AST setAnnotation
887
+ */
1039
888
  function setAnnotation(annotation, value) {
1040
- return self => {
1041
- return self.clone({
1042
- annotations: self.annotations.annotate(annotation, value)
1043
- });
1044
- };
889
+ return (self) => {
890
+ return self.clone({ annotations: self.annotations.annotate(annotation, value) });
891
+ };
1045
892
  }
1046
893
  /**
1047
- * @tsplus pipeable fncts.schema.AST appendRestElement
1048
- */
894
+ * @tsplus pipeable fncts.schema.AST appendRestElement
895
+ */
1049
896
  function appendRestElement(restElement) {
1050
- return self => {
1051
- if (tsplus_module_16.isJust(self.rest)) {
1052
- throw new Error("A rest element cannot follow another rest element. ts(1265)");
1053
- }
1054
- return createTuple_1(self.elements, tsplus_module_7.just(tsplus_module_6.vector(restElement), fileName_1 + ":1313:43"), self.isReadonly, self.annotations);
1055
- };
897
+ return (self) => {
898
+ if (_fncts_base_data_Maybe_definition.isJust(self.rest)) throw new Error("A rest element cannot follow another rest element. ts(1265)");
899
+ return createTuple_1(self.elements, _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(restElement), fileName_1 + ":1313:43"), self.isReadonly, self.annotations);
900
+ };
1056
901
  }
1057
902
  /**
1058
- * @tsplus pipeable fncts.schema.AST appendElement
1059
- */
903
+ * @tsplus pipeable fncts.schema.AST appendElement
904
+ */
1060
905
  function appendElement(element) {
1061
- return self => {
1062
- if (tsplus_module_6.some(e => e.isOptional)(self.elements) && !element.isOptional) {
1063
- throw new Error("A required element cannot follow an optional element. ts(1257)");
1064
- }
1065
- return tsplus_module_15.match(() => createTuple_1(tsplus_module_6.append(element)(self.elements), tsplus_module_7.nothing(fileName_1 + ":1326:63"), self.isReadonly, self.annotations), rest => {
1066
- if (element.isOptional) {
1067
- throw new Error("A required element cannot follow an optional element. ts(1257)");
1068
- }
1069
- return createTuple_1(self.elements, tsplus_module_7.just(tsplus_module_6.append(element.type)(rest), fileName_1 + ":1331:47"), self.isReadonly, self.annotations);
1070
- })(self.rest);
1071
- };
906
+ return (self) => {
907
+ if (_fncts_base_collection_immutable_Vector_api.some((e) => e.isOptional)(self.elements) && !element.isOptional) throw new Error("A required element cannot follow an optional element. ts(1257)");
908
+ return _fncts_base_data_Maybe_destructors.match(() => createTuple_1(_fncts_base_collection_immutable_Vector_api.append(element)(self.elements), _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1326:63"), self.isReadonly, self.annotations), (rest) => {
909
+ if (element.isOptional) throw new Error("A required element cannot follow an optional element. ts(1257)");
910
+ return createTuple_1(self.elements, _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.append(element.type)(rest), fileName_1 + ":1331:47"), self.isReadonly, self.annotations);
911
+ })(self.rest);
912
+ };
1072
913
  }
1073
914
  function getParameter(x) {
1074
- return isRefinement(x) ? getParameter(x.from) : x;
915
+ return isRefinement(x) ? getParameter(x.from) : x;
1075
916
  }
1076
917
  /**
1077
- * @tsplus getter fncts.schema.AST getPropertySignatures
1078
- */
918
+ * @tsplus getter fncts.schema.AST getPropertySignatures
919
+ */
1079
920
  function getPropertySignatures_1(self) {
1080
- void 0;
1081
- switch (self._tag) {
1082
- case 0 /* ASTTag.Declaration */:
1083
- return tsplus_module_15.match(() => tsplus_module_6.empty(), surrogate => getPropertySignatures_1(surrogate))(self.annotations.get(tsplus_module_4.Surrogate));
1084
- case 16 /* ASTTag.Tuple */:
1085
- return tsplus_module_6.mapWithIndex((i, element) => createPropertySignature_1(i, element.type, element.isOptional, self.isReadonly))(self.elements);
1086
- case 18 /* ASTTag.Union */:
1087
- {
1088
- const propertySignatures = tsplus_module_6.map(getPropertySignatures_1)(self.types);
1089
- return tsplus_module_6.filterMap(({
1090
- name
1091
- }) => {
1092
- if (tsplus_module_6.every(ps => tsplus_module_6.some(p => p.name === name)(ps))(propertySignatures)) {
1093
- const members = tsplus_module_6.flatMap(ps => tsplus_module_6.filter(p => p.name === name)(ps))(propertySignatures);
1094
- return tsplus_module_7.just(createPropertySignature_1(name, createUnion_1(tsplus_module_6.map(p => p.type)(members)), tsplus_module_6.some(p => p.isOptional)(members), tsplus_module_6.some(p => p.isReadonly)(members)), fileName_1 + ":1363:22");
1095
- }
1096
- return tsplus_module_7.nothing(fileName_1 + ":1372:23");
1097
- })(tsplus_module_6.unsafeGet(0)(propertySignatures));
1098
- }
1099
- case 17 /* ASTTag.TypeLiteral */:
1100
- return self.propertySignatures;
1101
- case 19 /* ASTTag.Lazy */:
1102
- return getPropertySignatures_1(self.getAST());
1103
- case 20 /* ASTTag.Refinement */:
1104
- return getPropertySignatures_1(self.from);
1105
- case 21 /* ASTTag.Transform */:
1106
- return getPropertySignatures_1(self.to);
1107
- default:
1108
- return tsplus_module_6.empty();
1109
- }
921
+ switch (self._tag) {
922
+ case 0: return _fncts_base_data_Maybe_destructors.match(() => _fncts_base_collection_immutable_Vector_api.empty(), (surrogate) => getPropertySignatures_1(surrogate))(self.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
923
+ case 16: return _fncts_base_collection_immutable_Vector_api.mapWithIndex((i, element) => createPropertySignature_1(i, element.type, element.isOptional, self.isReadonly))(self.elements);
924
+ case 18: {
925
+ const propertySignatures = _fncts_base_collection_immutable_Vector_api.map(getPropertySignatures_1)(self.types);
926
+ return _fncts_base_collection_immutable_Vector_api.filterMap(({ name }) => {
927
+ if (_fncts_base_collection_immutable_Vector_api.every((ps) => _fncts_base_collection_immutable_Vector_api.some((p) => p.name === name)(ps))(propertySignatures)) {
928
+ const members = _fncts_base_collection_immutable_Vector_api.flatMap((ps) => _fncts_base_collection_immutable_Vector_api.filter((p) => p.name === name)(ps))(propertySignatures);
929
+ return _fncts_base_data_Maybe_constructors.just(createPropertySignature_1(name, createUnion_1(_fncts_base_collection_immutable_Vector_api.map((p) => p.type)(members)), _fncts_base_collection_immutable_Vector_api.some((p) => p.isOptional)(members), _fncts_base_collection_immutable_Vector_api.some((p) => p.isReadonly)(members)), fileName_1 + ":1363:22");
930
+ }
931
+ return _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1372:23");
932
+ })(_fncts_base_collection_immutable_Vector_api.unsafeGet(0)(propertySignatures));
933
+ }
934
+ case 17: return self.propertySignatures;
935
+ case 19: return getPropertySignatures_1(self.getAST());
936
+ case 20: return getPropertySignatures_1(self.from);
937
+ case 21: return getPropertySignatures_1(self.to);
938
+ default: return _fncts_base_collection_immutable_Vector_api.empty();
939
+ }
1110
940
  }
1111
941
  /**
1112
- * @tsplus getter fncts.schema.AST keysof
1113
- */
942
+ * @tsplus getter fncts.schema.AST keysof
943
+ */
1114
944
  function keysOf_1(ast) {
1115
- void 0;
1116
- switch (ast._tag) {
1117
- case 0 /* ASTTag.Declaration */:
1118
- return tsplus_module_15.match(() => tsplus_module_6.empty(), surrogate => keysOf_1(surrogate))(ast.annotations.get(tsplus_module_4.Surrogate));
1119
- case 5 /* ASTTag.NeverKeyword */:
1120
- case 7 /* ASTTag.AnyKeyword */:
1121
- return tsplus_module_6.vector(stringKeyword_1, numberKeyword_1, symbolKeyword_1);
1122
- case 8 /* ASTTag.StringKeyword */:
1123
- return tsplus_module_6.vector(createLiteral_1("length"));
1124
- case 17 /* ASTTag.TypeLiteral */:
1125
- return tsplus_module_6.concat(tsplus_module_6.map(is => getParameter(is.parameter))(ast.indexSignatures))(tsplus_module_6.map(p => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(ast.propertySignatures));
1126
- case 18 /* ASTTag.Union */:
1127
- return tsplus_module_6.map(p => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));
1128
- case 19 /* ASTTag.Lazy */:
1129
- return keysOf_1(ast.getAST());
1130
- case 20 /* ASTTag.Refinement */:
1131
- return keysOf_1(ast.from);
1132
- case 21 /* ASTTag.Transform */:
1133
- return keysOf_1(ast.to);
1134
- default:
1135
- return tsplus_module_6.empty();
1136
- }
945
+ switch (ast._tag) {
946
+ case 0: return _fncts_base_data_Maybe_destructors.match(() => _fncts_base_collection_immutable_Vector_api.empty(), (surrogate) => keysOf_1(surrogate))(ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
947
+ case 5:
948
+ case 7: return _fncts_base_collection_immutable_Vector_api.vector(stringKeyword_1, numberKeyword_1, symbolKeyword_1);
949
+ case 8: return _fncts_base_collection_immutable_Vector_api.vector(createLiteral_1("length"));
950
+ case 17: return _fncts_base_collection_immutable_Vector_api.concat(_fncts_base_collection_immutable_Vector_api.map((is) => getParameter(is.parameter))(ast.indexSignatures))(_fncts_base_collection_immutable_Vector_api.map((p) => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(ast.propertySignatures));
951
+ case 18: return _fncts_base_collection_immutable_Vector_api.map((p) => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));
952
+ case 19: return keysOf_1(ast.getAST());
953
+ case 20: return keysOf_1(ast.from);
954
+ case 21: return keysOf_1(ast.to);
955
+ default: return _fncts_base_collection_immutable_Vector_api.empty();
956
+ }
1137
957
  }
1138
958
  /**
1139
- * @tsplus getter fncts.schema.AST keyof
1140
- */
959
+ * @tsplus getter fncts.schema.AST keyof
960
+ */
1141
961
  function keyof(self) {
1142
- return createUnion_1(keysOf_1(self));
962
+ return createUnion_1(keysOf_1(self));
1143
963
  }
1144
964
  /**
1145
- * @tsplus static fncts.schema.ASTOps createRecord
1146
- */
965
+ * @tsplus static fncts.schema.ASTOps createRecord
966
+ */
1147
967
  function createRecord(key, value, isReadonly) {
1148
- const propertySignatures = tsplus_module_6.emptyPushable();
1149
- const indexSignatures = tsplus_module_6.emptyPushable();
1150
- function go(key) {
1151
- void 0;
1152
- switch (key._tag) {
1153
- case 5 /* ASTTag.NeverKeyword */:
1154
- break;
1155
- case 8 /* ASTTag.StringKeyword */:
1156
- case 12 /* ASTTag.SymbolKeyword */:
1157
- case 15 /* ASTTag.TemplateLiteral */:
1158
- case 20 /* ASTTag.Refinement */:
1159
- tsplus_module_17.push(createIndexSignature_1(key, value, isReadonly))(indexSignatures);
1160
- break;
1161
- case 1 /* ASTTag.Literal */:
1162
- if (typeof key.literal === "string" || typeof key.literal === "number") {
1163
- tsplus_module_17.push(createPropertySignature_1(key.literal, value, false, isReadonly))(propertySignatures);
1164
- }
1165
- break;
1166
- case 2 /* ASTTag.UniqueSymbol */:
1167
- tsplus_module_17.push(createPropertySignature_1(key.symbol, value, false, isReadonly))(propertySignatures);
1168
- break;
1169
- case 18 /* ASTTag.Union */:
1170
- tsplus_module_6.forEach(go)(key.types);
1171
- break;
1172
- default:
1173
- throw new Error(`createRecord: Unsupported key\n${(0, _Showable.show)(key)}`);
1174
- }
1175
- }
1176
- go(key);
1177
- return createTypeLiteral_1(propertySignatures, indexSignatures);
968
+ const propertySignatures = _fncts_base_collection_immutable_Vector_api.emptyPushable();
969
+ const indexSignatures = _fncts_base_collection_immutable_Vector_api.emptyPushable();
970
+ function go(key) {
971
+ switch (key._tag) {
972
+ case 5: break;
973
+ case 8:
974
+ case 12:
975
+ case 15:
976
+ case 20:
977
+ _fncts_base_collection_immutable_Vector_internal.push(createIndexSignature_1(key, value, isReadonly))(indexSignatures);
978
+ break;
979
+ case 1:
980
+ if (typeof key.literal === "string" || typeof key.literal === "number") _fncts_base_collection_immutable_Vector_internal.push(createPropertySignature_1(key.literal, value, false, isReadonly))(propertySignatures);
981
+ break;
982
+ case 2:
983
+ _fncts_base_collection_immutable_Vector_internal.push(createPropertySignature_1(key.symbol, value, false, isReadonly))(propertySignatures);
984
+ break;
985
+ case 18:
986
+ _fncts_base_collection_immutable_Vector_api.forEach(go)(key.types);
987
+ break;
988
+ default: throw new Error(`createRecord: Unsupported key\n${(0, _fncts_base_data_Showable.show)(key)}`);
989
+ }
990
+ }
991
+ go(key);
992
+ return createTypeLiteral_1(propertySignatures, indexSignatures);
1178
993
  }
1179
994
  /**
1180
- * @tsplus pipeable fncts.schema.AST pick
1181
- */
995
+ * @tsplus pipeable fncts.schema.AST pick
996
+ */
1182
997
  function pick(keys) {
1183
- return self => {
1184
- return createTypeLiteral_1(tsplus_module_6.filter(ps => tsplus_module_6.includes(ps.name)(keys))(getPropertySignatures_1(self)), tsplus_module_6.empty());
1185
- };
998
+ return (self) => {
999
+ return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.filter((ps) => _fncts_base_collection_immutable_Vector_api.includes(ps.name)(keys))(getPropertySignatures_1(self)), _fncts_base_collection_immutable_Vector_api.empty());
1000
+ };
1186
1001
  }
1187
1002
  /**
1188
- * @tsplus pipeable fncts.schema.AST omit
1189
- */
1003
+ * @tsplus pipeable fncts.schema.AST omit
1004
+ */
1190
1005
  function omit(keys) {
1191
- return self => {
1192
- return createTypeLiteral_1(tsplus_module_6.filter(ps => !tsplus_module_6.includes(ps.name)(keys))(getPropertySignatures_1(self)), tsplus_module_6.empty());
1193
- };
1006
+ return (self) => {
1007
+ return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.filter((ps) => !_fncts_base_collection_immutable_Vector_api.includes(ps.name)(keys))(getPropertySignatures_1(self)), _fncts_base_collection_immutable_Vector_api.empty());
1008
+ };
1194
1009
  }
1195
1010
  /**
1196
- * @tsplus getter fncts.schema.AST partial
1197
- */
1011
+ * @tsplus getter fncts.schema.AST partial
1012
+ */
1198
1013
  function partial_1(self) {
1199
- void 0;
1200
- switch (self._tag) {
1201
- case 16 /* ASTTag.Tuple */:
1202
- return createTuple_1(tsplus_module_6.map(e => createElement_1(e.type, true))(self.elements), tsplus_module_18.map(rest => tsplus_module_6.vector(createUnion_1(tsplus_module_6.append(undefinedKeyword_1)(rest))))(self.rest), self.isReadonly);
1203
- case 17 /* ASTTag.TypeLiteral */:
1204
- return createTypeLiteral_1(tsplus_module_6.map(f => createPropertySignature_1(f.name, f.type, true, f.isReadonly, f.annotations))(self.propertySignatures), self.indexSignatures);
1205
- case 18 /* ASTTag.Union */:
1206
- return createUnion_1(tsplus_module_6.map(partial_1)(self.types));
1207
- case 19 /* ASTTag.Lazy */:
1208
- return createLazy_1(() => partial_1(self.getAST()));
1209
- case 20 /* ASTTag.Refinement */:
1210
- return partial_1(self.from);
1211
- case 21 /* ASTTag.Transform */:
1212
- return partial_1(self.to);
1213
- default:
1214
- return self;
1215
- }
1014
+ switch (self._tag) {
1015
+ case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((e) => createElement_1(e.type, true))(self.elements), _fncts_base_data_Maybe_api.map((rest) => _fncts_base_collection_immutable_Vector_api.vector(createUnion_1(_fncts_base_collection_immutable_Vector_api.append(undefinedKeyword_1)(rest))))(self.rest), self.isReadonly);
1016
+ case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((f) => createPropertySignature_1(f.name, f.type, true, f.isReadonly, f.annotations))(self.propertySignatures), self.indexSignatures);
1017
+ case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(partial_1)(self.types));
1018
+ case 19: return createLazy_1(() => partial_1(self.getAST()));
1019
+ case 20: return partial_1(self.from);
1020
+ case 21: return partial_1(self.to);
1021
+ default: return self;
1022
+ }
1216
1023
  }
1217
1024
  /**
1218
- * @tsplus static fncts.schema.AST createKey
1219
- */
1025
+ * @tsplus static fncts.schema.AST createKey
1026
+ */
1220
1027
  function createKey(key) {
1221
- return typeof key === "symbol" ? createUniqueSymbol_1(key) : createLiteral_1(key);
1028
+ return typeof key === "symbol" ? createUniqueSymbol_1(key) : createLiteral_1(key);
1222
1029
  }
1223
1030
  /**
1224
- * @tsplus getter fncts.schema.AST getFrom
1225
- */
1031
+ * @tsplus getter fncts.schema.AST getFrom
1032
+ */
1226
1033
  function getFrom_1(ast) {
1227
- void 0;
1228
- switch (ast._tag) {
1229
- case 0 /* ASTTag.Declaration */:
1230
- {
1231
- const surrogate = ast.annotations.get(tsplus_module_4.Surrogate);
1232
- if (tsplus_module_16.isJust(surrogate)) {
1233
- return getFrom_1(surrogate.value);
1234
- }
1235
- break;
1236
- }
1237
- case 16 /* ASTTag.Tuple */:
1238
- return createTuple_1(tsplus_module_6.map(element => createElement_1(getFrom_1(element.type), element.isOptional))(ast.elements), tsplus_module_18.map(restElement => tsplus_module_6.map(getFrom_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1239
- case 17 /* ASTTag.TypeLiteral */:
1240
- return createTypeLiteral_1(tsplus_module_6.map(ps => createPropertySignature_1(ps.name, getFrom_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), tsplus_module_6.map(is => createIndexSignature_1(is.parameter, getFrom_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1241
- case 18 /* ASTTag.Union */:
1242
- return createUnion_1(tsplus_module_6.map(getFrom_1)(ast.types), ast.annotations);
1243
- case 19 /* ASTTag.Lazy */:
1244
- return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);
1245
- case 20 /* ASTTag.Refinement */:
1246
- case 21 /* ASTTag.Transform */:
1247
- return getFrom_1(ast.from);
1248
- }
1249
- return ast;
1034
+ switch (ast._tag) {
1035
+ case 0: {
1036
+ const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
1037
+ if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getFrom_1(surrogate.value);
1038
+ break;
1039
+ }
1040
+ case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((element) => createElement_1(getFrom_1(element.type), element.isOptional))(ast.elements), _fncts_base_data_Maybe_api.map((restElement) => _fncts_base_collection_immutable_Vector_api.map(getFrom_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1041
+ case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((ps) => createPropertySignature_1(ps.name, getFrom_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), _fncts_base_collection_immutable_Vector_api.map((is) => createIndexSignature_1(is.parameter, getFrom_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1042
+ case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(getFrom_1)(ast.types), ast.annotations);
1043
+ case 19: return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);
1044
+ case 20:
1045
+ case 21: return getFrom_1(ast.from);
1046
+ }
1047
+ return ast;
1250
1048
  }
1251
1049
  /**
1252
- * @tsplus getter fncts.schema.AST getTo
1253
- */
1050
+ * @tsplus getter fncts.schema.AST getTo
1051
+ */
1254
1052
  function getTo_1(ast) {
1255
- void 0;
1256
- switch (ast._tag) {
1257
- case 0 /* ASTTag.Declaration */:
1258
- {
1259
- const surrogate = ast.annotations.get(tsplus_module_4.Surrogate);
1260
- if (tsplus_module_16.isJust(surrogate)) {
1261
- return getTo_1(surrogate.value);
1262
- }
1263
- break;
1264
- }
1265
- case 16 /* ASTTag.Tuple */:
1266
- return createTuple_1(tsplus_module_6.map(element => createElement_1(getTo_1(element.type), element.isOptional))(ast.elements), tsplus_module_18.map(restElement => tsplus_module_6.map(getTo_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1267
- case 17 /* ASTTag.TypeLiteral */:
1268
- return createTypeLiteral_1(tsplus_module_6.map(ps => createPropertySignature_1(ps.name, getTo_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), tsplus_module_6.map(is => createIndexSignature_1(is.parameter, getTo_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1269
- case 18 /* ASTTag.Union */:
1270
- return createUnion_1(tsplus_module_6.map(getTo_1)(ast.types), ast.annotations);
1271
- case 19 /* ASTTag.Lazy */:
1272
- return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);
1273
- case 20 /* ASTTag.Refinement */:
1274
- return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);
1275
- case 21 /* ASTTag.Transform */:
1276
- return getTo_1(ast.to);
1277
- }
1278
- return ast;
1053
+ switch (ast._tag) {
1054
+ case 0: {
1055
+ const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
1056
+ if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getTo_1(surrogate.value);
1057
+ break;
1058
+ }
1059
+ case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((element) => createElement_1(getTo_1(element.type), element.isOptional))(ast.elements), _fncts_base_data_Maybe_api.map((restElement) => _fncts_base_collection_immutable_Vector_api.map(getTo_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1060
+ case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((ps) => createPropertySignature_1(ps.name, getTo_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), _fncts_base_collection_immutable_Vector_api.map((is) => createIndexSignature_1(is.parameter, getTo_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1061
+ case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(getTo_1)(ast.types), ast.annotations);
1062
+ case 19: return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);
1063
+ case 20: return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);
1064
+ case 21: return getTo_1(ast.to);
1065
+ }
1066
+ return ast;
1279
1067
  }
1280
1068
  /**
1281
- * @tsplus static fncts.schema.AST getCompiler
1282
- */
1069
+ * @tsplus static fncts.schema.AST getCompiler
1070
+ */
1283
1071
  function getCompiler(match) {
1284
- const compile = (0, _utils.memoize)(ast => {
1285
- void 0;
1286
- return match[ast._tag](ast, compile);
1287
- });
1288
- return compile;
1072
+ const compile = (0, _fncts_schema_utils.memoize)((ast) => {
1073
+ return match[ast._tag](ast, compile);
1074
+ });
1075
+ return compile;
1289
1076
  }
1290
1077
  function getLiterals(ast, isDecoding) {
1291
- void 0;
1292
- switch (ast._tag) {
1293
- case 0 /* ASTTag.Declaration */:
1294
- {
1295
- const surrogate = ast.annotations.get(tsplus_module_4.Surrogate);
1296
- if (tsplus_module_16.isJust(surrogate)) {
1297
- return getLiterals(surrogate.value, isDecoding);
1298
- }
1299
- break;
1300
- }
1301
- case 17 /* ASTTag.TypeLiteral */:
1302
- {
1303
- const out = [];
1304
- for (let i = 0; i < ast.propertySignatures.length; i++) {
1305
- const propertySignature = tsplus_module_6.unsafeGet(i)(ast.propertySignatures);
1306
- if (isLiteral_1(propertySignature.type) && !propertySignature.isOptional) {
1307
- out.push([propertySignature.name, propertySignature.type]);
1308
- }
1309
- }
1310
- return out;
1311
- }
1312
- case 20 /* ASTTag.Refinement */:
1313
- return getLiterals(ast.from, isDecoding);
1314
- case 21 /* ASTTag.Transform */:
1315
- return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);
1316
- }
1317
- return [];
1078
+ switch (ast._tag) {
1079
+ case 0: {
1080
+ const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
1081
+ if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getLiterals(surrogate.value, isDecoding);
1082
+ break;
1083
+ }
1084
+ case 17: {
1085
+ const out = [];
1086
+ for (let i = 0; i < ast.propertySignatures.length; i++) {
1087
+ const propertySignature = _fncts_base_collection_immutable_Vector_api.unsafeGet(i)(ast.propertySignatures);
1088
+ if (isLiteral_1(propertySignature.type) && !propertySignature.isOptional) out.push([propertySignature.name, propertySignature.type]);
1089
+ }
1090
+ return out;
1091
+ }
1092
+ case 20: return getLiterals(ast.from, isDecoding);
1093
+ case 21: return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);
1094
+ }
1095
+ return [];
1318
1096
  }
1319
1097
  function getSearchTree(members, isDecoding) {
1320
- const keys = {};
1321
- const otherwise = [];
1322
- for (let i = 0; i < members.length; i++) {
1323
- const member = tsplus_module_6.unsafeGet(i)(members);
1324
- const tags = getLiterals(member, isDecoding);
1325
- if (tags.length > 0) {
1326
- for (let j = 0; j < tags.length; j++) {
1327
- const [key, literal] = tags[j];
1328
- const hash = String(literal.literal);
1329
- keys[key] ||= {
1330
- buckets: {},
1331
- ast: neverKeyword_1,
1332
- literals: []
1333
- };
1334
- const buckets = keys[key].buckets;
1335
- if (Object.prototype.hasOwnProperty.call(buckets, hash)) {
1336
- if (j < tags.length - 1) {
1337
- continue;
1338
- }
1339
- buckets[hash].push(member);
1340
- keys[key].ast = createUnion_1(tsplus_module_6.vector(keys[key].ast, literal));
1341
- keys[key].literals.push(literal);
1342
- } else {
1343
- buckets[hash] = [member];
1344
- keys[key].ast = createUnion_1(tsplus_module_6.vector(keys[key].ast, literal));
1345
- keys[key].literals.push(literal);
1346
- break;
1347
- }
1348
- }
1349
- } else {
1350
- otherwise.push(member);
1351
- }
1352
- }
1353
- return {
1354
- keys,
1355
- otherwise
1356
- };
1098
+ const keys = {};
1099
+ const otherwise = [];
1100
+ for (let i = 0; i < members.length; i++) {
1101
+ const member = _fncts_base_collection_immutable_Vector_api.unsafeGet(i)(members);
1102
+ const tags = getLiterals(member, isDecoding);
1103
+ if (tags.length > 0) for (let j = 0; j < tags.length; j++) {
1104
+ const [key, literal] = tags[j];
1105
+ const hash = String(literal.literal);
1106
+ keys[key] ||= {
1107
+ buckets: {},
1108
+ ast: neverKeyword_1,
1109
+ literals: []
1110
+ };
1111
+ const buckets = keys[key].buckets;
1112
+ if (Object.prototype.hasOwnProperty.call(buckets, hash)) {
1113
+ if (j < tags.length - 1) continue;
1114
+ buckets[hash].push(member);
1115
+ keys[key].ast = createUnion_1(_fncts_base_collection_immutable_Vector_api.vector(keys[key].ast, literal));
1116
+ keys[key].literals.push(literal);
1117
+ } else {
1118
+ buckets[hash] = [member];
1119
+ keys[key].ast = createUnion_1(_fncts_base_collection_immutable_Vector_api.vector(keys[key].ast, literal));
1120
+ keys[key].literals.push(literal);
1121
+ break;
1122
+ }
1123
+ }
1124
+ else otherwise.push(member);
1125
+ }
1126
+ return {
1127
+ keys,
1128
+ otherwise
1129
+ };
1357
1130
  }
1358
1131
  /**
1359
- * @tsplus pipeable fncts.schema.AST getFormattedExpected
1360
- */
1132
+ * @tsplus pipeable fncts.schema.AST getFormattedExpected
1133
+ */
1361
1134
  function getFormattedExpected(verbose = false) {
1362
- return self => {
1363
- if (verbose) {
1364
- const description = tsplus_module_18.orElse(() => self.annotations.get(tsplus_module_4.Title))(self.annotations.get(tsplus_module_4.Description));
1365
- return tsplus_module_15.match(() => description, identifier => tsplus_module_15.match(() => tsplus_module_7.just(identifier, fileName_1 + ":1710:23"), description => tsplus_module_7.just(`${identifier} (${description})`, fileName_1 + ":1711:34"))(description))(self.annotations.get(tsplus_module_4.Identifier));
1366
- } else {
1367
- return tsplus_module_18.orElse(() => self.annotations.get(tsplus_module_4.Description))(tsplus_module_18.orElse(() => self.annotations.get(tsplus_module_4.Title))(self.annotations.get(tsplus_module_4.Identifier)));
1368
- }
1369
- };
1370
- }
1135
+ return (self) => {
1136
+ if (verbose) {
1137
+ const description = _fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Title))(self.annotations.get(_fncts_schema_ASTAnnotation.Description));
1138
+ return _fncts_base_data_Maybe_destructors.match(() => description, (identifier) => _fncts_base_data_Maybe_destructors.match(() => _fncts_base_data_Maybe_constructors.just(identifier, fileName_1 + ":1710:23"), (description) => _fncts_base_data_Maybe_constructors.just(`${identifier} (${description})`, fileName_1 + ":1711:34"))(description))(self.annotations.get(_fncts_schema_ASTAnnotation.Identifier));
1139
+ } else return _fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Description))(_fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Title))(self.annotations.get(_fncts_schema_ASTAnnotation.Identifier)));
1140
+ };
1141
+ }
1142
+ //#endregion
1143
+ exports.AST = AST;
1144
+ exports.ASTTypeId = ASTTypeId;
1145
+ exports.Annotated = Annotated;
1146
+ exports.AnyKeyword = AnyKeyword;
1147
+ exports.BigIntKeyword = BigIntKeyword;
1148
+ exports.BooleanKeyword = BooleanKeyword;
1149
+ exports.Declaration = Declaration;
1150
+ exports.Element = Element;
1151
+ exports.Enum = Enum;
1152
+ exports.IndexSignature = IndexSignature;
1153
+ exports.Lazy = Lazy;
1154
+ exports.Literal = Literal;
1155
+ exports.NeverKeyword = NeverKeyword;
1156
+ exports.NumberKeyword = NumberKeyword;
1157
+ exports.ObjectKeyword = ObjectKeyword;
1158
+ exports.PropertySignature = PropertySignature;
1159
+ exports.Refinement = Refinement;
1160
+ exports.StringKeyword = StringKeyword;
1161
+ exports.SymbolKeyword = SymbolKeyword;
1162
+ exports.TemplateLiteral = TemplateLiteral;
1163
+ exports.TemplateLiteralSpan = TemplateLiteralSpan;
1164
+ exports.Transform = Transform;
1165
+ exports.Tuple = Tuple;
1166
+ exports.TypeLiteral = TypeLiteral;
1167
+ exports.UndefinedKeyword = UndefinedKeyword;
1168
+ exports.Union = Union;
1169
+ exports.UniqueSymbol = UniqueSymbol;
1170
+ exports.UnknownKeyword = UnknownKeyword;
1171
+ exports.Validation = Validation;
1172
+ exports.VoidKeyword = VoidKeyword;
1173
+ exports.anyKeyword = anyKeyword;
1174
+ exports.appendElement = appendElement;
1175
+ exports.appendRestElement = appendRestElement;
1176
+ exports.bigIntKeyword = bigIntKeyword;
1177
+ exports.booleanKeyword = booleanKeyword;
1178
+ exports.combineAnnotations = combineAnnotations;
1179
+ exports.concrete = concrete;
1180
+ exports.createDeclaration = createDeclaration;
1181
+ exports.createElement = createElement;
1182
+ exports.createEnum = createEnum;
1183
+ exports.createIndexSignature = createIndexSignature;
1184
+ exports.createKey = createKey;
1185
+ exports.createLazy = createLazy;
1186
+ exports.createLiteral = createLiteral;
1187
+ exports.createPropertySignature = createPropertySignature;
1188
+ exports.createRecord = createRecord;
1189
+ exports.createRefinement = createRefinement;
1190
+ exports.createTemplateLiteral = createTemplateLiteral;
1191
+ exports.createTransform = createTransform;
1192
+ exports.createTuple = createTuple;
1193
+ exports.createTypeLiteral = createTypeLiteral;
1194
+ exports.createUnion = createUnion;
1195
+ exports.createUniqueSymbol = createUniqueSymbol;
1196
+ exports.createValidation = createValidation;
1197
+ exports.getAnnotations = getAnnotations;
1198
+ exports.getCardinality = getCardinality;
1199
+ exports.getCompiler = getCompiler;
1200
+ exports.getFormattedExpected = getFormattedExpected;
1201
+ exports.getFrom = getFrom;
1202
+ exports.getLiterals = getLiterals;
1203
+ exports.getParameter = getParameter;
1204
+ exports.getPropertySignatures = getPropertySignatures;
1205
+ exports.getSearchTree = getSearchTree;
1206
+ exports.getTo = getTo;
1207
+ exports.getWeight = getWeight;
1208
+ exports.isAST = isAST;
1209
+ exports.isBigIntKeyword = isBigIntKeyword;
1210
+ exports.isBooleanKeyword = isBooleanKeyword;
1211
+ exports.isDeclaration = isDeclaration;
1212
+ exports.isLazy = isLazy;
1213
+ exports.isLiteral = isLiteral;
1214
+ exports.isNumberKeyword = isNumberKeyword;
1215
+ exports.isRefinement = isRefinement;
1216
+ exports.isStringKeyword = isStringKeyword;
1217
+ exports.isSymbolKeyword = isSymbolKeyword;
1218
+ exports.isTypeLiteral = isTypeLiteral;
1219
+ exports.isUnion = isUnion;
1220
+ exports.isUniqueSymbol = isUniqueSymbol;
1221
+ exports.keyof = keyof;
1222
+ exports.keysOf = keysOf;
1223
+ exports.neverKeyword = neverKeyword;
1224
+ exports.numberKeyword = numberKeyword;
1225
+ exports.objectKeyword = objectKeyword;
1226
+ exports.omit = omit;
1227
+ exports.partial = partial;
1228
+ exports.pick = pick;
1229
+ exports.setAnnotation = setAnnotation;
1230
+ exports.stringKeyword = stringKeyword;
1231
+ exports.symbolKeyword = symbolKeyword;
1232
+ exports.undefinedKeyword = undefinedKeyword;
1233
+ exports.unknownArray = unknownArray;
1234
+ exports.unknownKeyword = unknownKeyword;
1235
+ exports.unknownRecord = unknownRecord;
1236
+ exports.voidKeyword = voidKeyword;
1237
+
1371
1238
  //# sourceMappingURL=AST.cjs.map