[project @ 1999-07-08 13:51:17 by sof]
[ghc-hetmet.git] / ghc / tests / programs / fexport / For.hs
1 module For where
2
3 {-
4 import IOExts
5 import Addr
6 --y = putChar
7
8 count :: IORef Int -> IO Int
9 count ref = do
10   x <- readIORef ref
11   writeIORef ref (x+1)
12   return x
13
14 createCounter :: IO Addr
15 createCounter = do
16   ref <- newIORef 0
17   mkCounter (count ref)
18
19 foreign import "sin" msin :: Double -> IO Double
20 -}
21
22 foreign export "putChar" putChar :: Char -> IO ()
23
24 --foreign export "createCounter" createCounter :: IO Addr
25 --foreign export dynamic mkCounter :: (IO Int) -> IO Addr