diff options
| author | eunhhu <[email protected]> | 2026-09-26 16:38:12 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-26 16:38:12 +0100 |
| commit | b6061fa10436bad78d7601a36712101dfe873643 (patch) | |
| tree | 56cb24a45b783b469cd3aec41c8d76fff3aadc3a /prototypes/connections/pure-run.c | |
| parent | 382cb351d5fe30b6d8e86860f14025d6ca2dce29 (diff) | |
| download | pure-b6061fa10436bad78d7601a36712101dfe873643.tar.gz pure-b6061fa10436bad78d7601a36712101dfe873643.zip | |
Add keyed lists and text comparison
A list state may name a key field of its record (the flags word of its
entry: field + 1). A keyed list keeps its items in key order, numbers by
value and texts by their bytes, each key once: LIST_APPEND places an item
by halving and fails with the new fault exists (PURE_CONFLICT) when the
key is there; LIST_FIND gives the index of a key's item and LIST_HAS
whether it is there. The verifier refuses inserting by position and
changing a key. Maps, sets and sorted maps are one list with an order
rule, so tables, filters, folds, indices, storage and replacement stay
as they are.
A module that opens over a list not in its key order (one that was not
keyed, keyed by another field, or stored so) puts it in order, moves its
indices with their items and stores it again; two items with one key
refuse the module rather than drop one.
TEXT_COMPARE compares two texts by their bytes under one of the six
relations.
Diffstat (limited to 'prototypes/connections/pure-run.c')
| -rw-r--r-- | prototypes/connections/pure-run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prototypes/connections/pure-run.c b/prototypes/connections/pure-run.c index 6e4a6e1..d97d277 100644 --- a/prototypes/connections/pure-run.c +++ b/prototypes/connections/pure-run.c @@ -14,7 +14,7 @@ * Text states and text views print as JSON strings; cursors as byte positions; * lists as arrays of objects; indices as positions; a table view as an array * with an object of its columns per row. A failed view or cell is null. */ -static const char *const fault_names[] = {"none", "divide", "non_finite", "clamp", "limit", "not_found", "encoding"}; +static const char *const fault_names[] = {"none", "divide", "non_finite", "clamp", "limit", "not_found", "encoding", "exists"}; static bool load(const char *path, PureModule *module) { FILE *file = fopen(path, "rb"); |
