3a4b66d1d72b7702c80458b575842c5a96e75e6d
[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 PreludeGlaIO
6
7 -- Test returning results
8
9 a :: PrimIO _MallocPtr
10 a = _ccall_ a
11
12 b :: PrimIO _StablePtr
13 b = _ccall_ b
14
15 -- Test taking arguments
16
17 c :: _MallocPtr -> PrimIO Int
18 c x = _ccall_ c x
19
20 d :: _StablePtr -> PrimIO Int
21 d x = _ccall_ d x