Erroneous warning
Ian Lynagh
igloo at earth.li
Tue Sep 18 05:34:03 EDT 2001
On Tue, Sep 18, 2001 at 09:23:23AM +0100, Simon Marlow wrote:
>
> > On Mon, Sep 17, 2001 at 12:52:32PM +0100, Ian Lynagh wrote:
> > >
> > > Q.lhs:5: Warning: Pattern match(es) are overlapped in the
> > definition of function `foo':
> > > foo 0 = ...
> >
> > Oh, along similar lines, should the warning not be
> > "Pattern match(es) are hidden in [...]"
> > or similar? Overlapping patterns are OK, e.g.
> >
> > > foo 5 = 0
> > > foo _ = 2
> >
> > but the problem comes when they are the other way round so
> > the first one
> > "hides" the second.
>
> The warning does what you want - it won't warn about the definition of
> 'foo' above, but it would warn if the equations were reversed. Perhaps
> the wording should be changed?
Sorry if I was unclear, I was talking about the wording, yes.
Thanks
Ian
More information about the Glasgow-haskell-bugs
mailing list