summaryrefslogtreecommitdiff
path: root/compiler/rename/RnEnv.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rename/RnEnv.hs')
-rw-r--r--compiler/rename/RnEnv.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rename/RnEnv.hs b/compiler/rename/RnEnv.hs
index 7f12e05816..fe0623e140 100644
--- a/compiler/rename/RnEnv.hs
+++ b/compiler/rename/RnEnv.hs
@@ -1503,15 +1503,16 @@ lookupBindGroupOcc ctxt what rdr_name
[n] -> text "Perhaps you meant" <+>
quotes (ppr n) <+>
parens (pprDefinedAt n)
- _ -> text "Perhaps you meant one of these:" <+>
- pprWithCommas (\x -> quotes (ppr x) <+> parens (pprDefinedAt x))
- similar_names
+ _ -> sep [ text "Perhaps you meant one of these:"
+ , nest 2 (pprWithCommas pp_item similar_names) ]
where
similar_names
= fuzzyLookup (unpackFS $ occNameFS $ rdrNameOcc rdr_name)
$ map (\x -> ((unpackFS $ occNameFS $ nameOccName x), x))
names_in_scope
+ pp_item x = quotes (ppr x) <+> parens (pprDefinedAt x)
+
---------------
lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [(RdrName, Name)]