#1465: Type errors due to different package versions are a bit cryptic
----------------------------------------+-----------------------------------
    Reporter:  guest                    |        Owner:             
        Type:  bug                      |       Status:  new        
    Priority:  normal                   |    Milestone:  6.8        
   Component:  Compiler (Type checker)  |      Version:  6.6.1      
    Severity:  normal                   |   Resolution:             
    Keywords:                           |   Difficulty:  Easy (1 hr)
          Os:  Unknown                  |     Testcase:  tcfail182  
Architecture:  Unknown                  |  
----------------------------------------+-----------------------------------
Changes (by simonpj):

  * testcase:  => tcfail182

Comment:

 Excellent suggestion.  I've arranged to print more info if the two types
 have the same occurrence name, since some confusion may then occur.  For
 example:
 {{{
 module Foo where

 import qualified Prelude
 import Prelude hiding( Maybe )

 data Maybe a = Foo

 f :: Prelude.Maybe a -> Int
 f Foo = 3
 }}}
 now produces the error:
 {{{
 Foo.hs:11:2:
     Couldn't match expected type `Prelude.Maybe a'
            against inferred type `Maybe a1'
       `Prelude.Maybe' is defined in module `Data.Maybe' from package
 `base'
       `Maybe' is defined in this module
     In the pattern: Foo
     In the definition of `f': f Foo = 3
 }}}
 Can you check that your use-case is also improved, and if so close the
 bug?

 Simon

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