fix bug in match result display simplifier

Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
Joey Hess 2023-07-26 15:07:29 -04:00
parent 518a51a8a0
commit 70de4a7e6d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -234,7 +234,7 @@ describeMatchResult descop l prefix = Just $
-- Remove unncessary outermost parens
simplify True (MatchedOpen:rest) = case lastMaybe rest of
Just MatchedClose -> simplify True (dropFromEnd 1 rest)
Just MatchedClose -> simplify False (dropFromEnd 1 rest)
_ -> simplify False rest
-- (foo or bar) or baz => foo or bar or baz
simplify _ (MatchedOpen:o1@(MatchedOperation {}):MatchedOr:o2@(MatchedOperation {}):MatchedClose:MatchedOr:rest) =