1 2 3 4 5 6 7
{-# LANGUAGE ForeignFunctionInterface #-} import Foreign.C.Types foreign import ccall unsafe "hello" hello :: CInt -> IO () main = hello 42