On 2011-05-25 16:19 -0400, Matthew Steele wrote:
> From Haskell, I want to call a C function that returns a struct by
> value (rather than, say, returning a pointer). For example:
>
>typedef struct { double x; double y; } point_t;
>point_t polar(double theta);
>
> I can create a Haske
From Haskell, I want to call a C function that returns a struct by
value (rather than, say, returning a pointer). For example:
typedef struct { double x; double y; } point_t;
point_t polar(double theta);
I can create a Haskell type Point and make it an instance of Storable
easily enough