I have the following code:
test :: String -> Bool
test "g" = True
test "global" = True
test _ = False
When I load it into GHCi (7.0.3), I get:
Warning: Pattern match(es) are overlapped
In an equation for `test': test "g" = ...
Is this a bug or am I missing something here?
The following hold:
test "" == False
test "g" == True
test "gl" == False
test "global" == True
test "globalx" == False
UPDATE:
I am using {-# LANGUAGE OverloadedStrings #-}
.