projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1999-01-27 15:01:03 by simonpj]
[ghc-hetmet.git]
/
ghc
/
tests
/
ccall
/
should_compile
/
cc006.hs
1
-- !!! cc006 -- ccall with non-standard boxed arguments and results
2
3
module Test where
4
5
import Foreign
6
import CCall
7
8
-- Test returning results
9
10
a :: IO Int
11
a = _ccall_ a
12
13
b :: IO (StablePtr Int)
14
b = _ccall_ b
15
16
-- Test taking arguments
17
18
c :: ForeignObj -> IO Int
19
c x = _ccall_ c x
20
21
d :: StablePtr Int -> IO Int
22
d x = _ccall_ d x