Schema camelCase inconsistency: paramTypes / retType in Term::Lam #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two field names in the canonical JSON schema use camelCase while everything else uses kebab-case or single words:
Term::Lam.paramTypes(serde rename in crates/ailang-core/src/ast.rs line 492)Term::Lam.retType(serde rename in crates/ailang-core/src/ast.rs line 494)The surrounding schema uses kebab-case for compound keys (
drop-iterative,reuse-as) and single words for atomic ones (type,fn,else,in,as). The two camelCase outliers in Lam are the only ones in the whole AST module.This matters for LLM-author consistency — the schema reads as
(lam (params ...) (paramTypes ...) (retType ...) (effects ...) BODY)in Form A, which is jarring next to the surrounding(fn-type ...)/(reuse-as ...)etc.Proposed: rename to
param-typesandret-typein both the JSON schema (serderename) and the Form A surface keyword. Breaks every existing fixture's canonical-JSON hash, so the right place is bundled with any other schema-touching milestone — not a one-off.Discovered during the naming-A/B experiment review (experiments/2026-05-21-naming-ab/), found while auditing every serde rename in ast.rs.