blob: d2c97b77aeb3e116a2c0665de9235b96ccc5dd63 (
plain) (
tree)
|
|
{-# LANGUAGE ForeignFunctionInterface #-}
module Foo (foo) where
import Foreign.C.Types (CInt(..))
foreign import ccall "c_add_one"
c_add_one :: CInt -> CInt
-- |
-- >>> foo
-- 5
foo :: Int
foo = fromIntegral (c_add_one 4)
|