@harmoniclabs/pebble 0.2.0 → 0.3.0

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 (116) hide show
  1. package/dist/IR/CompilationCtx.d.ts +40 -0
  2. package/dist/IR/CompilationCtx.js +54 -0
  3. package/dist/IR/IRHash.d.ts +23 -2
  4. package/dist/IR/IRHash.js +10 -60
  5. package/dist/IR/IRNodes/IRConst.js +22 -2
  6. package/dist/IR/IRNodes/IRHoisted.d.ts +0 -1
  7. package/dist/IR/IRNodes/IRHoisted.js +4 -6
  8. package/dist/IR/IRNodes/IRLetted.d.ts +0 -1
  9. package/dist/IR/IRNodes/IRLetted.js +4 -6
  10. package/dist/IR/IRNodes/IRNative/IRNativeTag.d.ts +22 -2
  11. package/dist/IR/IRNodes/IRNative/IRNativeTag.js +26 -2
  12. package/dist/IR/IRNodes/IRNative/index.d.ts +16 -1
  13. package/dist/IR/IRNodes/IRNative/index.js +27 -2
  14. package/dist/IR/IRNodes/utils/hashVarSym.d.ts +0 -1
  15. package/dist/IR/IRNodes/utils/hashVarSym.js +27 -33
  16. package/dist/IR/toUPLC/CompilerOptions.d.ts +12 -0
  17. package/dist/IR/toUPLC/CompilerOptions.js +14 -9
  18. package/dist/IR/toUPLC/compileIRToUPLC.js +39 -3
  19. package/dist/IR/toUPLC/subRoutines/inlineSingleUseLetBindingsAndReturnRoot.d.ts +23 -0
  20. package/dist/IR/toUPLC/subRoutines/inlineSingleUseLetBindingsAndReturnRoot.js +263 -0
  21. package/dist/IR/toUPLC/subRoutines/introduceCaseForDualHeadTailAndReturnRoot.d.ts +35 -0
  22. package/dist/IR/toUPLC/subRoutines/introduceCaseForDualHeadTailAndReturnRoot.js +169 -0
  23. package/dist/IR/toUPLC/subRoutines/replaceHoistedWithLetted.d.ts +0 -1
  24. package/dist/IR/toUPLC/subRoutines/replaceHoistedWithLetted.js +6 -6
  25. package/dist/IR/toUPLC/subRoutines/replaceNatives/nativeToIR.d.ts +2 -3
  26. package/dist/IR/toUPLC/subRoutines/replaceNatives/nativeToIR.js +106 -65
  27. package/dist/IR/toUPLC/subRoutines/rewriteHeadTailInCaseConsAndReturnRoot.d.ts +30 -0
  28. package/dist/IR/toUPLC/subRoutines/rewriteHeadTailInCaseConsAndReturnRoot.js +95 -0
  29. package/dist/IR/toUPLC/subRoutines/rewriteNativesAppliedToConstantsAndReturnRoot.js +36 -5
  30. package/dist/IR/toUPLC/subRoutines/rewriteToCaseOverConstAndReturnRoot.d.ts +35 -0
  31. package/dist/IR/toUPLC/subRoutines/rewriteToCaseOverConstAndReturnRoot.js +169 -0
  32. package/dist/IR/tree_utils/_ir_caseList.d.ts +15 -0
  33. package/dist/IR/tree_utils/_ir_caseList.js +19 -0
  34. package/dist/ast/nodes/statements/declarations/StructDecl.d.ts +16 -2
  35. package/dist/ast/nodes/statements/declarations/StructDecl.js +15 -1
  36. package/dist/compiler/AstCompiler/AstCompiler.d.ts +1 -0
  37. package/dist/compiler/AstCompiler/AstCompiler.js +41 -4
  38. package/dist/compiler/AstCompiler/internal/_deriveContractBody/_deriveContractBody.js +3 -3
  39. package/dist/compiler/AstCompiler/internal/exprs/_compileCaseExpr.js +31 -0
  40. package/dist/compiler/AstCompiler/internal/exprs/_compileIsExpr.js +12 -0
  41. package/dist/compiler/AstCompiler/internal/exprs/_compilePropAccessExpr.js +36 -0
  42. package/dist/compiler/AstCompiler/internal/exprs/_compileUnaryPrefixExpr.js +13 -1
  43. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileAddExpr.js +18 -5
  44. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileEqualExpr.js +3 -1
  45. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileGreaterThanEqualExpr.js +2 -1
  46. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileGreaterThanExpr.js +2 -1
  47. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileLessThanEqualExpr.js +2 -1
  48. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileLessThanExpr.js +2 -1
  49. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileMultExpr.js +24 -6
  50. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileNotEqualExpr.js +2 -1
  51. package/dist/compiler/AstCompiler/internal/exprs/binary/_compileSubExpr.js +16 -5
  52. package/dist/compiler/AstCompiler/internal/statements/_compileMatchStmt.js +33 -20
  53. package/dist/compiler/AstCompiler/utils/getPropAccessReturnType.js +11 -0
  54. package/dist/compiler/Compiler.js +20 -27
  55. package/dist/compiler/TirCompiler/expressify/ExpressifyCtx.js +1 -1
  56. package/dist/compiler/TirCompiler/expressify/expressify.js +30 -2
  57. package/dist/compiler/TirCompiler/expressify/expressifyForStmt.d.ts +2 -1
  58. package/dist/compiler/TirCompiler/expressify/expressifyForStmt.js +45 -7
  59. package/dist/compiler/TirCompiler/expressify/expressifyVars.d.ts +0 -1
  60. package/dist/compiler/TirCompiler/expressify/expressifyVars.js +23 -8
  61. package/dist/compiler/tir/expressions/TirCaseExpr.d.ts +9 -0
  62. package/dist/compiler/tir/expressions/TirCaseExpr.js +144 -122
  63. package/dist/compiler/tir/expressions/TirElemAccessExpr.js +2 -2
  64. package/dist/compiler/tir/expressions/TirFromDataExpr.js +102 -67
  65. package/dist/compiler/tir/expressions/TirIsExpr.js +14 -1
  66. package/dist/compiler/tir/expressions/TirNativeFunc.d.ts +1 -2
  67. package/dist/compiler/tir/expressions/TirNativeFunc.js +2 -12
  68. package/dist/compiler/tir/expressions/TirToDataExpr.js +3 -0
  69. package/dist/compiler/tir/expressions/TirTypeConversionExpr.js +10 -0
  70. package/dist/compiler/tir/expressions/TirVariableAccessExpr.d.ts +2 -3
  71. package/dist/compiler/tir/expressions/TirVariableAccessExpr.js +1 -4
  72. package/dist/compiler/tir/expressions/ToIRTermCtx.d.ts +20 -3
  73. package/dist/compiler/tir/expressions/ToIRTermCtx.js +48 -3
  74. package/dist/compiler/tir/expressions/binary/TirBinaryExpr.d.ts +2 -2
  75. package/dist/compiler/tir/expressions/binary/TirBinaryExpr.js +45 -8
  76. package/dist/compiler/tir/expressions/litteral/TirLitEnumMemberExpr.d.ts +19 -0
  77. package/dist/compiler/tir/expressions/litteral/TirLitEnumMemberExpr.js +24 -0
  78. package/dist/compiler/tir/expressions/litteral/TirLitteralExpr.d.ts +2 -1
  79. package/dist/compiler/tir/expressions/litteral/TirLitteralExpr.js +2 -0
  80. package/dist/compiler/tir/expressions/unary/TirUnaryMinus.js +4 -1
  81. package/dist/compiler/tir/program/stdScope/populateStdNamespace.js +49 -4
  82. package/dist/compiler/tir/program/stdScope/prelude/preludeTypesSrc.js +35 -2
  83. package/dist/compiler/tir/program/stdScope/stdScope.d.ts +7 -0
  84. package/dist/compiler/tir/program/stdScope/stdScope.js +83 -40
  85. package/dist/compiler/tir/types/TirEnumType.d.ts +21 -0
  86. package/dist/compiler/tir/types/TirEnumType.js +36 -0
  87. package/dist/compiler/tir/types/TirNativeType/TirNativeType.d.ts +4 -2
  88. package/dist/compiler/tir/types/TirNativeType/TirNativeType.js +5 -0
  89. package/dist/compiler/tir/types/TirNativeType/native/array.d.ts +16 -0
  90. package/dist/compiler/tir/types/TirNativeType/native/array.js +38 -0
  91. package/dist/compiler/tir/types/TirNativeType/native/index.d.ts +2 -0
  92. package/dist/compiler/tir/types/TirNativeType/native/index.js +2 -0
  93. package/dist/compiler/tir/types/TirNativeType/native/value.d.ts +18 -0
  94. package/dist/compiler/tir/types/TirNativeType/native/value.js +17 -0
  95. package/dist/compiler/tir/types/TirStructType.js +6 -1
  96. package/dist/compiler/tir/types/TirType.d.ts +3 -2
  97. package/dist/compiler/tir/types/TirType.js +4 -1
  98. package/dist/compiler/tir/types/utils/canAssignTo.js +28 -0
  99. package/dist/compiler/tir/types/utils/canCastTo.js +14 -1
  100. package/dist/compiler/tir/types/utils/getDeconstructableType.d.ts +2 -1
  101. package/dist/compiler/tir/types/utils/getDeconstructableType.js +2 -0
  102. package/dist/compiler/tir/types/utils/inferTypeArgs.js +4 -0
  103. package/dist/compiler/tir/types/utils/normalizeEnumToInt.d.ts +10 -0
  104. package/dist/compiler/tir/types/utils/normalizeEnumToInt.js +17 -0
  105. package/dist/compiler/tir/types/utils/substituteTypeParams.js +5 -0
  106. package/dist/diagnostics/diagnosticMessages.generated.d.ts +5 -0
  107. package/dist/diagnostics/diagnosticMessages.generated.js +10 -0
  108. package/dist/parser/Parser.js +29 -13
  109. package/dist/tokenizer/Token.d.ts +8 -7
  110. package/dist/tokenizer/Token.js +8 -7
  111. package/dist/tokenizer/utils/tokenFromKeyword.js +2 -0
  112. package/dist/version.generated.d.ts +1 -1
  113. package/dist/version.generated.js +1 -1
  114. package/package.json +3 -3
  115. package/dist/IR/tree_utils/_ir_lazyChooseList.d.ts +0 -3
  116. package/dist/IR/tree_utils/_ir_lazyChooseList.js +0 -7
@@ -0,0 +1,17 @@
1
+ import { TirAliasType } from "../TirAliasType.js";
2
+ import { TirEnumType } from "../TirEnumType.js";
3
+ /**
4
+ * If `t` is an enum type (or alias of one), returns the shared `int` type
5
+ * (since enums lower to plain ints at runtime). Otherwise returns `t`.
6
+ *
7
+ * Use this to relax type checks for binary operators that treat enums as
8
+ * integers (arithmetic, comparison, equality).
9
+ */
10
+ export function normalizeEnumToInt(t, int_t) {
11
+ let probe = t;
12
+ while (probe instanceof TirAliasType)
13
+ probe = probe.aliased;
14
+ if (probe instanceof TirEnumType)
15
+ return int_t;
16
+ return t;
17
+ }
@@ -1,4 +1,5 @@
1
1
  import { TirAliasType } from "../TirAliasType.js";
2
+ import { TirArrayT } from "../TirNativeType/native/array.js";
2
3
  import { TirFuncT } from "../TirNativeType/native/function.js";
3
4
  import { TirLinearMapT } from "../TirNativeType/native/linearMap.js";
4
5
  import { TirLinearMapEntryT } from "../TirNativeType/native/linearMapEntry.js";
@@ -23,6 +24,10 @@ export function substituteTypeParams(t, subst) {
23
24
  const sub = substituteTypeParams(t.typeArg, subst);
24
25
  return sub === t.typeArg ? t : new TirListT(sub);
25
26
  }
27
+ if (t instanceof TirArrayT) {
28
+ const sub = substituteTypeParams(t.typeArg, subst);
29
+ return sub === t.typeArg ? t : new TirArrayT(sub);
30
+ }
26
31
  if (t instanceof TirFuncT) {
27
32
  let changed = false;
28
33
  const newArgs = t.argTypes.map(a => {
@@ -283,6 +283,11 @@ export declare enum DiagnosticCode {
283
283
  _private_modifier_is_only_allowed_on_declarations_inside_a_namespace = 30003,
284
284
  Namespaces_cannot_be_declared_here = 30004,
285
285
  _0_is_not_a_namespace = 30005,
286
+ Enum_members_cannot_have_explicit_values = 30100,
287
+ Duplicate_enum_member_0 = 30101,
288
+ Enum_must_have_at_least_one_member = 30102,
289
+ Property_0_is_not_a_member_of_enum_1 = 30103,
290
+ Enum_member_pattern_cannot_have_fields = 30104,
286
291
  Dev_was_too_lazy_to_add_a_prooper_error_message_Something_went_wrong = 42069
287
292
  }
288
293
  /** Translates a diagnostic code to its respective string. */
@@ -285,6 +285,11 @@ export var DiagnosticCode;
285
285
  DiagnosticCode[DiagnosticCode["_private_modifier_is_only_allowed_on_declarations_inside_a_namespace"] = 30003] = "_private_modifier_is_only_allowed_on_declarations_inside_a_namespace";
286
286
  DiagnosticCode[DiagnosticCode["Namespaces_cannot_be_declared_here"] = 30004] = "Namespaces_cannot_be_declared_here";
287
287
  DiagnosticCode[DiagnosticCode["_0_is_not_a_namespace"] = 30005] = "_0_is_not_a_namespace";
288
+ DiagnosticCode[DiagnosticCode["Enum_members_cannot_have_explicit_values"] = 30100] = "Enum_members_cannot_have_explicit_values";
289
+ DiagnosticCode[DiagnosticCode["Duplicate_enum_member_0"] = 30101] = "Duplicate_enum_member_0";
290
+ DiagnosticCode[DiagnosticCode["Enum_must_have_at_least_one_member"] = 30102] = "Enum_must_have_at_least_one_member";
291
+ DiagnosticCode[DiagnosticCode["Property_0_is_not_a_member_of_enum_1"] = 30103] = "Property_0_is_not_a_member_of_enum_1";
292
+ DiagnosticCode[DiagnosticCode["Enum_member_pattern_cannot_have_fields"] = 30104] = "Enum_member_pattern_cannot_have_fields";
288
293
  DiagnosticCode[DiagnosticCode["Dev_was_too_lazy_to_add_a_prooper_error_message_Something_went_wrong"] = 42069] = "Dev_was_too_lazy_to_add_a_prooper_error_message_Something_went_wrong";
289
294
  })(DiagnosticCode || (DiagnosticCode = {}));
290
295
  /** Translates a diagnostic code to its respective string. */
@@ -573,6 +578,11 @@ export function diagnosticCodeToString(code) {
573
578
  case 30003: return "'private' modifier is only allowed on declarations inside a namespace.";
574
579
  case 30004: return "Namespaces cannot be declared here.";
575
580
  case 30005: return "'{0}' is not a namespace.";
581
+ case 30100: return "Enum members cannot have explicit values.";
582
+ case 30101: return "Duplicate enum member '{0}'.";
583
+ case 30102: return "Enum must have at least one member.";
584
+ case 30103: return "Property '{0}' is not a member of enum '{1}'.";
585
+ case 30104: return "Enum member pattern cannot have fields.";
576
586
  case 42069: return "Dev was too lazy to add a prooper error message. Something went wrong";
577
587
  default: return "";
578
588
  }
@@ -178,13 +178,19 @@ export class Parser extends DiagnosticEmitter {
178
178
  case Token.Data: {
179
179
  // `next()` skips `data` keyword
180
180
  tn.next();
181
+ let extraFlags = StructDeclAstFlags.onlyDataEncoding;
182
+ // accept `data untagged struct ...`
183
+ if (tn.peek() === Token.Untagged) {
184
+ tn.next();
185
+ extraFlags |= StructDeclAstFlags.untagged;
186
+ }
181
187
  // positions on (expected) `struct` keyword
182
188
  if (tn.peek() !== Token.Struct) {
183
189
  console.error(Token[tn.peek()]);
184
190
  return this.error(DiagnosticCode._0_expected, tn.range(), "struct");
185
191
  }
186
192
  tn.next(); // skip `struct`
187
- statement = this.parseStruct(StructDeclAstFlags.onlyDataEncoding, flags, startPos);
193
+ statement = this.parseStruct(extraFlags, flags, startPos);
188
194
  break;
189
195
  }
190
196
  case Token.Runtime: {
@@ -203,6 +209,22 @@ export class Parser extends DiagnosticEmitter {
203
209
  statement = this.parseStruct(StructDeclAstFlags.none, flags, startPos);
204
210
  break;
205
211
  }
212
+ case Token.Untagged: {
213
+ // `untagged` keyword forces listData encoding (single ctor).
214
+ // Accept: `untagged struct ...` or `untagged data struct ...`.
215
+ tn.next(); // skip `untagged`
216
+ let extraFlags = StructDeclAstFlags.untagged;
217
+ if (tn.peek() === Token.Data) {
218
+ tn.next(); // skip `data`
219
+ extraFlags |= StructDeclAstFlags.onlyDataEncoding;
220
+ }
221
+ if (tn.peek() !== Token.Struct) {
222
+ return this.error(DiagnosticCode._0_expected, tn.range(), "struct");
223
+ }
224
+ tn.next(); // skip `struct`
225
+ statement = this.parseStruct(extraFlags, flags, startPos);
226
+ break;
227
+ }
206
228
  case Token.Interface: {
207
229
  tn.next();
208
230
  statement = this.parseInterface(flags, startPos);
@@ -884,7 +906,7 @@ export class Parser extends DiagnosticEmitter {
884
906
  [
885
907
  new StructConstrDecl(new Identifier(name.text, name.range), [], // fields
886
908
  range)
887
- ], structDeclFlags | StructDeclAstFlags.untaggedSingleConstructor, range.clone());
909
+ ], structDeclFlags | StructDeclAstFlags.shortcutSingleConstructor, range.clone());
888
910
  }
889
911
  let constrIdentifier = undefined;
890
912
  // in case of single constr shortcut
@@ -905,7 +927,7 @@ export class Parser extends DiagnosticEmitter {
905
927
  tn.skip(Token.Semicolon); // if any
906
928
  return new StructDecl(name, typeParams, [
907
929
  new StructConstrDecl(new Identifier(name.text, name.range), fields, tn.range(startPos, tn.pos))
908
- ], structDeclFlags | StructDeclAstFlags.untaggedSingleConstructor, tn.range(startPos, tn.pos));
930
+ ], structDeclFlags | StructDeclAstFlags.shortcutSingleConstructor, tn.range(startPos, tn.pos));
909
931
  }
910
932
  const constrFields = this.parseStructConstrFields(flags);
911
933
  if (!Array.isArray(constrFields))
@@ -1885,17 +1907,14 @@ export class Parser extends DiagnosticEmitter {
1885
1907
  const expr = this.parseExpr(Precedence.Relational + 1);
1886
1908
  if (!expr)
1887
1909
  return undefined;
1888
- let noPatternCaseSeen = false;
1889
1910
  const cases = new Array();
1890
1911
  while (tn.skip(Token.Is)) {
1891
- if (noPatternCaseSeen)
1892
- return this.error(DiagnosticCode.This_case_will_never_be_evaluated_because_all_patterns_will_be_catched_before, tn.range());
1893
1912
  const startPos = tn.tokenPos;
1894
1913
  const matcher = this._parseVarDecl(CommonFlags.Const);
1895
1914
  if (!matcher)
1896
1915
  return undefined;
1897
- if (matcher instanceof SimpleVarDecl)
1898
- noPatternCaseSeen = true;
1916
+ // SimpleVarDecl patterns are validated by the AstCompiler, which
1917
+ // has type info (enum-member promotion vs invalid catch-all).
1899
1918
  if (matcher.initExpr || matcher.type)
1900
1919
  return this.error(DiagnosticCode.Patterns_may_not_have_initializers_or_explicit_types, matcher.initExpr ? matcher.initExpr.range : matcher.type.range);
1901
1920
  if (!tn.skip(Token.FatArrow))
@@ -2626,7 +2645,6 @@ export class Parser extends DiagnosticEmitter {
2626
2645
  return this.error(DiagnosticCode.Expression_expected, tn.range(startPos - 5, startPos));
2627
2646
  if (!tn.skip(Token.OpenBrace))
2628
2647
  return this.error(DiagnosticCode._0_expected, tn.range(), "{");
2629
- let noPatternCaseSeen = false;
2630
2648
  const cases = new Array();
2631
2649
  while (!tn.skip(Token.CloseBrace)
2632
2650
  && tn.peek() !== Token.Else) {
@@ -2637,10 +2655,8 @@ export class Parser extends DiagnosticEmitter {
2637
2655
  const pattern = this._parseVarDecl(CommonFlags.Const, true);
2638
2656
  if (!pattern)
2639
2657
  return this.error(DiagnosticCode.Pattern_expected, tn.range());
2640
- if (noPatternCaseSeen)
2641
- return this.error(DiagnosticCode.This_case_will_never_be_evaluated_because_all_patterns_will_be_catched_before, pattern.range);
2642
- if (pattern instanceof SimpleVarDecl)
2643
- noPatternCaseSeen = true;
2658
+ // SimpleVarDecl patterns are validated by the AstCompiler, which
2659
+ // has type info (enum-member promotion vs invalid catch-all).
2644
2660
  if (!tn.skip(Token.Colon))
2645
2661
  return this.error(DiagnosticCode._0_expected, tn.range(), ":");
2646
2662
  const statePreBody = tn.mark();
@@ -164,11 +164,12 @@ export declare enum Token {
164
164
  List = 117,
165
165
  LinearMap = 118,
166
166
  Runtime = 119,
167
- Identifier = 120,
168
- StringLiteral = 121,
169
- HexBytesLiteral = 122,
170
- IntegerLiteral = 123,
171
- StringTemplateLiteralQuote = 124,
172
- Invalid = 125,
173
- EndOfFile = 126
167
+ Untagged = 120,
168
+ Identifier = 121,
169
+ StringLiteral = 122,
170
+ HexBytesLiteral = 123,
171
+ IntegerLiteral = 124,
172
+ StringTemplateLiteralQuote = 125,
173
+ Invalid = 126,
174
+ EndOfFile = 127
174
175
  }
@@ -204,16 +204,17 @@ export var Token;
204
204
  // struct decl modifiers
205
205
  // taggedModifier, // `tagged` data struct
206
206
  Token[Token["Runtime"] = 119] = "Runtime";
207
+ Token[Token["Untagged"] = 120] = "Untagged";
207
208
  // literals
208
- Token[Token["Identifier"] = 120] = "Identifier";
209
- Token[Token["StringLiteral"] = 121] = "StringLiteral";
210
- Token[Token["HexBytesLiteral"] = 122] = "HexBytesLiteral";
211
- Token[Token["IntegerLiteral"] = 123] = "IntegerLiteral";
209
+ Token[Token["Identifier"] = 121] = "Identifier";
210
+ Token[Token["StringLiteral"] = 122] = "StringLiteral";
211
+ Token[Token["HexBytesLiteral"] = 123] = "HexBytesLiteral";
212
+ Token[Token["IntegerLiteral"] = 124] = "IntegerLiteral";
212
213
  // FloatLiteral,
213
- Token[Token["StringTemplateLiteralQuote"] = 124] = "StringTemplateLiteralQuote";
214
+ Token[Token["StringTemplateLiteralQuote"] = 125] = "StringTemplateLiteralQuote";
214
215
  // meta
215
- Token[Token["Invalid"] = 125] = "Invalid";
216
- Token[Token["EndOfFile"] = 126] = "EndOfFile";
216
+ Token[Token["Invalid"] = 126] = "Invalid";
217
+ Token[Token["EndOfFile"] = 127] = "EndOfFile";
217
218
  })(Token || (Token = {}));
218
219
  Object.freeze(Token);
219
220
  /*
@@ -221,6 +221,8 @@ export function tokenFromKeyword(text) {
221
221
  return Token.Undefined;
222
222
  if (text === "using")
223
223
  return Token.Using;
224
+ if (text === "untagged")
225
+ return Token.Untagged;
224
226
  break;
225
227
  }
226
228
  case 118 /* CharCode.v */: {
@@ -1 +1 @@
1
- export declare const COMPILER_VERSION = "0.2.0";
1
+ export declare const COMPILER_VERSION = "0.3.0";
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated by scripts/genVersion.js. Do not edit.
2
- export const COMPILER_VERSION = "0.2.0";
2
+ export const COMPILER_VERSION = "0.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harmoniclabs/pebble",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "A simple, yet rock solid, functional language with an imperative bias, targeting UPLC",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -53,12 +53,12 @@
53
53
  "homepage": "https://github.com/HarmonicLabs/pebble#readme",
54
54
  "dependencies": {
55
55
  "@harmoniclabs/bigint-utils": "^1.0.0",
56
- "@harmoniclabs/cardano-costmodels-ts": "^1.4.0",
56
+ "@harmoniclabs/cardano-costmodels-ts": "^1.6.1",
57
57
  "@harmoniclabs/cbor": "^2.0.1",
58
58
  "@harmoniclabs/crypto": "^0.3.0",
59
59
  "@harmoniclabs/obj-utils": "^1.0.0",
60
60
  "@harmoniclabs/plutus-data": "^2.0.1",
61
- "@harmoniclabs/plutus-machine": "^3.0.0",
61
+ "@harmoniclabs/plutus-machine": "^3.0.3",
62
62
  "@harmoniclabs/uint8array-utils": "^1.0.4",
63
63
  "@harmoniclabs/uplc": "^2.0.5"
64
64
  },
@@ -1,3 +0,0 @@
1
- import { IRForced } from "../IRNodes/IRForced.js";
2
- import type { IRTerm } from "../IRTerm.js";
3
- export declare function _ir_lazyChooseList(listTerm: IRTerm, caseNil: IRTerm, caseCons: IRTerm): IRForced;
@@ -1,7 +0,0 @@
1
- import { _ir_apps } from "../IRNodes/IRApp.js";
2
- import { IRDelayed } from "../IRNodes/IRDelayed.js";
3
- import { IRForced } from "../IRNodes/IRForced.js";
4
- import { IRNative } from "../IRNodes/IRNative/index.js";
5
- export function _ir_lazyChooseList(listTerm, caseNil, caseCons) {
6
- return new IRForced(_ir_apps(IRNative.strictChooseList, listTerm, new IRDelayed(caseNil), new IRDelayed(caseCons)));
7
- }