summaryrefslogtreecommitdiff
path: root/compiler/rename
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2013-09-17 23:37:02 +0200
committerAustin Seipp <austin@well-typed.com>2013-11-02 15:58:06 -0500
commit63b8147f01bd7bd4a46fb013998f138bce3139be (patch)
tree6e06e213602a60e357fb0859734da2e1f2850b92 /compiler/rename
parentc4d5289d1c6e453a07bc1240634579b09ef66632 (diff)
downloadhaskell-63b8147f01bd7bd4a46fb013998f138bce3139be.tar.gz
Load all modules before reporting errors (#8322)
Instead of reporting only one "module not found"" error. Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/rename')
-rw-r--r--compiler/rename/RnNames.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index a2eec0d2e9..88efe867aa 100644
--- a/compiler/rename/RnNames.lhs
+++ b/compiler/rename/RnNames.lhs
@@ -142,8 +142,8 @@ rnImports imports = do
this_mod <- getModule
let (source, ordinary) = partition is_source_import imports
is_source_import d = ideclSource (unLoc d)
- stuff1 <- mapM (rnImportDecl this_mod) ordinary
- stuff2 <- mapM (rnImportDecl this_mod) source
+ stuff1 <- mapAndReportM (rnImportDecl this_mod) ordinary
+ stuff2 <- mapAndReportM (rnImportDecl this_mod) source
-- Safe Haskell: See Note [Tracking Trust Transitively]
let (decls, rdr_env, imp_avails, hpc_usage) = combine (stuff1 ++ stuff2)
return (decls, rdr_env, imp_avails, hpc_usage)