[GHC] #7630: FFI: "capi" calling convention doesn't work

GHC cvs-ghc at haskell.org
Sat Jan 26 20:45:15 CET 2013


#7630: FFI: "capi" calling convention doesn't work
-------------------------+--------------------------------------------------
Reporter:  guest         |          Owner:          
    Type:  bug           |         Status:  new     
Priority:  normal        |      Component:  Compiler
 Version:  7.6.1         |       Keywords:          
      Os:  Linux         |   Architecture:  x86     
 Failure:  None/Unknown  |      Blockedby:          
Blocking:                |        Related:          
-------------------------+--------------------------------------------------
 According to
 [http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/ffi.html#ffi-capi]
 there is a `capi` calling convention, but ghc disagrees:

 {{{
 % cat capi.hs
 {-# LANGUAGE ForeignFunctionInterface #-}

 import Foreign.C

 foreign import capi "math.h value M_PI" mPI :: CDouble

 main :: IO ()
 main = print mPI

 % ghc capi.hs
 [1 of 1] Compiling Main             ( capi.hs, capi.o )

 capi.hs:5:16: parse error on input `capi'
 }}}

 Is the documentation wrong?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7630>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list