[GHC] #5455: strange behaviour of -fwarn-incomplete-uni-patterns

GHC cvs-ghc at haskell.org
Sun Sep 4 02:56:19 CEST 2011


#5455: strange behaviour of -fwarn-incomplete-uni-patterns
--------------------------------+-------------------------------------------
    Reporter:  MikolajKonarski  |       Owner:                                   
        Type:  bug              |      Status:  new                              
    Priority:  normal           |   Component:  Compiler                         
     Version:  7.3              |    Keywords:                                   
    Testcase:                   |   Blockedby:                                   
          Os:  Linux            |    Blocking:                                   
Architecture:  x86_64 (amd64)   |     Failure:  Incorrect warning at compile-time
--------------------------------+-------------------------------------------
 For the following program (attached):
 {{{
 module Pat where

 w :: String
 w = let (_:_) = ["1", "2", "3"] in "1"

 w2 :: String
 w2 = let (_a:_b) = ["1", "2", "3"] in "1"
 }}}

 the following warnings are generated (note line numbers)

 {{{
 mikolaj at bratek:~/waste$ ghc --make pat.hs -fwarn-incomplete-uni-patterns
 [1 of 1] Compiling Patwhere         ( pat.hs, pat.o )

 pat.hs:7:10:
     Warning: Pattern match(es) are non-exhaustive
              In a pattern binding: Patterns not matched: []

 pat.hs:7:10:
     Warning: Pattern match(es) are non-exhaustive
              In a pattern binding: Patterns not matched: []
 mikolaj at bratek:~/waste$ ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.3.20110808
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5455>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list