On Tue, Apr 20, 2010 at 01:48:16AM -0500, Tom Hawkins wrote:
> I have a bunch of global variables in C I would like to directly read
> and write from Haskell. Is this possible with FFI, or must I write a
> bunch of C wrapper functions for the interface, i.e. a 'get' and a
> 'set' for each variable
Tom Hawkins wrote:
> I have a bunch of global variables in C I would like to directly read
> and write from Haskell. Is this possible with FFI,
Yes it is, as explained in section 4.1.1. in the FFI specification [1].
An import for a global variable int bar would look like this:
foreign impo
On Tue, Apr 20, 2010 at 8:48 AM, Tom Hawkins wrote:
> I have a bunch of global variables in C I would like to directly read
> and write from Haskell. Is this possible with FFI, or must I write a
> bunch of C wrapper functions for the interface, i.e. a 'get' and a
> 'set' for each variable?
I bel
I have a bunch of global variables in C I would like to directly read
and write from Haskell. Is this possible with FFI, or must I write a
bunch of C wrapper functions for the interface, i.e. a 'get' and a
'set' for each variable?
I'm building a simulator for one of our embedded systems. The C i