projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-08-17 15:23:47 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
rename
/
RnNames.lhs
diff --git
a/ghc/compiler/rename/RnNames.lhs
b/ghc/compiler/rename/RnNames.lhs
index
1c18fef
..
9e15a4b
100644
(file)
--- a/
ghc/compiler/rename/RnNames.lhs
+++ b/
ghc/compiler/rename/RnNames.lhs
@@
-53,7
+53,7
@@
import SrcLoc ( noSrcLoc, Located(..), mkGeneralSrcSpan,
unLoc, noLoc, srcLocSpan, SrcSpan )
import BasicTypes ( DeprecTxt )
import ListSetOps ( removeDups )
unLoc, noLoc, srcLocSpan, SrcSpan )
import BasicTypes ( DeprecTxt )
import ListSetOps ( removeDups )
-import Util ( sortLt, notNull, isSingleton )
+import Util ( sortLe, notNull, isSingleton )
import List ( partition )
import IO ( openFile, IOMode(..) )
\end{code}
import List ( partition )
import IO ( openFile, IOMode(..) )
\end{code}
@@
-1010,8
+1010,11
@@
addDupDeclErr (n:ns)
nest 2 (ptext SLIT("other declarations at:")),
nest 4 (vcat (map ppr sorted_locs))]
where
nest 2 (ptext SLIT("other declarations at:")),
nest 4 (vcat (map ppr sorted_locs))]
where
- sorted_locs = sortLt occ'ed_before (map nameSrcLoc ns)
- occ'ed_before a b = LT == compare a b
+ sorted_locs = sortLe occ'ed_before (map nameSrcLoc ns)
+ occ'ed_before a b = case compare a b of
+ LT -> True
+ EQ -> True
+ GT -> False
dupExportWarn occ_name ie1 ie2
= hsep [quotes (ppr occ_name),
dupExportWarn occ_name ie1 ie2
= hsep [quotes (ppr occ_name),