@harmoniclabs/pebble 0.1.10 → 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.
- package/dist/IR/CompilationCtx.d.ts +40 -0
- package/dist/IR/CompilationCtx.js +54 -0
- package/dist/IR/IRHash.d.ts +23 -2
- package/dist/IR/IRHash.js +10 -60
- package/dist/IR/IRNodes/IRConst.js +35 -4
- package/dist/IR/IRNodes/IRHoisted.d.ts +0 -1
- package/dist/IR/IRNodes/IRHoisted.js +4 -6
- package/dist/IR/IRNodes/IRLetted.d.ts +0 -1
- package/dist/IR/IRNodes/IRLetted.js +4 -6
- package/dist/IR/IRNodes/IRNative/IRNativeTag.d.ts +22 -2
- package/dist/IR/IRNodes/IRNative/IRNativeTag.js +26 -2
- package/dist/IR/IRNodes/IRNative/index.d.ts +16 -1
- package/dist/IR/IRNodes/IRNative/index.js +31 -2
- package/dist/IR/IRNodes/utils/hashVarSym.d.ts +0 -1
- package/dist/IR/IRNodes/utils/hashVarSym.js +27 -33
- package/dist/IR/toUPLC/CompilerOptions.d.ts +34 -7
- package/dist/IR/toUPLC/CompilerOptions.js +19 -10
- package/dist/IR/toUPLC/compileIRToUPLC.js +39 -3
- package/dist/IR/toUPLC/subRoutines/inlineSingleUseLetBindingsAndReturnRoot.d.ts +23 -0
- package/dist/IR/toUPLC/subRoutines/inlineSingleUseLetBindingsAndReturnRoot.js +263 -0
- package/dist/IR/toUPLC/subRoutines/introduceCaseForDualHeadTailAndReturnRoot.d.ts +35 -0
- package/dist/IR/toUPLC/subRoutines/introduceCaseForDualHeadTailAndReturnRoot.js +169 -0
- package/dist/IR/toUPLC/subRoutines/replaceHoistedWithLetted.d.ts +0 -1
- package/dist/IR/toUPLC/subRoutines/replaceHoistedWithLetted.js +6 -6
- package/dist/IR/toUPLC/subRoutines/replaceNatives/nativeToIR.d.ts +2 -3
- package/dist/IR/toUPLC/subRoutines/replaceNatives/nativeToIR.js +106 -65
- package/dist/IR/toUPLC/subRoutines/rewriteHeadTailInCaseConsAndReturnRoot.d.ts +30 -0
- package/dist/IR/toUPLC/subRoutines/rewriteHeadTailInCaseConsAndReturnRoot.js +95 -0
- package/dist/IR/toUPLC/subRoutines/rewriteNativesAppliedToConstantsAndReturnRoot.js +36 -5
- package/dist/IR/toUPLC/subRoutines/rewriteToCaseOverConstAndReturnRoot.d.ts +35 -0
- package/dist/IR/toUPLC/subRoutines/rewriteToCaseOverConstAndReturnRoot.js +169 -0
- package/dist/IR/tree_utils/_ir_caseList.d.ts +15 -0
- package/dist/IR/tree_utils/_ir_caseList.js +19 -0
- package/dist/IR/tree_utils/bytesToHex.d.ts +8 -0
- package/dist/IR/tree_utils/bytesToHex.js +69 -0
- package/dist/ast/nodes/expr/functions/FuncExpr.d.ts +16 -2
- package/dist/ast/nodes/expr/functions/FuncExpr.js +17 -0
- package/dist/ast/nodes/expr/litteral/LitteralExpr.d.ts +2 -1
- package/dist/ast/nodes/expr/litteral/LitteralExpr.js +2 -0
- package/dist/ast/nodes/expr/litteral/TemplateStrExpr.d.ts +30 -0
- package/dist/ast/nodes/expr/litteral/TemplateStrExpr.js +35 -0
- package/dist/ast/nodes/statements/ExportStmt.d.ts +3 -3
- package/dist/ast/nodes/statements/PebbleStmt.d.ts +4 -3
- package/dist/ast/nodes/statements/PebbleStmt.js +6 -2
- package/dist/ast/nodes/statements/TestParam.d.ts +18 -0
- package/dist/ast/nodes/statements/TestParam.js +18 -0
- package/dist/ast/nodes/statements/TestStmt.d.ts +5 -3
- package/dist/ast/nodes/statements/TestStmt.js +3 -1
- package/dist/ast/nodes/statements/UsingStmt.d.ts +32 -2
- package/dist/ast/nodes/statements/UsingStmt.js +39 -3
- package/dist/ast/nodes/statements/declarations/NamespaceDecl.d.ts +21 -0
- package/dist/ast/nodes/statements/declarations/NamespaceDecl.js +31 -0
- package/dist/ast/nodes/statements/declarations/StructDecl.d.ts +16 -2
- package/dist/ast/nodes/statements/declarations/StructDecl.js +15 -1
- package/dist/compiler/AstCompiler/AstCompiler.d.ts +27 -0
- package/dist/compiler/AstCompiler/AstCompiler.js +244 -7
- package/dist/compiler/AstCompiler/internal/_deriveContractBody/_deriveContractBody.js +16 -5
- package/dist/compiler/AstCompiler/internal/exprs/_compileCallExpr.js +97 -6
- package/dist/compiler/AstCompiler/internal/exprs/_compileCaseExpr.js +31 -0
- package/dist/compiler/AstCompiler/internal/exprs/_compileFuncExpr.js +12 -5
- package/dist/compiler/AstCompiler/internal/exprs/_compileIsExpr.js +12 -0
- package/dist/compiler/AstCompiler/internal/exprs/_compileLitteralExpr.js +59 -0
- package/dist/compiler/AstCompiler/internal/exprs/_compilePropAccessExpr.d.ts +2 -3
- package/dist/compiler/AstCompiler/internal/exprs/_compilePropAccessExpr.js +64 -0
- package/dist/compiler/AstCompiler/internal/exprs/_compileUnaryPrefixExpr.js +13 -1
- package/dist/compiler/AstCompiler/internal/exprs/_compileVarAccessExpr.js +2 -0
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileAddExpr.js +18 -5
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileEqualExpr.js +3 -1
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileGreaterThanEqualExpr.js +2 -1
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileGreaterThanExpr.js +2 -1
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileLessThanEqualExpr.js +2 -1
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileLessThanExpr.js +2 -1
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileMultExpr.js +24 -6
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileNotEqualExpr.js +2 -1
- package/dist/compiler/AstCompiler/internal/exprs/binary/_compileSubExpr.js +16 -5
- package/dist/compiler/AstCompiler/internal/statements/_compileMatchStmt.js +33 -20
- package/dist/compiler/AstCompiler/internal/statements/_compileStatement.js +4 -1
- package/dist/compiler/AstCompiler/internal/statements/_compileTestStmt.d.ts +15 -1
- package/dist/compiler/AstCompiler/internal/statements/_compileTestStmt.js +70 -30
- package/dist/compiler/AstCompiler/internal/statements/_compileUsingAliasStmt.d.ts +11 -0
- package/dist/compiler/AstCompiler/internal/statements/_compileUsingAliasStmt.js +26 -0
- package/dist/compiler/AstCompiler/internal/statements/_compileUsingStmt.d.ts +9 -4
- package/dist/compiler/AstCompiler/internal/statements/_compileUsingStmt.js +51 -10
- package/dist/compiler/AstCompiler/internal/types/_compileDataEncodedConcreteType.js +21 -2
- package/dist/compiler/AstCompiler/internal/types/_compileSopEncodedConcreteType.js +17 -2
- package/dist/compiler/AstCompiler/scope/AstScope.d.ts +70 -1
- package/dist/compiler/AstCompiler/scope/AstScope.js +91 -0
- package/dist/compiler/AstCompiler/utils/getPropAccessReturnType.js +36 -1
- package/dist/compiler/AstCompiler/utils/monomorphizeGeneric.d.ts +36 -0
- package/dist/compiler/AstCompiler/utils/monomorphizeGeneric.js +123 -0
- package/dist/compiler/AstCompiler/utils/resolveNamespaceChain.d.ts +28 -0
- package/dist/compiler/AstCompiler/utils/resolveNamespaceChain.js +95 -0
- package/dist/compiler/AstCompiler/utils/resolveNamespacePath.d.ts +37 -0
- package/dist/compiler/AstCompiler/utils/resolveNamespacePath.js +93 -0
- package/dist/compiler/Compiler.d.ts +9 -1
- package/dist/compiler/Compiler.js +218 -30
- package/dist/compiler/TirCompiler/expressify/ExpressifyCtx.js +1 -1
- package/dist/compiler/TirCompiler/expressify/expressify.js +30 -2
- package/dist/compiler/TirCompiler/expressify/expressifyForStmt.d.ts +2 -1
- package/dist/compiler/TirCompiler/expressify/expressifyForStmt.js +45 -7
- package/dist/compiler/TirCompiler/expressify/expressifyVars.d.ts +0 -1
- package/dist/compiler/TirCompiler/expressify/expressifyVars.js +49 -15
- package/dist/compiler/test/TestResult.d.ts +38 -0
- package/dist/compiler/test/TestResult.js +6 -0
- package/dist/compiler/test/fuzz/PRNG.d.ts +26 -0
- package/dist/compiler/test/fuzz/PRNG.js +59 -0
- package/dist/compiler/tir/expressions/TirCaseExpr.d.ts +9 -0
- package/dist/compiler/tir/expressions/TirCaseExpr.js +144 -122
- package/dist/compiler/tir/expressions/TirElemAccessExpr.js +2 -2
- package/dist/compiler/tir/expressions/TirExpr.d.ts +2 -1
- package/dist/compiler/tir/expressions/TirExpr.js +2 -0
- package/dist/compiler/tir/expressions/TirFromDataExpr.js +102 -67
- package/dist/compiler/tir/expressions/TirIsExpr.js +14 -1
- package/dist/compiler/tir/expressions/TirNativeFunc.d.ts +18 -2
- package/dist/compiler/tir/expressions/TirNativeFunc.js +55 -118
- package/dist/compiler/tir/expressions/TirShowExpr.d.ts +52 -0
- package/dist/compiler/tir/expressions/TirShowExpr.js +199 -0
- package/dist/compiler/tir/expressions/TirToDataExpr.js +3 -0
- package/dist/compiler/tir/expressions/TirTraceExpr.js +11 -7
- package/dist/compiler/tir/expressions/TirTypeConversionExpr.js +10 -0
- package/dist/compiler/tir/expressions/TirVariableAccessExpr.d.ts +2 -3
- package/dist/compiler/tir/expressions/TirVariableAccessExpr.js +1 -4
- package/dist/compiler/tir/expressions/ToIRTermCtx.d.ts +20 -3
- package/dist/compiler/tir/expressions/ToIRTermCtx.js +48 -3
- package/dist/compiler/tir/expressions/binary/TirBinaryExpr.d.ts +2 -2
- package/dist/compiler/tir/expressions/binary/TirBinaryExpr.js +45 -8
- package/dist/compiler/tir/expressions/litteral/TirLitEnumMemberExpr.d.ts +19 -0
- package/dist/compiler/tir/expressions/litteral/TirLitEnumMemberExpr.js +24 -0
- package/dist/compiler/tir/expressions/litteral/TirLitteralExpr.d.ts +2 -1
- package/dist/compiler/tir/expressions/litteral/TirLitteralExpr.js +2 -0
- package/dist/compiler/tir/expressions/unary/TirUnaryMinus.js +4 -1
- package/dist/compiler/tir/program/TypedProgram.d.ts +101 -0
- package/dist/compiler/tir/program/TypedProgram.js +43 -0
- package/dist/compiler/tir/program/stdScope/populateBuiltinInterfaces.d.ts +17 -0
- package/dist/compiler/tir/program/stdScope/populateBuiltinInterfaces.js +70 -0
- package/dist/compiler/tir/program/stdScope/populateStdNamespace.d.ts +22 -0
- package/dist/compiler/tir/program/stdScope/populateStdNamespace.js +619 -0
- package/dist/compiler/tir/program/stdScope/prelude/preludeTypesSrc.js +35 -2
- package/dist/compiler/tir/program/stdScope/stdScope.d.ts +8 -0
- package/dist/compiler/tir/program/stdScope/stdScope.js +84 -41
- package/dist/compiler/tir/statements/TirStmt.js +0 -1
- package/dist/compiler/tir/statements/TirTestStmt.d.ts +46 -0
- package/dist/compiler/tir/statements/TirTestStmt.js +35 -0
- package/dist/compiler/tir/types/TirEnumType.d.ts +21 -0
- package/dist/compiler/tir/types/TirEnumType.js +36 -0
- package/dist/compiler/tir/types/TirNativeType/TirNativeType.d.ts +53 -2
- package/dist/compiler/tir/types/TirNativeType/TirNativeType.js +58 -1
- package/dist/compiler/tir/types/TirNativeType/native/array.d.ts +16 -0
- package/dist/compiler/tir/types/TirNativeType/native/array.js +38 -0
- package/dist/compiler/tir/types/TirNativeType/native/index.d.ts +2 -0
- package/dist/compiler/tir/types/TirNativeType/native/index.js +2 -0
- package/dist/compiler/tir/types/TirNativeType/native/value.d.ts +18 -0
- package/dist/compiler/tir/types/TirNativeType/native/value.js +17 -0
- package/dist/compiler/tir/types/TirStructType.js +6 -1
- package/dist/compiler/tir/types/TirType.d.ts +3 -2
- package/dist/compiler/tir/types/TirType.js +7 -2
- package/dist/compiler/tir/types/utils/canAssignTo.js +36 -1
- package/dist/compiler/tir/types/utils/canCastTo.js +14 -1
- package/dist/compiler/tir/types/utils/getDeconstructableType.d.ts +2 -1
- package/dist/compiler/tir/types/utils/getDeconstructableType.js +2 -0
- package/dist/compiler/tir/types/utils/inferTypeArgs.d.ts +19 -0
- package/dist/compiler/tir/types/utils/inferTypeArgs.js +83 -0
- package/dist/compiler/tir/types/utils/normalizeEnumToInt.d.ts +10 -0
- package/dist/compiler/tir/types/utils/normalizeEnumToInt.js +17 -0
- package/dist/compiler/tir/types/utils/substituteTypeParams.d.ts +9 -0
- package/dist/compiler/tir/types/utils/substituteTypeParams.js +67 -0
- package/dist/diagnostics/diagnosticMessages.generated.d.ts +10 -0
- package/dist/diagnostics/diagnosticMessages.generated.js +20 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/parser/Parser.d.ts +73 -3
- package/dist/parser/Parser.js +362 -46
- package/dist/tokenizer/Token.d.ts +106 -102
- package/dist/tokenizer/Token.js +111 -109
- package/dist/tokenizer/utils/tokenFromKeyword.js +11 -6
- package/dist/utils/semverSatisfies.d.ts +1 -0
- package/dist/utils/semverSatisfies.js +161 -0
- package/dist/version.generated.d.ts +1 -0
- package/dist/version.generated.js +2 -0
- package/package.json +5 -4
- package/dist/IR/tree_utils/_ir_lazyChooseList.d.ts +0 -3
- package/dist/IR/tree_utils/_ir_lazyChooseList.js +0 -7
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// Tiny npm-style semver range matcher. Supports exact versions, comparator
|
|
2
|
+
// prefixes (>=, >, <=, <, =), caret (^), tilde (~), wildcards (*, x, X),
|
|
3
|
+
// hyphen ranges (a - b), AND (whitespace), and OR (||). Prerelease/build
|
|
4
|
+
// metadata is dropped; only the numeric MAJOR.MINOR.PATCH is compared.
|
|
5
|
+
function parseLoose(input) {
|
|
6
|
+
let s = input.trim().replace(/^v/i, "");
|
|
7
|
+
if (s.length === 0)
|
|
8
|
+
return null;
|
|
9
|
+
s = s.split(/[-+]/)[0];
|
|
10
|
+
if (s === "" || s === "*" || s === "x" || s === "X") {
|
|
11
|
+
return [undefined, undefined, undefined];
|
|
12
|
+
}
|
|
13
|
+
const m = s.match(/^(\d+|x|X|\*)(?:\.(\d+|x|X|\*))?(?:\.(\d+|x|X|\*))?$/);
|
|
14
|
+
if (!m)
|
|
15
|
+
return null;
|
|
16
|
+
const conv = (p) => p === undefined || p === "x" || p === "X" || p === "*"
|
|
17
|
+
? undefined
|
|
18
|
+
: parseInt(p, 10);
|
|
19
|
+
return [conv(m[1]), conv(m[2]), conv(m[3])];
|
|
20
|
+
}
|
|
21
|
+
function parseStrict(input) {
|
|
22
|
+
const p = parseLoose(input);
|
|
23
|
+
if (!p)
|
|
24
|
+
return null;
|
|
25
|
+
if (p[0] === undefined || p[1] === undefined || p[2] === undefined)
|
|
26
|
+
return null;
|
|
27
|
+
return [p[0], p[1], p[2]];
|
|
28
|
+
}
|
|
29
|
+
function fillLow(p) {
|
|
30
|
+
return [p[0] ?? 0, p[1] ?? 0, p[2] ?? 0];
|
|
31
|
+
}
|
|
32
|
+
function cmp(a, b) {
|
|
33
|
+
if (a[0] !== b[0])
|
|
34
|
+
return a[0] < b[0] ? -1 : 1;
|
|
35
|
+
if (a[1] !== b[1])
|
|
36
|
+
return a[1] < b[1] ? -1 : 1;
|
|
37
|
+
if (a[2] !== b[2])
|
|
38
|
+
return a[2] < b[2] ? -1 : 1;
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
function satisfiesComp(v, c) {
|
|
42
|
+
const r = cmp(v, c.v);
|
|
43
|
+
switch (c.op) {
|
|
44
|
+
case ">": return r > 0;
|
|
45
|
+
case ">=": return r >= 0;
|
|
46
|
+
case "<": return r < 0;
|
|
47
|
+
case "<=": return r <= 0;
|
|
48
|
+
case "=": return r === 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function caretUpper(p) {
|
|
52
|
+
const [a, b, c] = p;
|
|
53
|
+
if ((a ?? 0) !== 0)
|
|
54
|
+
return [(a ?? 0) + 1, 0, 0];
|
|
55
|
+
if ((b ?? 0) !== 0)
|
|
56
|
+
return [0, (b ?? 0) + 1, 0];
|
|
57
|
+
return [0, 0, (c ?? 0) + 1];
|
|
58
|
+
}
|
|
59
|
+
function tildeUpper(p) {
|
|
60
|
+
const [a, b] = p;
|
|
61
|
+
if (b !== undefined)
|
|
62
|
+
return [a ?? 0, b + 1, 0];
|
|
63
|
+
return [(a ?? 0) + 1, 0, 0];
|
|
64
|
+
}
|
|
65
|
+
function expandToken(tok) {
|
|
66
|
+
tok = tok.trim();
|
|
67
|
+
if (tok === "" || tok === "*" || tok === "x" || tok === "X") {
|
|
68
|
+
return [{ op: ">=", v: [0, 0, 0] }];
|
|
69
|
+
}
|
|
70
|
+
const cmpMatch = tok.match(/^(>=|<=|>|<|=)\s*(.+)$/);
|
|
71
|
+
if (cmpMatch) {
|
|
72
|
+
const op = cmpMatch[1];
|
|
73
|
+
const p = parseLoose(cmpMatch[2]);
|
|
74
|
+
if (!p)
|
|
75
|
+
return null;
|
|
76
|
+
return [{ op, v: fillLow(p) }];
|
|
77
|
+
}
|
|
78
|
+
if (tok.startsWith("^")) {
|
|
79
|
+
const p = parseLoose(tok.slice(1));
|
|
80
|
+
if (!p)
|
|
81
|
+
return null;
|
|
82
|
+
return [
|
|
83
|
+
{ op: ">=", v: fillLow(p) },
|
|
84
|
+
{ op: "<", v: caretUpper(p) }
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
if (tok.startsWith("~")) {
|
|
88
|
+
const p = parseLoose(tok.slice(1));
|
|
89
|
+
if (!p)
|
|
90
|
+
return null;
|
|
91
|
+
return [
|
|
92
|
+
{ op: ">=", v: fillLow(p) },
|
|
93
|
+
{ op: "<", v: tildeUpper(p) }
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
const p = parseLoose(tok);
|
|
97
|
+
if (!p)
|
|
98
|
+
return null;
|
|
99
|
+
const [a, b, c] = p;
|
|
100
|
+
if (a === undefined)
|
|
101
|
+
return [{ op: ">=", v: [0, 0, 0] }];
|
|
102
|
+
if (b === undefined)
|
|
103
|
+
return [
|
|
104
|
+
{ op: ">=", v: [a, 0, 0] },
|
|
105
|
+
{ op: "<", v: [a + 1, 0, 0] }
|
|
106
|
+
];
|
|
107
|
+
if (c === undefined)
|
|
108
|
+
return [
|
|
109
|
+
{ op: ">=", v: [a, b, 0] },
|
|
110
|
+
{ op: "<", v: [a, b + 1, 0] }
|
|
111
|
+
];
|
|
112
|
+
return [{ op: "=", v: [a, b, c] }];
|
|
113
|
+
}
|
|
114
|
+
function expandRangePart(part) {
|
|
115
|
+
const hyphen = part.match(/^(\S+)\s+-\s+(\S+)$/);
|
|
116
|
+
if (hyphen) {
|
|
117
|
+
const lo = parseLoose(hyphen[1]);
|
|
118
|
+
const hi = parseLoose(hyphen[2]);
|
|
119
|
+
if (!lo || !hi)
|
|
120
|
+
return null;
|
|
121
|
+
const lower = { op: ">=", v: fillLow(lo) };
|
|
122
|
+
const [ha, hb, hc] = hi;
|
|
123
|
+
if (ha === undefined)
|
|
124
|
+
return [lower];
|
|
125
|
+
if (hb === undefined)
|
|
126
|
+
return [lower, { op: "<", v: [ha + 1, 0, 0] }];
|
|
127
|
+
if (hc === undefined)
|
|
128
|
+
return [lower, { op: "<", v: [ha, hb + 1, 0] }];
|
|
129
|
+
return [lower, { op: "<=", v: [ha, hb, hc] }];
|
|
130
|
+
}
|
|
131
|
+
const tokens = part.split(/\s+/).filter(t => t.length > 0);
|
|
132
|
+
if (tokens.length === 0)
|
|
133
|
+
return null;
|
|
134
|
+
const result = [];
|
|
135
|
+
for (const tok of tokens) {
|
|
136
|
+
const cmps = expandToken(tok);
|
|
137
|
+
if (!cmps)
|
|
138
|
+
return null;
|
|
139
|
+
result.push(...cmps);
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
export function semverSatisfies(version, range) {
|
|
144
|
+
if (typeof version !== "string" || typeof range !== "string")
|
|
145
|
+
return false;
|
|
146
|
+
const v = parseStrict(version);
|
|
147
|
+
if (!v)
|
|
148
|
+
return false;
|
|
149
|
+
const trimmed = range.trim();
|
|
150
|
+
if (trimmed.length === 0)
|
|
151
|
+
return false;
|
|
152
|
+
const ors = trimmed.split("||").map(s => s.trim());
|
|
153
|
+
for (const part of ors) {
|
|
154
|
+
const cmps = expandRangePart(part);
|
|
155
|
+
if (!cmps)
|
|
156
|
+
continue;
|
|
157
|
+
if (cmps.every(c => satisfiesComp(v, c)))
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COMPILER_VERSION = "0.3.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harmoniclabs/pebble",
|
|
3
|
-
"version": "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",
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
"prepublishOnly": "npm run ci",
|
|
18
18
|
"buidl": "npm run build",
|
|
19
19
|
"build": "rm -rf ./dist && npm run build:light",
|
|
20
|
-
"build:light": "npm run genDiagnosticMessages && tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
|
|
20
|
+
"build:light": "npm run genDiagnosticMessages && npm run --silent genVersion && tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
|
|
21
21
|
"build-and-replace": "npm run build && cp -r ./dist ../pebble-cli/node_modules/@harmoniclabs/pebble",
|
|
22
22
|
"genDiagnosticMessages": "node ./scripts/genDiagnosticMessages.js",
|
|
23
|
+
"genVersion": "node ./scripts/genVersion.js",
|
|
23
24
|
"test": "jest",
|
|
24
25
|
"test-dbg": "node --nolazy --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --colors --verbose",
|
|
25
26
|
"test:debug": "node --nolazy --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --colors --verbose",
|
|
@@ -52,12 +53,12 @@
|
|
|
52
53
|
"homepage": "https://github.com/HarmonicLabs/pebble#readme",
|
|
53
54
|
"dependencies": {
|
|
54
55
|
"@harmoniclabs/bigint-utils": "^1.0.0",
|
|
55
|
-
"@harmoniclabs/cardano-costmodels-ts": "^1.
|
|
56
|
+
"@harmoniclabs/cardano-costmodels-ts": "^1.6.1",
|
|
56
57
|
"@harmoniclabs/cbor": "^2.0.1",
|
|
57
58
|
"@harmoniclabs/crypto": "^0.3.0",
|
|
58
59
|
"@harmoniclabs/obj-utils": "^1.0.0",
|
|
59
60
|
"@harmoniclabs/plutus-data": "^2.0.1",
|
|
60
|
-
"@harmoniclabs/plutus-machine": "^3.0.
|
|
61
|
+
"@harmoniclabs/plutus-machine": "^3.0.3",
|
|
61
62
|
"@harmoniclabs/uint8array-utils": "^1.0.4",
|
|
62
63
|
"@harmoniclabs/uplc": "^2.0.5"
|
|
63
64
|
},
|
|
@@ -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
|
-
}
|