From 00c8fa011bed11d95016c13a75e93bc94a4f6aa5 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 2 Jul 2007 11:52:04 +0000 Subject: [PATCH] Remove the unused "Eager monad" --- compiler/utils/Util.lhs | 35 ----------------------------------- 1 file changed, 35 deletions(-) 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} %* * %************************************************************************ -- 1.7.10.4