#1551: Incorrect warning: Pattern match(es) are overlapped
-----------------------+----------------------------------------------------
  Reporter:  Regidor   |          Owner:                      
      Type:  bug       |         Status:  new                 
  Priority:  normal    |      Milestone:                      
 Component:  Compiler  |        Version:  6.6                 
  Severity:  minor     |       Keywords:  overlapping patterns
Difficulty:  Unknown   |             Os:  Linux               
  Testcase:            |   Architecture:  x86                 
-----------------------+----------------------------------------------------
The following program

 {{{
 main = print $ f ab

 a = "foo"
 ab = "bar"

 f :: String -> Int
 f a = 0
 f ab = 1
 }}}

 produces

 {{{
 Warning: Pattern match(es) are overlapped
              In the definition of `f': f ab = ...
 }}}

 but the patterns don't overlap, i.e., if a matches, ab does not match, and
 viceversa.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1551>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to