10 lines
207 B
Haskell
10 lines
207 B
Haskell
{-# LANGUAGE ForeignFunctionInterface #-}
|
|
module Lib (ten) where
|
|
|
|
import Foreign.C.Types (CInt(..))
|
|
|
|
foreign import ccall "c_add_one"
|
|
c_add_one :: CInt -> CInt
|
|
|
|
ten :: Int
|
|
ten = fromIntegral (c_add_one 9)
|