diff --git a/src-exe/cabal-plan.hs b/src-exe/cabal-plan.hs index fe8b46e..39fbf90 100644 --- a/src-exe/cabal-plan.hs +++ b/src-exe/cabal-plan.hs @@ -602,32 +602,29 @@ dumpTred patterns plan = case reductionClosureAM plan of -> DotUnitId -> StateT (Set DotUnitId) CWriter () go2 lvl duid@(DU uid comp) = do - if False - then return () - else do - seen <- gets (S.member duid) - modify' (S.insert duid) + seen <- gets (S.member duid) + modify' (S.insert duid) - let unit = M.findWithDefault (error "non-existing UnitId") uid pm - let pid = uPId unit + let unit = M.findWithDefault (error "non-existing UnitId") uid pm + let pid = uPId unit - let emphasise' - | uType unit == UnitTypeLocal = underline - | uid `S.member` directDepsOfLocalPackages = emphasise - | otherwise = id + let emphasise' + | uType unit == UnitTypeLocal = underline + | uid `S.member` directDepsOfLocalPackages = emphasise + | otherwise = id - let pid_label = emphasise' $ ccol comp (prettyCompTy pid comp) + let pid_label = emphasise' $ ccol comp (prettyCompTy pid comp) - if seen - then putCTextLn $ linepfx lvl <> pid_label <> fromT Rest - else do - let deps' = M.findWithDefault S.empty duid am - let deps = S.filter showUnit' deps' + if seen + then putCTextLn $ linepfx lvl <> pid_label <> fromT Rest + else do + let deps' = M.findWithDefault S.empty duid am + let deps = S.filter showUnit' deps' - putCTextLn $ linepfx lvl <> pid_label + putCTextLn $ linepfx lvl <> pid_label - for_ (lastAnn $ S.toList deps) $ \(l, depDuid) -> - go2 (lvl ++ [(comp, not l)]) depDuid + for_ (lastAnn $ S.toList deps) $ \(l, depDuid) -> + go2 (lvl ++ [(comp, not l)]) depDuid ccol :: Maybe CompName -> CText -> CText ccol Nothing = recolorify White