[GHC] #2395: "Pattern match(es) are overlapped" warning with a
single view pattern (ghc 6.9.20080606)
GHC
trac at galois.com
Thu Jun 26 02:01:45 EDT 2008
#2395: "Pattern match(es) are overlapped" warning with a single view pattern (ghc
6.9.20080606)
-------------------------+--------------------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.9 | Severity: minor
Keywords: | Testcase:
Architecture: x86 | Os: Linux
-------------------------+--------------------------------------------------
Compiling the program
{{{
{-# LANGUAGE ViewPatterns #-}
main = print $ case 6 of
(even -> True) -> 4
}}}
yields the warning message
{{{
view.hs:3:15:
Warning: Pattern match(es) are overlapped
In a case alternative: ((even -> True)) -> ...
}}}
I haven't used view patterns before... but surely a single pattern can't
overlap anything, can it?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2395>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list