[x,y : _] = infty_list

Erik Zuurbier F.S.A.Zuurbier@inter.nl.net
Fri, 8 Mar 1996 18:13:35 +0100 (MET)



On Fri, 8 Mar 1996, Jan Krynicky wrote:

> I have in my code several such rules.
> 
> It gives me a lot of warnings. Can I get rid of them somehow ?
> 
> Jenda--------------------------------------------------------
> Jan Krynicky  -  JKRY3025@COMENIUS.MFF.CUNI.CZ
> student of Faculty of Mathematics and Physics
> Charles University in Prague
> http://www.ms.mff.cuni.cz/acad/webik/~jkry3025
> 
> 
Jan/Jenda,

If this is the type of warning you are getting:

Warning [Warnings.icl,_match0]: function may fail

...yes, you can get rid of the warning, if you replace: 

where ...
      [x,y:_] = infty
      ...

by:

where ...
      (x,y)   = Strip infty
      Strip [x,y:_] = (x,y)
      Strip _       = abort "Not enough elements in Strip"
      ...

But this is foolish if you do not expect infty ever to
exhaust: you add code to the exacutable, that will never
be used. If you really want to be able to indicate in
the source text once and for all that you have proved
mathematically that there will never be a pattern mismatch,
then turn to the Nijmegen boys. Maybe they can get the 
compiler clever enough to make use of such annotations, so
that next time you compile the program, only the warnings
remain that you have not reviewed yet. I would welcome 
the feature too.

Regards Erik Zuurbier