36d6a7769189fe2c2c318f758cde85891dbd04cf
[ghc-hetmet.git] / ghc / tests / ccall / should_fail / cc002.hs
1 -- !!! cc002 -- ccall with non-standard boxed arguments and results
2
3 module Test where
4
5 import Foreign
6
7 -- Test returning results
8
9 a :: IO ForeignObj
10 a = _ccall_ a
11
12 b :: IO (StablePtr Double)
13 b = _ccall_ b
14
15 -- Test taking arguments
16
17 c :: ForeignObj -> IO Int
18 c x = _ccall_ c x
19
20 d :: StablePtr Int -> IO Int
21 d x = _ccall_ d x