diff options
author | Austin Seipp <austin@well-typed.com> | 2013-09-11 18:46:54 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2013-09-11 18:47:15 -0500 |
commit | b20cf4ecbf244f091f4084c11ae2350d248ce6ef (patch) | |
tree | d595c6c632773bb4110468c23467f0b339096538 /compiler/profiling | |
parent | 1ef941a82eafb8f22c19e2643685679d2454c24a (diff) | |
download | haskell-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.lhs | 10 |
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 |