HGL ang GHC on Win32

Simon Marlow simonmar@microsoft.com
Thu, 14 Mar 2002 17:27:27 -0000


> That is a shame.  I tried both suggestions (specifying=20
> position explicitly
> and recompiling with fvia-c -- i had been using O all along)=20
> and neither
> worked :(.
>=20
> I also tried using 5.03, and got the following warnings:
[ message deleted ]

It looks like there are some prototypes missing:

> C:\DOCUME~1\hdaume\LOCALS~1\Temp\ghc920.hc:59: warning: implicit
> declaration of function `prim_rgb'

GHC might not generate correct calls to these functions unless there is
a visible prototype.  In fact, taking this example, the definition of
prim_rgb is

   DWORD prim_rgb(BYTE arg1,BYTE arg2,BYTE arg3)

but its FFI declaration says

   foreign import  ccall "prim_rgb" unsafe
     prim_rgb :: Word32 -> Word32 -> Word32 -> IO (Word32)

this looks a bit strange - is there a green-card expert out there to
explain what's going on?  Why have the BYTEs been turned into Word32s?

Cheers,
	Simon