[m-dev.] for review: fix switch-detection bug

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Aug 30 19:00:40 AEST 1999

On 30-Aug-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> Estimated hours taken: 0.5
> compiler/switch_detection.m:
> 	Fix a bug - the code was looking for switch deconstructions
> 	after the first call in each branch. Doing this can remove
> 	infinite loops, which the strict sequential semantics does
> 	not allow.
> tests/invalid/Mmakefile:
> tests/invalid/not_a_switch.m:
> 	Test case.

The unfortunate thing about this change is that it breaks backwards
compatibility with 0.8.  Because of this, I think it probably deserves
to be mentioned in the NEWS file.

Would it be worth adding an option, e.g. `--backwards-compat 0.8',
that would preserve the old behaviour, in case anyone had written
code that relied on it?

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list