Hello.

Compiling the following with ghc-4.06 produces an erroneous error message:

module O where

a :: Int
a = 1

b :: Int
b = 2

c :: Int
c = 3

f :: Int -> Bool
f i = case i of
   a -> True
   b -> True
   c -> True


The compiler complains:

o.hs:14: Pattern match(es) are overlapped in a group of case alternatives
beginning
                                              a:
            b -> ...
            c -> ...


The program may be wrong. (Is this legal?). But the error message
certainly is wrong.


bye

Reply via email to