This fixes Mantis bug #481.
compiler/ml_code_util.m:
We used to approach the construction of tables for lookup switches
by testing whether the shape of the HLDS code fit our requirements,
and then building those tables using code that assumed that all the
variables involved represented constants. This approach had a bug:
when a switch arm constructed an output using *only* the switched-on
variable, this passed the shape test even when that variable wasn't
a constant.
We could fix the shape test, instead this diff changes the approach
to avoid making the incorrect assumption. This seems more robust,
and in any case it is the approach used by the LLDS backend.
compiler/ml_disj_gen.m:
Make the same switch in approach when generating lookup tables
for disjunctions.
tests/valid/bug481.m:
The Mantis test case.
tests/valid/Mmakefile:
Enable the new test case.