diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-10-27 11:09:44 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-10-27 11:09:44 +0000 |
commit | 6cad3e8c495cb6b6630c6962a5e8c6673d095a2b (patch) | |
tree | 80a0e149ad971af050dcf3778e8ed83729d9b182 /src/Haddock/Interface/AttachInstances.hs | |
parent | 985c84aa4fe1422d211254c1a484c66f12a87a9e (diff) |
follow changes in the GHC API
Diffstat (limited to 'src/Haddock/Interface/AttachInstances.hs')
-rw-r--r-- | src/Haddock/Interface/AttachInstances.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs index fd1e86d9..cc2dfa19 100644 --- a/src/Haddock/Interface/AttachInstances.hs +++ b/src/Haddock/Interface/AttachInstances.hs @@ -25,7 +25,12 @@ import GHC import Name import InstEnv import Class -import HscTypes (withSession, ioMsg) +#if MIN_VERSION_ghc(7,1,0) +import GhcMonad (withSession) +#else +import HscTypes (withSession) +#endif +import MonadUtils (liftIO) import TcRnDriver (tcRnGetInfo) import TypeRep hiding (funTyConName) import Var hiding (varName) @@ -93,7 +98,9 @@ lookupInstDoc name iface ifaceMap instIfaceMap = -- | Like GHC's getInfo but doesn't cut things out depending on the -- interative context, which we don't set sufficiently anyway. getAllInfo :: GhcMonad m => Name -> m (Maybe (TyThing,Fixity,[Instance])) -getAllInfo name = withSession $ \hsc_env -> ioMsg $ tcRnGetInfo hsc_env name +getAllInfo name = withSession $ \hsc_env -> do + (_msgs, r) <- liftIO $ tcRnGetInfo hsc_env name + return r -------------------------------------------------------------------------------- |