[Haskell-cafe] Replacement for Ptr () in FFI declaration?

Howard B. Golden howard_b_golden at yahoo.com
Wed Sep 24 21:56:01 UTC 2014


Hi,

Apparently, before GHC 7.8, it was possible to specify FFI declarations using Ptr (). However, it now gets an error message:
This is from com-1.2.3.1 when I try to compile it:

------ message follows -----
[12 of 21] Compiling System.Win32.Com.Automation.TypeLib ( System\Win32\Com\Automation\TypeLib.hs, dist\build\System\Win
32\Com\Automation\TypeLib.o )

System\Win32\Com\Automation\TypeLib.hs:1379:1:
    Unacceptable argument type in foreign declaration: Ptr ()
    When checking declaration:
      foreign import stdcall safe "dynamic" prim_System_Win32_Com_Automation_TypeLib_setGuid
        :: Ptr () -> Ptr () -> Ptr GUID -> IO Int32

------ end of message -----

What is the proper declaration to use instead of Ptr () ?

Thanks.

Howard B. Golden



More information about the Haskell-Cafe mailing list