Bad overlapping patterns warning with CInts
Simon Marlow
simonmar at microsoft.com
Thu Jul 21 07:16:05 EDT 2005
On 19 July 2005 22:59, Ian Lynagh wrote:
> With an up-to-date HEAD ghc I'm getting bogus overlapping patterns for
> CInts:
>
> $ cat L.hs
>
> module L where
>
> import Foreign.C (CInt)
>
> foo :: CInt -> Char
> foo i = case i of
> 0 -> 'a'
> 1 -> 'b'
> 2 -> 'c'
> -1 -> 'd'
> -2 -> 'e'
> -3 -> 'f'
> _ -> 'g'
>
> $ ghc -Wall -Werror -c L.hs
>
> L.hs:7:8:
> Warning: Pattern match(es) are overlapped
> In a case alternative:
> 1 -> ...
> 2 -> ...
Is this related to
[ 1162762 ] fromInteger-related pattern match overlap warnings
http://sourceforge.net/tracker/index.php?func=detail&aid=1162762&group_i
d=8032&atid=108032
?
Simon
More information about the Cvs-ghc
mailing list