diff options
Diffstat (limited to 'compiler/GHC/Driver/Pipeline/Monad.hs')
-rw-r--r-- | compiler/GHC/Driver/Pipeline/Monad.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Monad.hs b/compiler/GHC/Driver/Pipeline/Monad.hs index 03ee6e14f6..88f19d8c2c 100644 --- a/compiler/GHC/Driver/Pipeline/Monad.hs +++ b/compiler/GHC/Driver/Pipeline/Monad.hs @@ -6,7 +6,8 @@ module GHC.Driver.Pipeline.Monad ( CompPipeline(..), evalP , PhasePlus(..) , PipeEnv(..), PipeState(..), PipelineOutput(..) - , getPipeEnv, getPipeState, setDynFlags, setModLocation, setForeignOs, setIface + , getPipeEnv, getPipeState, getPipeSession + , setDynFlags, setModLocation, setForeignOs, setIface , pipeStateDynFlags, pipeStateModIface, setPlugins ) where @@ -111,6 +112,9 @@ getPipeEnv = P $ \env state -> return (state, env) getPipeState :: CompPipeline PipeState getPipeState = P $ \_env state -> return (state, state) +getPipeSession :: CompPipeline HscEnv +getPipeSession = P $ \_env state -> return (state, hsc_env state) + instance HasDynFlags CompPipeline where getDynFlags = P $ \_env state -> return (state, hsc_dflags (hsc_env state)) |