thanks,.. so far I came to this. I can compile it but not getting the right values from the method. Most probably some problem with the pointers...
----------------
--int setmoduletable(char *param, int length, double array[], int UB1, int UB2, bool isValid);
foreign import stdcall unsafe "setmoduletable" c_setmoduletable :: Ptr Char
-> Int
-> Ptr (Double)
-> Int
-> Int
-> Bool
-> IO Int
main = do
let param = "Input_Bit_Nozz"
let paramLength = length param
realTable = [ 0.0111125, 0.0111125, 0.009525] :: [Double]
ub1 = 0
ub2 = 2
isValid = False
realTablePtr <- newArray realTable
paramPtr <- newArray param
x <- c_setmoduletable paramPtr paramLength realTablePtr ub1 ub2 isValid
free realTablePtr
free paramPtr
putStrLn $ "c_setmoduletable output: " ++ show x
putStrLn "Done"