src/Util/Tactics/AppendUnderscores.v
raw| 1 | Require Export Crypto.Util.FixCoqMistakes. |
| 2 | |
| 3 | Ltac append_underscores term count := |
| 4 | lazymatch count with |
| 5 | | O => term |
| 6 | | S ?n => append_underscores uconstr:(term _) n |
| 7 | | ?n |
| 8 | => lazymatch type of n with |
| 9 | | nat => fail 0 "invalid non-literal count of underscores" n |
| 10 | | ?T => fail 0 "invalid non-literal-nat count of underscores" n ":" T |
| 11 | end |
| 12 | end. |