Commit eedd135
committed
fix(echo): patch two exhaustiveness gaps + extend TG-4 round-trip corpus
Two warnings-as-errors surfaced when compiling the echo/product additions
for the first time on a real OCaml toolchain:
compiler/lib/typecheck.ml — `strand_type_of_ty` had no arms for TProd/TEcho.
compiler/bin/main.ml — the debug token printer had no arms for the 8 new
echo keyword tokens (ECHOCLOSE LOWER RESIDUE PAIR
FST SND ECHOADD ECHOEQ).
Both are straightforward exhaustiveness gaps; the design is preserved.
Both get StrandDefault / print_string "<NAME>" mirroring the nearest
neighbouring cases.
Also extend the TG-4 round-trip corpus in test_roundtrip.ml with one entry
per new echo constructor (echoClose, lower, residue, pair, fst, snd, echoAdd,
echoEq) so the parse/pretty/parse round-trip guarantee is explicitly exercised
for every form added by this PR.
Before: dune build fails; 532 tests (not reached)
After: dune build succeeds; 548/548 tests pass (16 new TG-4 entries)1 parent f3ac1da commit eedd135
3 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
| 588 | + | |
587 | 589 | | |
588 | 590 | | |
589 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
| |||
0 commit comments