summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_compile/cc011.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ffi/should_compile/cc011.hs')
-rw-r--r--testsuite/tests/ffi/should_compile/cc011.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/ffi/should_compile/cc011.hs b/testsuite/tests/ffi/should_compile/cc011.hs
new file mode 100644
index 0000000000..25cce84bd3
--- /dev/null
+++ b/testsuite/tests/ffi/should_compile/cc011.hs
@@ -0,0 +1,9 @@
+module ShouldCompile where
+
+import Foreign
+
+-- !!! test that a recursive newtype can be used as an argument or result
+-- type of a foreign import.
+
+newtype T = T (Ptr T)
+foreign import ccall foo :: T -> IO T