Skip to content

Commit

Permalink
Merge pull request #6188 from sgraf812/patch-1
Browse files Browse the repository at this point in the history
Remove dead code
  • Loading branch information
phadej authored Sep 8, 2019
2 parents 3042371 + cb8b7d7 commit 63331c9
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Cabal/Distribution/PackageDescription/PrettyPrint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,10 @@ ppCondTree2 v grammar = go
thenDoc = go thenTree

ppIf (CondBranch c thenTree (Just elseTree)) =
case (False, False) of
-- case (isEmpty thenDoc, isEmpty elseDoc) of
(True, True) -> mempty
(False, True) -> [ ppIfCondition c thenDoc ]
(True, False) -> [ ppIfCondition (cNot c) elseDoc ]
(False, False) -> [ ppIfCondition c thenDoc
, PrettySection () "else" [] elseDoc
]
where
thenDoc = go thenTree
elseDoc = go elseTree
-- See #6193
[ ppIfCondition c (go thenTree)
, PrettySection () "else" [] (go elseTree)
]

ppCondLibrary :: CabalSpecVersion -> Maybe (CondTree ConfVar [Dependency] Library) -> [PrettyField ()]
ppCondLibrary _ Nothing = mempty
Expand Down

0 comments on commit 63331c9

Please sign in to comment.