projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
465a4332d5732a7c425d969213af6c49454f2f5f
[ghc-hetmet.git]
/
ghc
/
tests
/
ccall
/
should_compile
/
cc001.hs
1
--!!! cc001 -- ccall with standard boxed arguments and results
2
3
module ShouldCompile where
4
5
-- simple functions
6
7
a :: IO Int
8
a = _ccall_ a
9
10
b :: Int -> IO Int
11
b x = _ccall_ b x
12
13
c :: Int -> Char -> Float -> Double -> IO Float
14
c x1 x2 x3 x4 = _ccall_ c x1 x2 x3 x4
15
16
-- simple monadic code
17
18
d = a >>= \ x ->
19
b x >>= \ y ->
20
c y 'f' 1.0 2.0
21
22
23