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

Update PrettyPrint.hs

parent 853414b7
Branches patch-1
No related tags found
No related merge requests found
......@@ -126,13 +126,8 @@ 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
[ ppIfCondition c thenDoc
, PrettySection () "else" [] elseDoc
]
where
thenDoc = go thenTree
......
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