22 Oct
2004
22 Oct
'04
1:26 a.m.
C) CInt, CDouble are available...but, concerning Storable class.
Given: typedef struct _foostruct { int a; double b; } fooStruct, *fooStructPtr;
How to do to marshall it to Haskell ?
type CFooStruct = ???
instance Storable CFooStruct where sizeOf _ = ??? peekElement _ = ????
-- Next is certainly OK, provided well defined CFooStruct type CFoosStructPtr = Ptr CFooStruct
Well, after reading some doc, I realised it may not be feasible without a FFI preprocessor. For the time beeing, as I don't want to access the internals of Kernel descriptor, but to deal with it through the given API, I will declare type MKernelDescriptor = Ptr () as a transient solution. It seems to be OK.