diff options
author | Ian Lynagh <igloo@earth.li> | 2011-12-19 15:50:47 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-12-19 15:57:22 +0000 |
commit | 06c6d9709fb73cbaf9c0e1da337c5467c2839f0a (patch) | |
tree | 6ceb4241e5b8167d791100f29866447ab6b16ea8 /compiler/main/DriverPipeline.hs | |
parent | 0c047a8357551b002b76b76859b748fb51f64633 (diff) | |
download | haskell-06c6d9709fb73cbaf9c0e1da337c5467c2839f0a.tar.gz |
Add a class HasDynFlags(getDynFlags)
We no longer have many separate, clashing getDynFlags functions
I've given each GhcMonad its own HasDynFlags instance, rather than
using UndecidableInstances to make a GhcMonad m => HasDynFlags m
instance.
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index e7ced1802e..0e8990777b 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -595,8 +595,8 @@ getPipeEnv = P $ \env state -> return (state, env) getPipeState :: CompPipeline PipeState getPipeState = P $ \_env state -> return (state, state) -getDynFlags :: CompPipeline DynFlags -getDynFlags = P $ \_env state -> return (state, hsc_dflags (hsc_env state)) +instance HasDynFlags CompPipeline where + getDynFlags = P $ \_env state -> return (state, hsc_dflags (hsc_env state)) setDynFlags :: DynFlags -> CompPipeline () setDynFlags dflags = P $ \_env state -> |