1 -- !! INLINE on recursive functions.
3 Date: Thu, 8 Dec 94 11:38:24 GMT
4 From: Julian Seward (DRL PhD) <sewardj@computer-science.manchester.ac.uk>
5 Message-Id: <9412081138.AA16652@rdf009.cs.man.ac.uk>
6 To: partain@dcs.gla.ac.uk
8 module ShouldFail where
11 = IMonadState -> IMonadReturn a
14 = IMonadOk IMonadState a
15 | IMonadFail IMonadState String
21 returnI r = \s0 -> IMonadOk s0 r
23 failI msg = \s0 -> IMonadFail s0 msg
27 IMonadFail s1 msg -> IMonadFail s1 msg
28 IMonadOk s1 r1 -> k r1 s1
30 tickI n = \s0 -> IMonadOk (s0+n) ()
32 mapI f [] = returnI []
33 mapI f (x:xs) = f x `thenI` ( \ fx ->
34 mapI f xs `thenI` ( \ fxs ->
38 {-# INLINE returnI #-}