FFI to poll()
Ian Lynagh
ian at well-typed.com
Sat Feb 23 15:27:23 CET 2013
On Sat, Feb 23, 2013 at 11:59:35AM +0900, Kazu Yamamoto wrote:
> >> But this is not generic enough. Any suggestions to fix this?
> >
> > According to my manpage, it's an nfds_t. Is that type as portable as
> > poll is?
>
> If we use nfds_t in C source code, it is portable. But I cannot find a
> Haskell type to express it in Foreign.C.Types. So, my question is how
> I can express nfds_t in Haskell?
The best way is probably to use hsc2hs: make it a .hsc file, and use
#type nfds_t
It's probably worth making a newtype, or at least a type synonym, for
it.
Thanks
Ian
More information about the ghc-devs
mailing list