Commit c1e36d8b authored by Simon Marlow's avatar Simon Marlow
Browse files

update FFI syntax

parent 330f767a
......@@ -2,7 +2,7 @@ module Main where
import Control.Concurrent
foreign import "sleep" threadsafe sleepBlock :: Int -> IO ()
foreign import ccall safe "sleep" sleepBlock :: Int -> IO ()
main :: IO ()
main = do
......
......@@ -5,9 +5,9 @@ import Control.Concurrent
haskellFun :: Int -> IO ()
haskellFun c = putStrLn ("Haskell: " ++ show c)
foreign export "hFun" haskellFun :: Int -> IO ()
foreign import "hFun" safe hFun :: Int -> IO ()
foreign import "sleep" safe sleepBlock :: Int -> IO ()
foreign export ccall "hFun" haskellFun :: Int -> IO ()
foreign import ccall safe "hFun" hFun :: Int -> IO ()
foreign import ccall safe "sleep" sleepBlock :: Int -> IO ()
main :: IO ()
main = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment