summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_addCStub2.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/th/TH_addCStub2.hs')
-rw-r--r--testsuite/tests/th/TH_addCStub2.hs22
1 files changed, 0 insertions, 22 deletions
diff --git a/testsuite/tests/th/TH_addCStub2.hs b/testsuite/tests/th/TH_addCStub2.hs
deleted file mode 100644
index 10119d9370..0000000000
--- a/testsuite/tests/th/TH_addCStub2.hs
+++ /dev/null
@@ -1,22 +0,0 @@
--- Tests that a reasonable error is reported when addCStub is used with
--- incorrect C code.
-
-{-# LANGUAGE ForeignFunctionInterface #-}
-{-# LANGUAGE TemplateHaskell #-}
-{-# OPTIONS_GHC -optc-DA_MACRO=1 #-}
-
-import Language.Haskell.TH.Syntax
-
-foreign import ccall f :: Int -> IO Int
-
-do addCStub $ unlines
- [ "#include <stdio.h>"
- , "int f(int x {"
- , " printf(\"calling f(%d)\\n\",x);"
- , " return A_MACRO + x;"
- , "}"
- ]
- return []
-
-main :: IO ()
-main = f 2 >>= print