internal/core: render predeclared ranged numeric types by name
Error messages for values like int16 or float32 previously printed
their raw expansion (e.g. `int & >=-32768 & <=32767`), while the
plain-kind builtins int and float rendered by name. The two cases
diverged because the debug compact printer has a BasicType case but
no Conjunction collapse, and the export package owned the only
table mapping ranges back to a predeclared name.
Lift that table and a small matcher into internal/core/adt so both
export (via boundSimplifier) and debug (via compactNode) can share it,
and teach the compact Conjunction case to emit the name when a
conjunction matches int8..int128, uint, uint8..uint128, or float32..64.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I925ea80e646f5f5bce6cf0664c2fd0da4cbd1312
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1236171
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>