shithub: MicroHs

ref: 93fbba843f3b6c73060edef357907300dc7250c6
dir: /tests/Foreign.hs/

View raw version
module Foreign(main) where
import Prelude

foreign import ccall "llabs" iabs :: Int -> IO Int

main :: IO ()
main = do
  x1 <- iabs (3 - 8)
  putStrLn $ show x1
  x2 <- iabs (10 - 8)
  putStrLn $ show x2