projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
95a061b9715d9422df017a38dced2268c668b4fb
[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 PreludeGlaST
6
7
-- Test returning results
8
9
a :: PrimIO ForeignObj
10
a = _ccall_ a
11
12
b :: PrimIO StablePtr
13
b = _ccall_ b
14
15
-- Test taking arguments
16
17
c :: ForeignObj -> PrimIO Int
18
c x = _ccall_ c x
19
20
d :: StablePtr -> PrimIO Int
21
d x = _ccall_ d x