@@ -61,7 +61,6 @@ import Fusion.Plugin.Common
6161 , showDetailsCaseMatch
6262 , showDetailsConstr
6363 , showInfo
64- , showWithUnique
6564 , subsumedBySameName
6665 )
6766
@@ -448,7 +447,7 @@ reportInspected
448447 stale = filter (`notElem` present) allowed
449448 unless (null stale) $
450449 putMsgS $ " fusion-plugin: "
451- ++ getOccString (getName b)
450+ ++ binderDisplayName b
452451 ++ " : redundant " ++ label
453452 ++ " entries (safe to remove): ["
454453 ++ DL. intercalate " , " (map qualifiedName stale)
@@ -457,13 +456,13 @@ reportInspected
457456 terse ni results =
458457 let names = DL. nub (mapMaybe (contextQualifiedName . snd ) results)
459458 in putMsgS $ " fusion-plugin: "
460- ++ getOccString (getName b)
459+ ++ binderDisplayName b
461460 ++ " : found " ++ niForbidLabel ni ++ " ["
462461 ++ DL. intercalate " , " names ++ " ]"
463462
464463 detailed ni results = do
465464 putMsgS $ " fusion-plugin: "
466- ++ showWithUnique dflags b
465+ ++ binderDisplayName b
467466 ++ " : inspecting (" ++ niBanner ni ++ " )..."
468467 let getAlts x =
469468 case x of
@@ -572,15 +571,15 @@ reportInspectedClasses dflags reportMode classAnns allBinds (NonRec b _) =
572571 ReportWarn -> report ispec hits
573572 _ -> do
574573 putMsgS $ " fusion-plugin: "
575- ++ showWithUnique dflags b
574+ ++ binderDisplayName b
576575 ++ " : inspecting (" ++ showSDoc dflags (ppr ispec) ++ " )..."
577576 report ispec hits
578577 return 1
579578
580579 report _ hits =
581580 let names = DL. nub (map qualifiedTyConName hits)
582581 in putMsgS $ " fusion-plugin: "
583- ++ getOccString (getName b)
582+ ++ binderDisplayName b
584583 ++ " : found forbidden type classes ["
585584 ++ DL. intercalate " , " names ++ " ]"
586585
@@ -592,7 +591,7 @@ reportInspectedClasses dflags reportMode classAnns allBinds (NonRec b _) =
592591 stale = filter (`notElem` present) allowed
593592 unless (null stale) $
594593 putMsgS $ " fusion-plugin: "
595- ++ getOccString (getName b)
594+ ++ binderDisplayName b
596595 ++ " : redundant PermitTypeClasses entries (safe to remove): ["
597596 ++ DL. intercalate " , " (map qualifiedName stale) ++ " ]"
598597 warnStalePermitted _ _ = return ()
@@ -629,9 +628,9 @@ dumpCoreSize dflags pkgName modName allBinds b = liftIO $ do
629628
630629-- Returns 0 on no violations and 1 otherwise.
631630reportCoreSize
632- :: DynFlags -> ReportMode -> MAX_CORE_SIZE_FM
631+ :: ReportMode -> MAX_CORE_SIZE_FM
633632 -> [(CoreBndr , CoreExpr )] -> CoreBind -> CoreM Int
634- reportCoreSize dflags reportMode sizeAnns allBinds (NonRec b _) =
633+ reportCoreSize reportMode sizeAnns allBinds (NonRec b _) =
635634 case lookupBinderAnn b sizeAnns of
636635 Just ann | not (subsumedBySameName allBinds b) -> go ann
637636 _ -> return 0
@@ -647,21 +646,21 @@ reportCoreSize dflags reportMode sizeAnns allBinds (NonRec b _) =
647646 ReportWarn -> return ()
648647 _ ->
649648 putMsgS $ " fusion-plugin: "
650- ++ showWithUnique dflags b
649+ ++ binderDisplayName b
651650 ++ " : core size "
652651 ++ show terms
653652 ++ " terms (set of " ++ show (length clSet)
654653 ++ " bindings)"
655654 if terms > maxSize
656655 then do
657656 putMsgS $ " fusion-plugin: "
658- ++ showWithUnique dflags b
657+ ++ binderDisplayName b
659658 ++ " : core size (" ++ show terms
660659 ++ " terms) exceeds the specified size ("
661660 ++ show maxSize ++ " terms)."
662661 return 1
663662 else return 0
664- reportCoreSize _ _ _ _ (Rec _) =
663+ reportCoreSize _ _ _ (Rec _) =
665664 error " reportCoreSize: expecting only NonRec binders"
666665
667666-------------------------------------------------------------------------------
@@ -853,7 +852,7 @@ fusionReport mesg reportMode runInspect opts guts = do
853852 dflags reportMode classAnns allBinds bind
854853 else return 0
855854 n3 <- if runInspect
856- then reportCoreSize dflags reportMode sizeAnns allBinds bind
855+ then reportCoreSize reportMode sizeAnns allBinds bind
857856 else return 0
858857 let hasViolationAnn =
859858 isJust (lookupBinderAnn b pmAnns)
0 commit comments