Skip to content

Commit 63331c9

Browse files
authored
Merge pull request #6188 from sgraf812/patch-1
Remove dead code
2 parents 3042371 + cb8b7d7 commit 63331c9

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Cabal/Distribution/PackageDescription/PrettyPrint.hs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,10 @@ ppCondTree2 v grammar = go
126126
thenDoc = go thenTree
127127

128128
ppIf (CondBranch c thenTree (Just elseTree)) =
129-
case (False, False) of
130-
-- case (isEmpty thenDoc, isEmpty elseDoc) of
131-
(True, True) -> mempty
132-
(False, True) -> [ ppIfCondition c thenDoc ]
133-
(True, False) -> [ ppIfCondition (cNot c) elseDoc ]
134-
(False, False) -> [ ppIfCondition c thenDoc
135-
, PrettySection () "else" [] elseDoc
136-
]
137-
where
138-
thenDoc = go thenTree
139-
elseDoc = go elseTree
129+
-- See #6193
130+
[ ppIfCondition c (go thenTree)
131+
, PrettySection () "else" [] (go elseTree)
132+
]
140133

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

0 commit comments

Comments
 (0)