diff options
Diffstat (limited to 'testsuite/tests/ffi/should_fail/ccfail003.hs')
-rw-r--r-- | testsuite/tests/ffi/should_fail/ccfail003.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/ffi/should_fail/ccfail003.hs b/testsuite/tests/ffi/should_fail/ccfail003.hs new file mode 100644 index 0000000000..f16556cb3f --- /dev/null +++ b/testsuite/tests/ffi/should_fail/ccfail003.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE UnliftedFFITypes, MagicHash #-} +-- !!! illegal types in foreign export delarations +module ShouldFail where + +import GHC.Exts + +foreign export ccall foo :: Int# -> IO () +foo i | i ==# 0# = return () + +foreign export ccall bar :: Int -> Int# +bar _ = 42# |