X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnEnv.lhs;fp=compiler%2Frename%2FRnEnv.lhs;h=b3333731c1a3e04192ee3b1715682678486ad968;hp=c4ad95a333dff71a461e960bd617a8af6e1b741c;hb=7b5b3b0cab463e108a0132435a28ef19d17cb32b;hpb=9992bfb6bd3644384b9a26b810ef68f05fd60879 diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index c4ad95a..b333373 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))