I\'m pretty sure it\'s possible to send arrays through the FFI, but I can\'t find any examples. For instance, I have a Haskell array that I send to a int foo(int*)
int foo(int*)
To convert a FFI Ptr into a Haskell list, you can use:
peekArray0 :: (Storable a, Eq a) => a -> Ptr a -> IO [a]
http://hackage.haskell.org/packages/archive/base/4.2.0.1/doc/html/Foreign-Marshal-Array.html#v%3ApeekArray0