[commit: ghc] master: Silence two AMP warnings (c3e7823)
git at git.haskell.org
git at git.haskell.org
Sun Nov 3 09:00:08 UTC 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/c3e7823e560bc4f95b48a6e76f736d875d3937b6/ghc
>---------------------------------------------------------------
commit c3e7823e560bc4f95b48a6e76f736d875d3937b6
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Sun Nov 3 09:41:43 2013 +0100
Silence two AMP warnings
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
>---------------------------------------------------------------
c3e7823e560bc4f95b48a6e76f736d875d3937b6
compiler/cmm/MkGraph.hs | 6 +++++-
compiler/typecheck/TcSMonad.lhs | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs
index bba3d4a..6f9bbf8 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 3a01e31..8e23132 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)
More information about the ghc-commits
mailing list