Ticket #2127 (closed feature request: wontfix)

Opened 5 years ago

Last modified 4 months ago

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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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

Changed 5 years ago by simonmar

  • difficulty set to Unknown
  • type changed from bug to feature request
  • milestone set to _|_

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 months ago by monoidal

  • status changed from new to closed
  • failure set to None/Unknown
  • resolution set to wontfix

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.