Expand description
Emit substrate-side quirk-apply.nix skeletons from typed
TypedDispatcher reflection. Closes the loop typed Rust enum
→ typed Nix dispatch arm without the operator hand-writing the
mapping table.
Pattern: given a DispatcherEntry (catalog) or any
TypedDispatcher impl, produce the Nix helpers = { ... }
table skeleton that the substrate’s
mk-typed-dispatcher.nix combinator consumes. The skeleton
has typed stub bodies ({}) per variant; the operator fills in
the apply functions per ecosystem.
See theory/TYPED-ABSORPTION.md §IV.2 — this is the
“mechanical absorption” step: adding a new ecosystem becomes
“declare the Rust enum, emit the Nix skeleton, fill in
helpers.” No dispatch fold reimplementation. No Nix parser
gymnastics.
Functions§
- to_
helpers_ skeleton - Render a
quirk-apply.nixskeleton for a dispatcher catalog entry. Output is a complete, syntactically-valid Nix file (verified bynix-instantiate --eval --strict) consuming../shared/mk-typed-dispatcher.nixwith one helpers arm per variant kind.