RE: mistake in definition of CFile?

"Simon Marlow" <[email protected]> Tue, 25 Jan 2005 13:52:10 -0000
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <3429668D0E777A499EE74A7952C382D1030DDA19@EUR-MSG-01.europe.corp.microsoft.com>
On 22 January 2005 23:53, John Meacham wrote:

> The FFI spec says (in section 6.2) that CFile represents the C type
> 'FILE' and has Eq and Storable instances.
>=20
> Is this a mistake? FILE is opaque and AFAIK, you can't copy or
> compare its contents and expect it to work. I can think of two
> possible interpretations:
>=20
> * the table should say CFile is equivalant to 'FILE *'.
> * One is meant to use 'Ptr CFile' and no Eq or Storable instances
> should exist for CFile. (it is opaque)

The latter, I think.

Cheers,
	Simon