Skip to content
Snippets Groups Projects
Commit cb8b7d7a authored by Sebastian Graf's avatar Sebastian Graf
Browse files

Remove dead code

This would trip up the improved pattern match checker from [!963](ghc/ghc!963).

The removed code is related to maintaining the round-trip property, so
should be re-introduced at some point. This is tracked in #6193.
parent 853414b7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment