You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four PROOF_TODO / totality failures in `Xml744.Element` blocked the
toolkit build past step 4/6.
1. `tagName s = case decEq (isValidName s) True of ...` — same `decEq`
baseline-rot as `attrName`. Replaced with the `with proof` form,
binding `prf : isValidName s = True` for `MkTagName`'s auto-implicit.
2. `unsafeTagName s = cast (MkTagName s)` — same never-compiled
placeholder as `unsafeAttrName`. Bumped to `(s : String) -> {auto
prf : isValidName s = True} -> TagName`, discharged by `Refl` for
literals.
3. `render` failed totality through `concatMap render children` —
Idris2's size-change checker cannot see structural decrease through
the higher-order call. Refactored into a `mutual` block with a
first-order `renderList : List XmlNode -> String` helper. Each
`renderList (n :: ns)` call peels one element and recurses on the
tail; `render Element` calls `renderList children` on the children
list, which is a structural sub-term of the element.
4. `renderPretty.go` had the same shape (`unlines (map go children)`)
and the same fix: `mutual` block with `renderPrettyList : Nat ->
List XmlNode -> String`. Child-separator semantics (trailing
newline after each child) match the previous `unlines` behaviour.
Knock-on signature changes to propagate the validity proofs through
the smart constructors:
- `el`, `emptyEl` now take `{auto prf : isValidName tag = True}`.
- `wEl`, `wEmptyEl` now take `{auto prf : isValidName ("w:" ++ tag)
= True}` (the string-concat reduces at elaboration; all existing
call sites use literal `tag`).
All 15 exports check `is total`. `grep` for `assert_total` /
`assert_smaller` / `believe_me` / `%unsafe` / `PROOF_TODO` /
`idris_crash` / `partial ` in the file returns no matches.
Toolkit build now advances 4/6 → 5/6. `Xml744.Document` errors
("Expected end of input" at `prefix : String` field) appear next —
separate baseline-rot follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments