[Haskell-beginners] FFI, Foreign.Marshal.Array, etc.

Alexey Beshenov al at beshenov.ru
Wed Nov 26 15:32:58 EST 2008


I'm playing with the FFI.
Could anyone help me with a practical example?

I have a function

  int solve_sys (double **a, int n, double b[]);

where a is an array of size n*n and b is an array of size n
(it contains the needed result if solve_sys returns 0).

How could I wrap it in something like

  solveSys :: [[Double]] -> [Double] -> [Double]


Setting Orange, Aftermath 38 YOLD 3174
Alexey Beshenov  http://beshenov.ru/

More information about the Beginners mailing list