summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2013-11-03 09:41:43 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2013-11-03 09:42:36 +0100
commitc3e7823e560bc4f95b48a6e76f736d875d3937b6 (patch)
tree3758be62c20e8c49bd677a49d9ca236ce131d73b
parent5a01117eb67f852cf6dbee8ca34e1dae4eca43cd (diff)
downloadhaskell-c3e7823e560bc4f95b48a6e76f736d875d3937b6.tar.gz
Silence two AMP warnings
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
-rw-r--r--compiler/cmm/MkGraph.hs6
-rw-r--r--compiler/typecheck/TcSMonad.lhs6
2 files changed, 10 insertions, 2 deletions
diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs
index bba3d4a88a..6f9bbf8872 100644
--- a/compiler/cmm/MkGraph.hs
+++ b/compiler/cmm/MkGraph.hs
@@ -27,11 +27,15 @@ import Compiler.Hoopl hiding (Unique, (<*>), mkFirst, mkMiddle, mkLast, mkLabel,
import DynFlags
import FastString
import ForeignCall
-import Prelude hiding (succ)
import SMRep (ByteOff)
import UniqSupply
import OrdList
+import Control.Monad
+import Data.List
+import Data.Maybe
+import Prelude (($),Int,Eq(..)) -- avoid importing (<*>)
+
#include "HsVersions.h"
diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs
index 3a01e31eb2..8e23132c34 100644
--- a/compiler/typecheck/TcSMonad.lhs
+++ b/compiler/typecheck/TcSMonad.lhs
@@ -133,7 +133,7 @@ import UniqFM
import Maybes ( orElse, catMaybes, firstJust )
import Pair ( pSnd )
-import Control.Monad( when, zipWithM )
+import Control.Monad( ap, when, zipWithM )
import Data.IORef
import TrieMap
@@ -989,6 +989,10 @@ newtype TcS a = TcS { unTcS :: TcSEnv -> TcM a }
instance Functor TcS where
fmap f m = TcS $ fmap f . unTcS m
+instance Applicative TcS where
+ pure = return
+ (<*>) = ap
+
instance Monad TcS where
return x = TcS (\_ -> return x)
fail err = TcS (\_ -> fail err)