summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Pipeline/Monad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Pipeline/Monad.hs')
-rw-r--r--compiler/GHC/Driver/Pipeline/Monad.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Monad.hs b/compiler/GHC/Driver/Pipeline/Monad.hs
index 88f19d8c2c..53d4e98b0d 100644
--- a/compiler/GHC/Driver/Pipeline/Monad.hs
+++ b/compiler/GHC/Driver/Pipeline/Monad.hs
@@ -15,6 +15,7 @@ import GHC.Prelude
import GHC.Utils.Monad
import GHC.Utils.Outputable
+import GHC.Utils.Logger
import GHC.Driver.Session
import GHC.Driver.Phases
@@ -118,6 +119,9 @@ getPipeSession = P $ \_env state -> return (state, hsc_env state)
instance HasDynFlags CompPipeline where
getDynFlags = P $ \_env state -> return (state, hsc_dflags (hsc_env state))
+instance HasLogger CompPipeline where
+ getLogger = P $ \_env state -> return (state, hsc_logger (hsc_env state))
+
setDynFlags :: DynFlags -> CompPipeline ()
setDynFlags dflags = P $ \_env state ->
return (state{hsc_env= (hsc_env state){ hsc_dflags = dflags }}, ())