Commit aedcb218 authored by Ian Lynagh's avatar Ian Lynagh

Add a test for CAPI value imports

parent 9a3c8740
......@@ -206,3 +206,8 @@ test('ffi_parsing_001',
compile_and_run,
['ffi_parsing_001_c.c'])
test('capi_value',
extra_clean(['capi_value_c.o']),
compile_and_run,
['capi_value_c.c'])
{-# LANGUAGE CApiFFI #-}
module Main (main) where
import Foreign.C
main :: IO ()
main = do print i
print j
foreign import capi "capi_value_c.h value i" i :: CInt
foreign import capi "capi_value_c.h value j" j :: CInt
#include "capi_value_c.h"
const int i = 23;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment