diff options
Diffstat (limited to 'compiler/basicTypes/RdrName.hs')
-rw-r--r-- | compiler/basicTypes/RdrName.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/basicTypes/RdrName.hs b/compiler/basicTypes/RdrName.hs index f28ae011ac..5f496059d2 100644 --- a/compiler/basicTypes/RdrName.hs +++ b/compiler/basicTypes/RdrName.hs @@ -1237,9 +1237,8 @@ pprNameProvenance :: GlobalRdrElt -> SDoc -- ^ Print out one place where the name was define/imported -- (With -dppr-debug, print them all) pprNameProvenance (GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss }) - = sdocWithPprDebug $ \dbg -> if dbg - then vcat pp_provs - else head pp_provs + = ifPprDebug (vcat pp_provs) + (head pp_provs) where pp_provs = pp_lcl ++ map pp_is iss pp_lcl = if lcl then [text "defined at" <+> ppr (nameSrcLoc name)] |