fix bug in match result display simplifier
authorJoey Hess <joeyh@joeyh.name>
Wed, 26 Jul 2023 19:07:29 +0000 (15:07 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 26 Jul 2023 19:28:49 +0000 (15:28 -0400)
Sponsored-by: Dartmouth College's DANDI project
Utility/Matcher.hs

index ac9df58e2bb201607b2a309c4996739d901d84ed..23dec0c22f79f66bcbdf3463d7ddfe6807718eaf 100644 (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) =