summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2006-10-06 14:02:50 +0000
committersimonpj@microsoft.com <unknown>2006-10-06 14:02:50 +0000
commitdd0a2fe88071b516589a34676286e8266accb670 (patch)
tree38232c88411b24c56ff164277934087e296a9bc6
parentc305b14a2481b4e367a5b70981a0b8b667a95e61 (diff)
downloadhaskell-dd0a2fe88071b516589a34676286e8266accb670.tar.gz
Bale out before renamer errors are duplicated
With the new Haddock patch, renamer errors can be duplicated; so we want to bale out before doing the Haddock stuff if errors are found. (E.g test mod67 shows this up.)
-rw-r--r--compiler/rename/RnSource.lhs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rename/RnSource.lhs b/compiler/rename/RnSource.lhs
index 670cfc8092..993db644bd 100644
--- a/compiler/rename/RnSource.lhs
+++ b/compiler/rename/RnSource.lhs
@@ -114,6 +114,10 @@ rnSrcDecls (HsGroup { hs_valds = val_decls,
(rn_default_decls, src_fvs5)
<- mapFvRn (wrapLocFstM rnDefaultDecl) default_decls ;
+ -- At this point, stop if we have found errors. Otherwise
+ -- the rnDocEntity stuff reports the errors again.
+ failIfErrsM ;
+
rn_docs <- mapM rnDocEntity docs ;
let {