#5610: Improve "Unacceptable argument type in foreign declaration" error message
------------------------------------------------+---------------------------
Reporter: bgamari | Owner:
Type: feature request | Status: new
Priority: high | Milestone: 7.4.1
Component: Compiler (Type checker) | Version: 7.6.1-rc1
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture:
Unknown/Multiple
Failure: Incorrect warning at compile-time | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
------------------------------------------------+---------------------------
Comment(by bos):
Incidentally, Lemming's observation that requiring constructors to be
imported breaks encapsulation seems correct.
I have run into exactly the situation he describes, where an aliased
`CInt` is now causing compilation of a number of modules to break in 7.6.
I have to fix this by [https://github.com/bos/text-
icu/commit/24b63f085d5d1ebe131c95e1f16e90159b8f6562 importing both] the
alias and `CInt`, which feels quite unsatisfactory.
Furthermore, making compilation work with GHC 7.6 now introduces warnings
on versions of GHC prior to 7.4:
{{{
Data/Text/ICU/Normalize.hsc:45:1:
Warning: The import item `CInt(..)' suggests that
`CInt' has (in-scope) constructors or class methods,
but it has none
}}}
I make a habit of building with `-Werror` on my continuous integration
host, but the calisthenics required to keep things warning-clean across
multiple GHC versions are getting a bit rigorous.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5610#comment:14>
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