From 5cc26fcc342856a33239ab6eb751a6c62f4e81b7 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Thu, 13 Oct 2016 16:42:49 -0500 Subject: [PATCH] Remove BranchInfo for If Syntaxes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although this allowed us to report a list of summary statements for each if / else-if condition, we don’t append parent contexts to Patches. Because we lose that parent context, it makes replacement summary statements devoid of context. Taking a step back, @joshvera and I decided to leave if summary statements as they are now, but revisit this when we explore rollups. Although diff summary statements do not include else-if clauses now in Syntax If accurately. So we have the info, but as it stands, a long list of summary statements for each else-if clause we determined to be less helpful, but will set us up for success when we add rollups. --- src/DiffSummary.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DiffSummary.hs b/src/DiffSummary.hs index c06104742..2e1b54742 100644 --- a/src/DiffSummary.hs +++ b/src/DiffSummary.hs @@ -242,7 +242,6 @@ termToDiffInfo blob term = case unwrap term of S.Fixed children -> BranchInfo (termToDiffInfo' <$> children) (toCategoryName term) BFixed S.AnonymousFunction _ _ -> LeafInfo "anonymous function" (toTermName' term) (getField $ extract term) Commented cs leaf -> BranchInfo (termToDiffInfo' <$> cs <> maybeToList leaf) (toCategoryName term) BCommented - S.If _ _ elseIfs -> BranchInfo ([toLeafInfo term] <> (termToDiffInfo' <$> elseIfs)) (toCategoryName term) BIf S.Error _ -> ErrorInfo (getField $ extract term) (toTermName' term) _ -> toLeafInfo term where toTermName' = toTermName blob