@cavelang/canonical 0.5.0 → 0.12.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.
@@ -8,8 +8,8 @@
8
8
  * ingesting the text first.
9
9
  */
10
10
  import * as Registry from './registry.ts';
11
- /** The spec §5.5 declaration block, verbatim. */
12
- export declare const standardPrelude = "REVERSE IS verb ; declares that two verbs name the same edge read in opposite directions\nREVERSE HAS arity: 2\nCONTAINS REVERSE PART-OF\nCAUSE REVERSE CAUSED-BY\nPRECEDES REVERSE FOLLOWS\nUSES REVERSE USED-BY\nNEEDS REVERSE NEEDED-BY\nENABLES REVERSE ENABLED-BY\nBLOCKS REVERSE BLOCKED-BY\nEXTENDS REVERSE EXTENDED-BY\n";
13
- /** Registry with the standard §5.5 inverse pairs declared. */
11
+ /** The spec §5.5 declaration block, verbatim, plus §20.1's `EXPECTS`. */
12
+ export declare const standardPrelude = "REVERSE IS verb ; declares that two verbs name the same edge read in opposite directions\nREVERSE HAS arity: 2\nEXPECTS IS verb ; a type expects its instances to carry an attribute or relation\nCONTAINS REVERSE PART-OF\nCAUSE REVERSE CAUSED-BY\nPRECEDES REVERSE FOLLOWS\nUSES REVERSE USED-BY\nNEEDS REVERSE NEEDED-BY\nENABLES REVERSE ENABLED-BY\nBLOCKS REVERSE BLOCKED-BY\nEXTENDS REVERSE EXTENDED-BY\n";
13
+ /** Registry with the standard §5.5 inverse pairs and §20.1 `EXPECTS` declared. */
14
14
  export declare const standardRegistry: Registry.t;
15
15
  //# sourceMappingURL=prelude.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prelude.d.ts","sourceRoot":"","sources":["../../src/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,iDAAiD;AACjD,eAAO,MAAM,eAAe,qUAU3B,CAAA;AAaD,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,CAIa,CAAA"}
1
+ {"version":3,"file":"prelude.d.ts","sourceRoot":"","sources":["../../src/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,yEAAyE;AACzE,eAAO,MAAM,eAAe,uZAW3B,CAAA;AAaD,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,CAI8C,CAAA"}
@@ -8,9 +8,10 @@
8
8
  * ingesting the text first.
9
9
  */
10
10
  import * as Registry from "./registry.js";
11
- /** The spec §5.5 declaration block, verbatim. */
11
+ /** The spec §5.5 declaration block, verbatim, plus §20.1's `EXPECTS`. */
12
12
  export const standardPrelude = `REVERSE IS verb ; declares that two verbs name the same edge read in opposite directions
13
13
  REVERSE HAS arity: 2
14
+ EXPECTS IS verb ; a type expects its instances to carry an attribute or relation
14
15
  CONTAINS REVERSE PART-OF
15
16
  CAUSE REVERSE CAUSED-BY
16
17
  PRECEDES REVERSE FOLLOWS
@@ -30,9 +31,9 @@ const standardPairs = [
30
31
  ['BLOCKS', 'BLOCKED-BY'],
31
32
  ['EXTENDS', 'EXTENDED-BY']
32
33
  ];
33
- /** Registry with the standard §5.5 inverse pairs declared. */
34
+ /** Registry with the standard §5.5 inverse pairs and §20.1 `EXPECTS` declared. */
34
35
  export const standardRegistry = standardPairs.reduce((registry, [primary, inverse]) => {
35
36
  const declared = Registry.declareReverse(registry, primary, inverse);
36
37
  return declared.registry;
37
- }, Registry.declareVerb(Registry.empty, 'REVERSE'));
38
+ }, Registry.declareVerb(Registry.declareVerb(Registry.empty, 'REVERSE'), 'EXPECTS'));
38
39
  //# sourceMappingURL=prelude.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prelude.js","sourceRoot":"","sources":["../../src/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,iDAAiD;AACjD,MAAM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ACxB,CAAC,SAAS,EAAE,aAAa,CAAC;CAC3B,CAAA;AAED,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAC3B,aAAa,CAAC,MAAM,CAAa,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,EAAE;IAChE,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IACpE,OAAO,QAAQ,CAAC,QAAQ,CAAA;AAC1B,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cavelang/canonical",
3
- "version": "0.5.0",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "description": "CAVE canonicalization — verb registry, REVERSE inverse resolution, continuation expansion, canonical emitter.",
6
6
  "license": "CC0-1.0",
@@ -32,8 +32,8 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@cavelang/core": "0.5.0",
36
- "@cavelang/parser": "0.5.0"
35
+ "@cavelang/core": "0.12.0",
36
+ "@cavelang/parser": "0.12.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsc -b",
package/src/prelude.ts CHANGED
@@ -10,9 +10,10 @@
10
10
 
11
11
  import * as Registry from './registry.ts'
12
12
 
13
- /** The spec §5.5 declaration block, verbatim. */
13
+ /** The spec §5.5 declaration block, verbatim, plus §20.1's `EXPECTS`. */
14
14
  export const standardPrelude = `REVERSE IS verb ; declares that two verbs name the same edge read in opposite directions
15
15
  REVERSE HAS arity: 2
16
+ EXPECTS IS verb ; a type expects its instances to carry an attribute or relation
16
17
  CONTAINS REVERSE PART-OF
17
18
  CAUSE REVERSE CAUSED-BY
18
19
  PRECEDES REVERSE FOLLOWS
@@ -34,9 +35,9 @@ const standardPairs: readonly [string, string][] = [
34
35
  ['EXTENDS', 'EXTENDED-BY']
35
36
  ]
36
37
 
37
- /** Registry with the standard §5.5 inverse pairs declared. */
38
+ /** Registry with the standard §5.5 inverse pairs and §20.1 `EXPECTS` declared. */
38
39
  export const standardRegistry: Registry.t =
39
40
  standardPairs.reduce<Registry.t>((registry, [primary, inverse]) => {
40
41
  const declared = Registry.declareReverse(registry, primary, inverse)
41
42
  return declared.registry
42
- }, Registry.declareVerb(Registry.empty, 'REVERSE'))
43
+ }, Registry.declareVerb(Registry.declareVerb(Registry.empty, 'REVERSE'), 'EXPECTS'))