about summary refs log blame commit diff
path: root/third_party/bazel/rules_haskell/tests/c-compiles/Lib.hs
blob: 6ebec6b460ce2f8cc9f3577767270e7a6720177f (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                         
{-# 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)