Opened 10 years ago

Closed 5 years ago

#2127 closed feature request (wontfix)

Bad error message for FFI declaration with no -fffi flag

Reported by: tim Owned by:
Priority: normal Milestone:
Component: Compiler (Parser) Version: 6.8.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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.

Change History (4)

comment:1 Changed 10 years ago by simonmar

difficulty: Unknown
Milestone: _|_
Type: bugfeature request

comment:2 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:3 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:4 Changed 5 years ago by monoidal

Resolution: wontfix
Status: newclosed
Type of failure: None/Unknown

It is true that the error is really unhelpful, but now FFI is on by default as a part of the Haskell 2010 standard. I think the ticket is not worth implementing, then.

Note: See TracTickets for help on using tickets.