Closed dagit closed 13 years ago
I talked this over with my co-workers and here is my plan:
Only embed the parts of structs that are needed on the Haskell side. By "needed" I mean, things that will be manipulated from the Haskell side.
This "lazy" approach has these benefits:
In the storable instances, we can just use a (#size ...) to allocate space for fields we don't need and then they end up being treated as opaque bytes.
Figure out how deeply to embed the C structs/types into Haskell. My initial attempt at the api ended up with way too many structs on the Haskell side, but this may be unavoidable.
If we need this many structs, we should probably split things into more modules/hsc files.