How Haskell call C function
-- Here is simple code for FFI
--
import Foreign
import Foreign.C.Types

foreign import ccall unsafe "math.h sin"
     c_sin :: CDouble -> CDouble

main = do 
        let c = c_sin 3.1415 
        print c