From: Ian Lynagh Date: Mon, 2 Jul 2007 11:52:04 +0000 (+0000) Subject: Remove the unused "Eager monad" X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=00c8fa011bed11d95016c13a75e93bc94a4f6aa5 Remove the unused "Eager monad" --- diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 0a77e4d..abde6d6 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -109,41 +109,6 @@ infixr 9 `thenCmp` %************************************************************************ %* * -\subsection{The Eager monad} -%* * -%************************************************************************ - -The @Eager@ monad is just an encoding of continuation-passing style, -used to allow you to express "do this and then that", mainly to avoid -space leaks. It's done with a type synonym to save bureaucracy. - -\begin{code} -#if NOT_USED - -type Eager ans a = (a -> ans) -> ans - -runEager :: Eager a a -> a -runEager m = m (\x -> x) - -appEager :: Eager ans a -> (a -> ans) -> ans -appEager m cont = m cont - -thenEager :: Eager ans a -> (a -> Eager ans b) -> Eager ans b -thenEager m k cont = m (\r -> k r cont) - -returnEager :: a -> Eager ans a -returnEager v cont = cont v - -mapEager :: (a -> Eager ans b) -> [a] -> Eager ans [b] -mapEager f [] = returnEager [] -mapEager f (x:xs) = f x `thenEager` \ y -> - mapEager f xs `thenEager` \ ys -> - returnEager (y:ys) -#endif -\end{code} - -%************************************************************************ -%* * \subsection{A for loop} %* * %************************************************************************