#2911: Error messages have the wrong qualified names
-------------------------------+--------------------------------------------
  Reporter:  igloo             |          Owner:                  
      Type:  bug               |         Status:  new             
  Priority:  normal            |      Milestone:                  
 Component:  Compiler          |        Version:  6.11            
  Severity:  minor             |       Keywords:                  
Difficulty:  Unknown           |       Testcase:                  
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-------------------------------+--------------------------------------------
 This module:
 {{{
 module Foo where

 import Data.ByteString.Lazy (ByteString)
 import qualified Data.ByteString.Lazy as BS
 import qualified Data.ByteString.Lazy.Char8 as BSC

 check :: ByteString -> Bool
 check bs = BS.empty bs
 }}}
 produces this type error:
 {{{
 $ ghci -v0 q.hs

 q.hs:9:11:
     Couldn't match expected type `ByteString -> Bool'
            against inferred type `ByteString'
     In the expression: BSC.empty bs
     In the definition of `check': check bs = BSC.empty bs
 }}}
 i.e. it claims that the expression is `BSC.empty bs`, whereas the program
 text says `BS.empty bs`.

 Similarly, in this module:
 {{{
 module Foo where

 import Data.ByteString.Lazy (ByteString)
 import qualified Data.ByteString.Lazy as BS
 import Data.ByteString.Lazy.Char8

 check :: ByteString -> Bool
 check bs = BS.empty bs
 }}}
 the qualifier has disappeared completely in the error message:
 {{{
 $ ghci -v0 q.hs

 q.hs:9:11:
     Couldn't match expected type `ByteString -> Bool'
            against inferred type `ByteString'
     In the expression: empty bs
     In the definition of `check': check bs = empty bs
 Prelude>
 }}}

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

Reply via email to