summaryrefslogtreecommitdiff
path: root/compiler/stgSyn/CoreToStg.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/stgSyn/CoreToStg.lhs')
-rw-r--r--compiler/stgSyn/CoreToStg.lhs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs
index c87de4e65f..80b81a68e4 100644
--- a/compiler/stgSyn/CoreToStg.lhs
+++ b/compiler/stgSyn/CoreToStg.lhs
@@ -44,6 +44,8 @@ import ForeignCall
import Demand ( isSingleUsed )
import PrimOp ( PrimCall(..) )
+import Control.Monad (liftM, ap)
+
-- Note [Live vs free]
-- ~~~~~~~~~~~~~~~~~~~
--
@@ -982,6 +984,13 @@ thenLne :: LneM a -> (a -> LneM b) -> LneM b
thenLne m k = LneM $ \env lvs_cont
-> unLneM (k (unLneM m env lvs_cont)) env lvs_cont
+instance Functor LneM where
+ fmap = liftM
+
+instance Applicative LneM where
+ pure = return
+ (<*>) = ap
+
instance Monad LneM where
return = returnLne
(>>=) = thenLne