:: HscEnv
-> Module
-> TcM r
- -> IO (Maybe r)
+ -> IO (Messages, Maybe r)
initTcPrintErrors env mod todo = do
(msgs, res) <- initTc env HsSrcFile False mod todo
- printErrorsAndWarnings (hsc_dflags env) msgs
- return res
+ return (msgs, res)
\end{code}
%************************************************************************
-- Drop elements of the input that fail, so the result
-- list can be shorter than the argument list
mapAndRecoverM _ [] = return []
-mapAndRecoverM f (x:xs) = do { mb_r <- tryM (f x)
+mapAndRecoverM f (x:xs) = do { mb_r <- try_m (f x)
; rs <- mapAndRecoverM f xs
; return (case mb_r of
Left _ -> rs