Merge pull request #10587 from 9999years/git-quiet
[cabal.git] / cabal-testsuite / PackageTests / FFI / CSourceDependsStub / Main.hs
blob2234f9e4ab2227e19293bb5f7bc3a8128d529a70
1 {-# LANGUAGE ForeignFunctionInterface #-}
3 module Main where
5 import Foreign.C (CInt (..))
7 foreign import ccall "meaning_of_life_c"
8 meaning_of_life_c :: IO CInt
10 main :: IO ()
11 main = do
12 secret <- meaning_of_life_c
13 -- The value 11 comes from the exported Lib.hello
14 if (secret == 11)
15 then putStrLn ("The secret is " ++ show secret)
16 else error ("Expected value 11, got " ++ show secret)