From b6061fa10436bad78d7601a36712101dfe873643 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sat, 26 Sep 2026 16:38:12 +0100 Subject: 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. --- prototypes/connections/pure-run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prototypes/connections/pure-run.c') 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"); -- cgit v1.2.3