Erroneous warning

Ian Lynagh igloo at earth.li
Mon Sep 17 07:52:32 EDT 2001


If Q.lhs is

> module Q where

> foo :: Int -> Int
> foo (i+1) = i
> foo 0 = -10

then

% ghc -c -o Q.o Q.lhs

Q.lhs:5: Warning: Pattern match(es) are overlapped in the definition of function `foo':
            foo 0 = ...


Ian





More information about the Glasgow-haskell-bugs mailing list