summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_compile/cc013.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ffi/should_compile/cc013.hs')
-rw-r--r--testsuite/tests/ffi/should_compile/cc013.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/ffi/should_compile/cc013.hs b/testsuite/tests/ffi/should_compile/cc013.hs
new file mode 100644
index 0000000000..09dd2ef2ef
--- /dev/null
+++ b/testsuite/tests/ffi/should_compile/cc013.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE ForeignFunctionInterface #-}
+-- !!! test that exporting the same thing multiple times works.
+module ShouldCompile where
+
+import Data.Int
+
+foreign export ccall "addByte" (+) :: Int8 -> Int8 -> Int8
+foreign export ccall "addInt" (+) :: Int16 -> Int16 -> Int16
+foreign export ccall "addLong" (+) :: Int32 -> Int32 -> Int32
+
+foreign export ccall "divByte" div :: Int8 -> Int8 -> Int8
+foreign export ccall "divInt" div :: Int16 -> Int16 -> Int16
+foreign export ccall "divLong" div :: Int32 -> Int32 -> Int32
+