[project @ 1996-11-26 14:59:00 by dnt]
[nofib.git] / GHC_ONLY / cg015 / Main4.hs
1 import GlasgowIOMonad
2 import GlasgowIO
3
4 main = if foo == (16::Int) then
5 finish 65# -- 'A'
6 else
7 finish 66# -- 'B'
8 where
9 foo = twice twice twice inc 0
10
11 twice f x = f (f x)
12
13 inc :: Int -> Int
14 inc x = x+1
15
16 finish :: IntPrim -> IO ()
17 finish n = ccall putchar n `thenIOPrim_` returnIO ()