Repository : http://darcs.haskell.org/ghc.git/
On branch : master https://github.com/ghc/ghc/commit/f7e33ca75eb1fffd5d4d84c109980e0ebf207743 >--------------------------------------------------------------- commit f7e33ca75eb1fffd5d4d84c109980e0ebf207743 Author: Ian Lynagh <[email protected]> Date: Sun May 19 15:49:21 2013 +0100 Add some extra debugging info >--------------------------------------------------------------- compiler/typecheck/TcRnMonad.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index 452a105..cd164b9 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -44,12 +44,12 @@ import Outputable import UniqSupply import UniqFM import DynFlags -import Maybes import StaticFlags import FastString import Panic import Util +import Control.Exception import Data.IORef import qualified Data.Set as Set import Control.Monad @@ -187,7 +187,11 @@ initTcPrintErrors -- Used from the interactive loop only initTcPrintErrors env mod todo = initTc env HsSrcFile False mod todo initTcForLookup :: HscEnv -> TcM a -> IO a -initTcForLookup hsc_env = liftM (expectJust "initTcInteractive" . snd) . initTc hsc_env HsSrcFile False iNTERACTIVE +initTcForLookup hsc_env tcm + = do (msgs, m) <- initTc hsc_env HsSrcFile False iNTERACTIVE tcm + case m of + Nothing -> throwIO $ mkSrcErr $ snd msgs + Just x -> return x \end{code} %************************************************************************ _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
