[project @ 1997-05-26 05:58:06 by sof]
[ghc-hetmet.git] / ghc / compiler / tests / ccall / cc002.hs
1 --!!! cc002 -- ccall with non-standard boxed arguments and results
2
3 module Test where
4
5 import GlaExts
6 import Foreign
7
8 -- Test returning results
9
10 a :: PrimIO ForeignObj
11 a = _ccall_ a
12
13 b :: PrimIO (StablePtr Double)
14 b = _ccall_ b
15
16 -- Test taking arguments
17
18 c :: ForeignObj -> PrimIO Int
19 c x = _ccall_ c x
20
21 d :: StablePtr Int -> PrimIO Int
22 d x = _ccall_ d x