diff options
author | David Waern <david.waern@gmail.com> | 2011-06-10 23:56:19 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-06-10 23:56:19 +0000 |
commit | def7f873b4a37c67aef34d6f31de39d2a566638b (patch) | |
tree | 84b75b5d172d228d730ed05d127c6d41a824b606 /compiler/rename | |
parent | a0770aa618f81e04737ba7bf4047ae4e7b644671 (diff) | |
parent | 0b4324456e472d15a3a124f56387486f71cb765d (diff) | |
download | haskell-def7f873b4a37c67aef34d6f31de39d2a566638b.tar.gz |
Merge branch 'master' of http://darcs.haskell.org/ghc
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnEnv.lhs | 6 | ||||
-rw-r--r-- | compiler/rename/RnHsDoc.hs | 2 | ||||
-rw-r--r-- | compiler/rename/RnHsSyn.lhs | 2 | ||||
-rw-r--r-- | compiler/rename/RnNames.lhs | 4 |
4 files changed, 10 insertions, 4 deletions
diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index c4ad95a333..b3333731c1 100644 --- a/compiler/rename/RnEnv.lhs +++ b/compiler/rename/RnEnv.lhs @@ -1053,7 +1053,11 @@ unknownNameSuggestErr where_look tried_rdr_name where pp_item :: (RdrName, HowInScope) -> SDoc pp_item (rdr, Left loc) = quotes (ppr rdr) <+> -- Locally defined - parens (ptext (sLit "line") <+> int (srcSpanStartLine loc)) + parens (ptext (sLit "line") <+> int (srcSpanStartLine loc')) + where loc' = case loc of + UnhelpfulSpan _ -> + panic "unknownNameSuggestErr UnhelpfulSpan" + RealSrcSpan l -> l pp_item (rdr, Right is) = quotes (ppr rdr) <+> -- Imported parens (ptext (sLit "imported from") <+> ppr (is_mod is)) diff --git a/compiler/rename/RnHsDoc.hs b/compiler/rename/RnHsDoc.hs index beb45bbfbc..9e53f49320 100644 --- a/compiler/rename/RnHsDoc.hs +++ b/compiler/rename/RnHsDoc.hs @@ -3,7 +3,7 @@ module RnHsDoc ( rnHsDoc, rnLHsDoc, rnMbLHsDoc ) where import TcRnTypes import HsSyn -import SrcLoc ( Located(..) ) +import SrcLoc rnMbLHsDoc :: Maybe LHsDocString -> RnM (Maybe LHsDocString) diff --git a/compiler/rename/RnHsSyn.lhs b/compiler/rename/RnHsSyn.lhs index 478ba32655..bfbcdc515f 100644 --- a/compiler/rename/RnHsSyn.lhs +++ b/compiler/rename/RnHsSyn.lhs @@ -22,7 +22,7 @@ import TysWiredIn ( tupleTyCon, listTyCon, parrTyCon, charTyCon ) import Name ( Name, getName, isTyVarName ) import NameSet import BasicTypes ( Boxity ) -import SrcLoc ( Located(..), unLoc ) +import SrcLoc \end{code} %************************************************************************ diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 4c269d904d..ee14ad91b3 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -1256,7 +1256,9 @@ warnUnusedImportDecls gbl_env ; ifDOptM Opt_D_dump_minimal_imports $ printMinimalImports usage } where - explicit_import (L loc _) = isGoodSrcSpan loc + explicit_import (L loc _) = case loc of + UnhelpfulSpan _ -> False + RealSrcSpan _ -> True -- Filter out the implicit Prelude import -- which we do not want to bleat about \end{code} |