summaryrefslogtreecommitdiff
path: root/compiler/cmm
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/cmm')
-rw-r--r--compiler/cmm/CmmLint.hs4
-rw-r--r--compiler/cmm/PprC.hs4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs
index 63a3ff5de3..a2ccfbeecf 100644
--- a/compiler/cmm/CmmLint.hs
+++ b/compiler/cmm/CmmLint.hs
@@ -217,7 +217,7 @@ instance Functor CmmLint where
fmap = liftM
instance Applicative CmmLint where
- pure = return
+ pure a = CmmLint (\_ -> Right a)
(<*>) = ap
instance Monad CmmLint where
@@ -225,7 +225,7 @@ instance Monad CmmLint where
case m dflags of
Left e -> Left e
Right a -> unCL (k a) dflags
- return a = CmmLint (\_ -> Right a)
+ return = pure
instance HasDynFlags CmmLint where
getDynFlags = CmmLint (\dflags -> Right dflags)
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index c96b7076bf..76659caa8f 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -1005,12 +1005,12 @@ instance Functor TE where
fmap = liftM
instance Applicative TE where
- pure = return
+ pure a = TE $ \s -> (a, s)
(<*>) = ap
instance Monad TE where
TE m >>= k = TE $ \s -> case m s of (a, s') -> unTE (k a) s'
- return a = TE $ \s -> (a, s)
+ return = pure
te_lbl :: CLabel -> TE ()
te_lbl lbl = TE $ \(temps,lbls) -> ((), (temps, Map.insert lbl () lbls))