[MLton] Catching redundant pattern matches

Jesper Louis Andersen jlouis@mongers.org
Sun, 12 Dec 2004 21:23:03 +0100


Quoting Stephen Weeks (sweeks@sweeks.com):

> I am surprised MLton did not warn about this, as there is code to
> point out redundant matches.  As an experiment, I tried compiling the
> following code with MLton.

Hmm, it is related to .mlb files. I am running a recent HEAD from CVS:

MLton MLTONVERSION (built Mon Dec 06 17:10:31 2004 on mushroom.home)

sources from right before the compile. I have an ''ann'' in scope with
all warnings. For fun, I altered the code to have a redundant

case v of
  NONE => 
| SOME x =>
| SOME y =>

and the only thing I get is the ''unused variable y'' which proves the
annotations are inside the scope, but the redundant case was never
reported. I will try updating to recent sources and then check again.


-- 
jlouis