From 2019beb82f6136b5d02818a0851c2ca085aed330 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Tue, 23 Jan 2018 14:25:03 -0800 Subject: [PATCH] Hide these new declarations --- src/Rendering/TOC.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Rendering/TOC.hs b/src/Rendering/TOC.hs index b9fe1737a..ca8eda987 100644 --- a/src/Rendering/TOC.hs +++ b/src/Rendering/TOC.hs @@ -166,11 +166,12 @@ renderToCDiff blobs = uncurry Summaries . bimap toMap toMap . List.partition isV summaryKey = T.pack $ pathKeyForBlobPair blobs diffTOC :: (HasField fields (Maybe Declaration), HasField fields Span, Foldable f, Functor f) => Diff f (Record fields) (Record fields) -> [TOCSummary] -diffTOC = mapMaybe entrySummary . dedupe . filter removeImports . tableOfContentsBy declaration +diffTOC = mapMaybe entrySummary . dedupe . filter extraDeclarations . tableOfContentsBy declaration where - removeImports :: HasField fields (Maybe Declaration) => Entry (Record fields) -> Bool - removeImports entry = case getDeclaration (entryPayload entry) of + extraDeclarations :: HasField fields (Maybe Declaration) => Entry (Record fields) -> Bool + extraDeclarations entry = case getDeclaration (entryPayload entry) of Just ImportDeclaration{..} -> False + Just CallReference{..} -> False _ -> True renderToCTerm :: (HasField fields (Maybe Declaration), HasField fields Span, Foldable f, Functor f) => Blob -> Term f (Record fields) -> Summaries