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