@calcit/procs 0.7.0-a4 → 0.7.0-a5
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/lib/calcit-data.mjs +1 -1
- package/lib/calcit.procs.mjs +1 -1
- package/lib/js-tuple.mjs +15 -1
- package/package.json +1 -1
- package/ts-src/calcit-data.mts +1 -1
- package/ts-src/calcit.procs.mts +1 -1
- package/ts-src/js-tuple.mts +15 -1
package/lib/calcit-data.mjs
CHANGED
package/lib/calcit.procs.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
// CALCIT VERSION
|
|
3
|
-
export const calcit_version = "0.7.0-
|
|
3
|
+
export const calcit_version = "0.7.0-a5";
|
|
4
4
|
import { parse } from "@cirru/parser.ts";
|
|
5
5
|
import { writeCirruCode } from "@cirru/writer.ts";
|
|
6
6
|
import { CalcitSymbol, CalcitTag, CalcitRef, CalcitRecur, newTag, refsRegistry, toString, getStringName, _$n__$e_, hashFunction, } from "./calcit-data.mjs";
|
package/lib/js-tuple.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toString } from "./calcit-data.mjs";
|
|
1
|
+
import { _$n__$e_, toString } from "./calcit-data.mjs";
|
|
2
2
|
export class CalcitTuple {
|
|
3
3
|
constructor(tagName, extra, klass) {
|
|
4
4
|
this.tag = tagName;
|
|
@@ -33,6 +33,20 @@ export class CalcitTuple {
|
|
|
33
33
|
count() {
|
|
34
34
|
return 1 + this.extra.length;
|
|
35
35
|
}
|
|
36
|
+
eq(y) {
|
|
37
|
+
if (!_$n__$e_(this.tag, y.tag)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
if (this.extra.length !== y.extra.length) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
for (let idx = 0; idx < this.extra.length; idx++) {
|
|
44
|
+
if (!_$n__$e_(this.extra[idx], y.extra[idx])) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
36
50
|
toString(disableJsDataWarning = false) {
|
|
37
51
|
let args = [this.tag, ...this.extra];
|
|
38
52
|
let content = "";
|
package/package.json
CHANGED
package/ts-src/calcit-data.mts
CHANGED
|
@@ -581,7 +581,7 @@ export let _$n__$e_ = (x: CalcitValue, y: CalcitValue): boolean => {
|
|
|
581
581
|
}
|
|
582
582
|
if (x instanceof CalcitTuple) {
|
|
583
583
|
if (y instanceof CalcitTuple) {
|
|
584
|
-
return
|
|
584
|
+
return x.eq(y);
|
|
585
585
|
}
|
|
586
586
|
return false;
|
|
587
587
|
}
|
package/ts-src/calcit.procs.mts
CHANGED
package/ts-src/js-tuple.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hash } from "@calcit/ternary-tree";
|
|
2
2
|
|
|
3
3
|
import { CalcitValue } from "./js-primes.mjs";
|
|
4
|
-
import { newTag, toString } from "./calcit-data.mjs";
|
|
4
|
+
import { _$n__$e_, newTag, toString } from "./calcit-data.mjs";
|
|
5
5
|
import { CalcitRecord } from "./js-record.mjs";
|
|
6
6
|
|
|
7
7
|
export class CalcitTuple {
|
|
@@ -38,6 +38,20 @@ export class CalcitTuple {
|
|
|
38
38
|
count() {
|
|
39
39
|
return 1 + this.extra.length;
|
|
40
40
|
}
|
|
41
|
+
eq(y: CalcitTuple): boolean {
|
|
42
|
+
if (!_$n__$e_(this.tag, y.tag)) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
if (this.extra.length !== y.extra.length) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
for (let idx = 0; idx < this.extra.length; idx++) {
|
|
49
|
+
if (!_$n__$e_(this.extra[idx], y.extra[idx])) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
41
55
|
toString(disableJsDataWarning: boolean = false): string {
|
|
42
56
|
let args = [this.tag, ...this.extra];
|
|
43
57
|
let content = "";
|