2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1995
4 \section[LiftMonad]{A lifting monad}
7 #if defined(__GLASGOW_HASKELL__)
8 module LiftMonad where { bogusLiftMonadThing = True }
13 thenLft, returnLft, mapLft
18 data LiftM a = MkLiftM a
19 -- Just add a bottom element under the domain
22 Notice that @thenLft@ is strict in its first argument.
25 thenLft :: LiftM a -> (a -> b) -> b
26 (MkLiftM x) `thenLft` cont = cont x
28 returnLft :: a -> LiftM a
29 returnLft a = MkLiftM a
31 mapLft :: (a -> LiftM b) -> [a] -> LiftM [b]
32 mapLft f [] = returnLft []
34 = f x `thenLft` \ x2 ->
35 mapLft f xs `thenLft` \ xs2 ->