errno

Simon Marlow simonmar at microsoft.com
Tue Nov 28 11:37:05 EST 2000


> > As for the errno issues, I think the hsc2hs solution is simple and
> > straightforward and doesn't require an 
> architecture-dependent algebraic
> > datatype.  BTW Maloclm, if you haven't yet taken a look at 
> hsc2hs I urge
> > you to do so (fptools/ghc/utils/hsc2hs): it should work 
> unmodified with
> > nhc98, and it'll let you write C constants like EINTR directly in
> > portable Haskell code.
> 
> I could imagine such a solution being quite nice.  Is there any
> documentation for hsc2hs?  I don't know what its input should look
> like.

There's some documentation in fptools/ghc/docs/users_guide/utils.sgml
(except it's called hs2c there; I didn't get around to updating the
name).  I can't connect to haskell.org at the moment so I'm not sure if
the docs there are up to date enough to have this stuff.  Marcin's
QForeign library has plenty of examples too.

Cheers,
	Simon




More information about the FFI mailing list