diff options
author | Ian Lynagh <igloo@earth.li> | 2007-07-02 11:52:04 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-07-02 11:52:04 +0000 |
commit | 00c8fa011bed11d95016c13a75e93bc94a4f6aa5 (patch) | |
tree | 4413bf2645a37f2fd0c876dd35fd0a21ac42c9a3 | |
parent | 218ca73afa77095237ad960289322e6009563744 (diff) | |
download | haskell-00c8fa011bed11d95016c13a75e93bc94a4f6aa5.tar.gz |
Remove the unused "Eager monad"
-rw-r--r-- | compiler/utils/Util.lhs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 0a77e4d92a..abde6d65e6 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} %* * %************************************************************************ |