summaryrefslogtreecommitdiff
path: root/compiler/simplCore
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/simplCore')
-rw-r--r--compiler/simplCore/CoreMonad.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs
index 013b1414ee..dde4cb6c50 100644
--- a/compiler/simplCore/CoreMonad.hs
+++ b/compiler/simplCore/CoreMonad.hs
@@ -25,7 +25,7 @@ module CoreMonad (
CoreM, runCoreM,
-- ** Reading from the monad
- getHscEnv, getRuleBase, getModule,
+ getRuleBase, getModule,
getDynFlags, getOrigNameCache, getPackageFamInstEnv,
getVisibleOrphanMods,
getPrintUnqualified, getSrcSpanM,
@@ -685,9 +685,6 @@ liftIOWithCount what = liftIO what >>= (\(count, x) -> addSimplCount count >> re
************************************************************************
-}
-getHscEnv :: CoreM HscEnv
-getHscEnv = read cr_hsc_env
-
getRuleBase :: CoreM RuleBase
getRuleBase = read cr_rule_base
@@ -708,6 +705,9 @@ addSimplCount count = write (CoreWriter { cw_simpl_count = count })
instance HasDynFlags CoreM where
getDynFlags = fmap hsc_dflags getHscEnv
+instance HasHscEnv CoreM where
+ getHscEnv = read cr_hsc_env
+
instance HasModule CoreM where
getModule = read cr_module