blob: 2c6a7ae966389d8498c0fa860bba845e2dbe43a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
module Main where
import Foreign.C.Types
import Foreign.C.String
foreign import ccall "double_input" doubleInput :: CInt -> CInt
--foreign import ccall unsafe "print_string" printString :: CString -> IO ()
foreign import ccall "print_hello" printHello :: IO ()
main :: IO ()
main = do
let b = doubleInput 2
printHello
putStrLn $ show b
|