c26a53f29c888d53b849901ab9e1bf07927fd2f0
[ghc-hetmet.git] / ghc / compiler / tests / ccall / cc005.hs
1 --!!! cc001 -- ccall with standard boxed arguments and results
2
3 module Test where
4
5 import PreludeGlaST
6
7 -- simple functions
8
9 a :: PrimIO Int
10 a = _ccall_ a
11
12 b :: Int -> PrimIO Int
13 b x = _ccall_ b x
14
15 c :: Int -> Char -> Float -> Double -> PrimIO Float
16 c x1 x2 x3 x4 = _ccall_ c x1 x2 x3 x4
17
18 -- simple monadic code
19
20 d =     a               `thenPrimIO` \ x ->
21         b x             `thenPrimIO` \ y ->
22         c y 'f' 1.0 2.0
23
24
25