Здравствуйте, у меня есть вот такой код на С
#include <stdio.h>
void hello()
{
printf("Hello");
}
int ret3()
{
return 3;
}
{-# INCLUDE "hello.c" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module Example(c_hello,c_ret) where
import Foreign.C
import Foreign.C.String
foreign import ccall unsafe "hello" c_hello :: IO()
foreign import ccall unsafe "ret3" c_ret :: СInt