#5610: Improve "Unacceptable argument type in foreign declaration" error message
----------------------------------------+-----------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.4.1
Component: Compiler (Type checker) | Version: 7.3
Resolution: | Keywords: zlib
Os: Linux | Architecture: x86_64 (amd64)
Failure: GHC rejects valid program | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
----------------------------------------+-----------------------------------
Changes (by bos):
* owner: simonmar =>
* status: closed => new
* resolution: fixed =>
Comment:
Here is the error message reported by GHC 7.6.1 rc1:
{{{
Data/Text/ICU/Error/Internal.hsc:163:1:
Unacceptable argument type in foreign declaration: CInt
When checking declaration:
foreign import ccall unsafe "static hs_text_icu.h __hs_u_errorName"
u_errorName
:: UErrorCode -> CString
}}}
This is the same message as the old error, and is very confusing.
Can the much more comprehensible and actionable language from the 7.4
warning please be reintroduced?
{{{
Error: newtype `CInt' is used in an FFI declaration,
but its constructor is not in scope.
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5610#comment:11>
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