#1759: HPC interaction with -Wall leading to spurious pattern match warnings
-----------------------+----------------------------------------------------
  Reporter:  guest     |          Owner:         
      Type:  bug       |         Status:  new    
  Priority:  low       |      Milestone:         
 Component:  Compiler  |        Version:  6.8    
  Severity:  normal    |       Keywords:  HPC    
Difficulty:  Unknown   |             Os:  Unknown
  Testcase:            |   Architecture:  Unknown
-----------------------+----------------------------------------------------
 Without -fhpc, the following program passes the pattern match checker:

 {{{
 f :: String -> Int
 f x | null x    = 1
     | otherwise = 2


 main :: IO ()
 main = print $ f []
 }}}

 However, with -fhpc on, we get the spurious warning:

 {{{
     A.hs:3:0:
         Warning: Pattern match(es) are non-exhaustive
                  In the definition of `f': Patterns not matched: _
 }}}

 Causing libraries using -Werror to fail to build when using -fhpc.
 }}}

 -- Don

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1759>
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