Record Updates in Coq
summary
Implements record updates in Coq by generating setters via type class resolution and Ltac: a Ltac procedure solve_setter extracts an ada_expansion (eval hnf), uses eval pattern to substitute a projection, and registers itself as a hint so Coq builds a setter instance on demand. Adds notation for assigning constants and notation for nested updates, an OCaml plugin to auto-generate projections, runtime checks that the ada_expansion is the identity, and ships on GitHub and opam.
AI-written summary · about
chapters (10)
- 0:00Record updates in Coq
- 1:06How set is implemented
- 1:27Record fields with ada expansions
- 2:09Setter using ltac
- 3:53Type classes for setters
- 5:59Automating setters with hints
- 6:41Why instances work like hint DBs
- 7:03Improving UI with notations
- 8:30Reducing boilerplate with plugins
- 9:34Nested record updates & conclusion
