#8278: Improve error message when the same type is imported from two different
library versions
------------------------------------+-------------------------------------
Reporter: Yuras | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
When a package indirectly depends on different versions of the same
library, ghc reports cryptic error:
{{{
Couldn't match expected type `ByteString'
with actual type
`bytestring-0.9.2.1:Data.ByteString.Internal.ByteString'
}}}
Error contains fully qualified type with package name and version only
when the type is imported from different versions on the library, so looks
like ghc knows what is wrong.
Is it possible to add something like the next:
{{{
Note: ByteString is imported from different package versions:
bytestring-0.9.2.1 and bytestring-0.10.0.1
}}}
It is inspired by a number of StackOverflow questions (e.g.
http://stackoverflow.com/questions/12576817/couldnt-match-expected-type-
with-actual-type-error-when-using-codec-bmp/12577025#12577025,
http://stackoverflow.com/questions/18767086/bytestring-to-lazy-text-and-
vice-versa/18769431?noredirect=1#comment27676563_18769431)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8278>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-tickets