Bad error message for FFI declaration with no -fffi flag
If I compile:
module Ccall where
import Foreign.C.Types
foreign import ccall "stdio.h putchar"
putchar :: CInt -> IO CInt
I get:
$ ghc-6.8.1 -c -fext-core Ccall.hs -no-recomp
Ccall.hs:5:8: parse error on input `import'
A better error message would be to suggest passing the -fffi flag.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |