summaryrefslogtreecommitdiff
path: root/compiler/profiling
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2013-09-11 18:46:54 -0500
committerAustin Seipp <austin@well-typed.com>2013-09-11 18:47:15 -0500
commitb20cf4ecbf244f091f4084c11ae2350d248ce6ef (patch)
treed595c6c632773bb4110468c23467f0b339096538 /compiler/profiling
parent1ef941a82eafb8f22c19e2643685679d2454c24a (diff)
downloadhaskell-b20cf4ecbf244f091f4084c11ae2350d248ce6ef.tar.gz
Fix AMP warnings.
Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/profiling')
-rw-r--r--compiler/profiling/SCCfinal.lhs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/profiling/SCCfinal.lhs b/compiler/profiling/SCCfinal.lhs
index 5417ad491e..fdcf7447eb 100644
--- a/compiler/profiling/SCCfinal.lhs
+++ b/compiler/profiling/SCCfinal.lhs
@@ -36,6 +36,9 @@ import FastString
import SrcLoc
import Util
+import Control.Monad (liftM, ap)
+import Control.Applicative (Applicative(..))
+
stgMassageForProfiling
:: DynFlags
@@ -220,6 +223,13 @@ newtype MassageM result
-> (CollectedCCs, result)
}
+instance Functor MassageM where
+ fmap = liftM
+
+instance Applicative MassageM where
+ pure = return
+ (<*>) = ap
+
instance Monad MassageM where
return x = MassageM (\_ ccs -> (ccs, x))
(>>=) = thenMM