summaryrefslogtreecommitdiff
path: root/compiler/utils/MonadUtils.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-11-08 14:47:23 +0000
committerIan Lynagh <igloo@earth.li>2008-11-08 14:47:23 +0000
commitf9fa73dd0f96280ddc73800ca8d247aa788561b5 (patch)
treef1bf8285ad59d7c733726e7ce091805912c35529 /compiler/utils/MonadUtils.hs
parent9c8ba01a0f1f2634eb9cece4fd7259b8134959a3 (diff)
downloadhaskell-f9fa73dd0f96280ddc73800ca8d247aa788561b5.tar.gz
We now require GHC 6.6, so we always have Applicative
Diffstat (limited to 'compiler/utils/MonadUtils.hs')
-rw-r--r--compiler/utils/MonadUtils.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/compiler/utils/MonadUtils.hs b/compiler/utils/MonadUtils.hs
index 28613a4284..3c4e3861e3 100644
--- a/compiler/utils/MonadUtils.hs
+++ b/compiler/utils/MonadUtils.hs
@@ -24,11 +24,6 @@ module MonadUtils
-- Detection of available libraries
----------------------------------------------------------------------------------------
-#if __GLASGOW_HASKELL__ >= 606
-#define HAVE_APPLICATIVE 1
-#else
-#define HAVE_APPLICATIVE 0
-#endif
-- we don't depend on MTL for now
#define HAVE_MTL 0
@@ -38,9 +33,7 @@ module MonadUtils
import Maybes
-#if HAVE_APPLICATIVE
import Control.Applicative
-#endif
#if HAVE_MTL
import Control.Monad.Trans
#endif
@@ -48,28 +41,6 @@ import Control.Monad
import Control.Monad.Fix
----------------------------------------------------------------------------------------
--- Applicative
-----------------------------------------------------------------------------------------
-
-#if !HAVE_APPLICATIVE
-
-class Functor f => Applicative f where
- pure :: a -> f a
- (<*>) :: f (a -> b) -> f a -> f b
-
-(<$>) :: Functor f => (a -> b) -> (f a -> f b)
-(<$>) = fmap
-
-infixl 4 <$>
-infixl 4 <*>
-
-instance Applicative IO where
- pure = return
- (<*>) = ap
-
-#endif
-
-----------------------------------------------------------------------------------------
-- MTL
----------------------------------------------------------------------------------------