[ ghc-Bugs-1075259 ] Wrong overlapped pattern warning for n+k
Pattern
SourceForge.net
noreply at sourceforge.net
Mon Nov 29 09:00:55 EST 2004
Bugs item #1075259, was opened at 2004-11-29 06:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1075259&group_id=8032
Category: Compiler (Parser)
Group: 6.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wrong overlapped pattern warning for n+k Pattern
Initial Comment:
compiling:
module Overlap where
f (n+1) = 2
f 0 = 1
emits wrongly:
Warning: Pattern match(es) are overlapped
In the definition of `f': f 0 = ...
The Patterns are disjoint, aren't they? At least "f 0"
yields "1" when evaluated and negative inputs for f are
rejected. However the warning is not emitted if the two
equations are given in reversed order.
Christian (maeder at tzi.de)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1075259&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list