run: give the macro parser and the query walkers their missing types #97

Merged
PerishFire merged 1 commit from missing-types into main 2026-07-21 05:41:39 +00:00
Owner
No description provided.
run: give the macro parser and the query walkers their missing types
All checks were successful
guard / guard (pull_request) Successful in 32s
e4fdf94ec6
Both halves were the same finding: a type that was never declared, so its
job leaked into argument lists and name suffixes.

The macro already half-declared its type. `type Link = (Ident, String,
Vec<(String, Ident)>, bool, bool, bool)` is a struct with the field names
filed off, and reading three bools positionally at the call site is the
cost. Link becomes real, shape becomes Link::shape -- which is where both
six-argument functions went. The syn helpers were free functions over
foreign types, which cannot take inherent methods, so they become local
extension traits instead: Spell on Expr (ident, tail, head, slot), Coin
on Ident (atom, card), Read on Attribute (items, only, scopes, tally).
told and rest differed only in their error message, so items takes the
hint and the two collapse to one. macro/parse.rs goes from eleven debts
to none.

The query walkers threaded work and scope by hand through eight
functions. Sweep holds both, and the names stop working around their
absence: hold_has and hold_some are has and some -- which are simply the
op names -- some_hit is probe, target_hit is mate, has_right and
find_live are inlined into the callers that wanted them, and hold_one
folds into hold's match. The two over-argument functions were the same
threading seen from the other side; both go. query/run.rs goes from
sixteen debts to none.

Behaviour is carried over exactly, including the two error-swallowing
edges: a failed tie read still counts as no match in has, and a failed
probe still counts as no match in some.

Debt 61 -> 34: receiver 18 -> 9, param 6 -> 3, word 36 -> 21.

guard clean, 45 tests green on sqlite and on real postgres.
PerishFire deleted branch missing-types 2026-07-21 05:41:39 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/keel!97
No description provided.