summaryrefslogtreecommitdiff
path: root/rusty-haskell/haskell/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rusty-haskell/haskell/src/Main.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/rusty-haskell/haskell/src/Main.hs b/rusty-haskell/haskell/src/Main.hs
new file mode 100644
index 0000000..2c6a7ae
--- /dev/null
+++ b/rusty-haskell/haskell/src/Main.hs
@@ -0,0 +1,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