diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-24 23:13:10 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-26 13:19:00 -0400 |
commit | 160fba4aa306c0649c72a6dcd7c98d9782a0e74b (patch) | |
tree | 1d4d70dfa3463a079f9eda797e4932b90dfb6812 /testsuite/tests/linear/should_fail/LinearFFI.hs | |
parent | bda55fa0444310079ab89f2d28ddb8982975b646 (diff) | |
download | haskell-160fba4aa306c0649c72a6dcd7c98d9782a0e74b.tar.gz |
Disallow linear types in FFI (#18472)
Diffstat (limited to 'testsuite/tests/linear/should_fail/LinearFFI.hs')
-rw-r--r-- | testsuite/tests/linear/should_fail/LinearFFI.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_fail/LinearFFI.hs b/testsuite/tests/linear/should_fail/LinearFFI.hs new file mode 100644 index 0000000000..6c6e1c562a --- /dev/null +++ b/testsuite/tests/linear/should_fail/LinearFFI.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE LinearTypes #-} +module LinearFFI where -- #18472 + +import Foreign.Ptr + +foreign import ccall "exp" c_exp :: Double #-> Double +foreign import stdcall "dynamic" d8 :: FunPtr (IO Int) #-> IO Int +foreign import ccall "wrapper" mkF :: IO () #-> IO (FunPtr (IO ())) |