Skip to content
Snippets Groups Projects
Commit b349fd1b authored by Alan Zimmerman's avatar Alan Zimmerman Committed by Marge Bot
Browse files

EPA: Remove some unused functions

parent 1d7cd7fe
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,6 @@ module GHC.Parser.Annotation ( ...@@ -66,7 +66,6 @@ module GHC.Parser.Annotation (
srcSpan2e, realSrcSpan, srcSpan2e, realSrcSpan,
-- ** Building up annotations -- ** Building up annotations
reAnnL, reAnnC,
addAnnsA, widenSpanL, widenSpanT, widenAnchorT, widenAnchorS, addAnnsA, widenSpanL, widenSpanT, widenAnchorT, widenAnchorS,
widenLocatedAnL, widenLocatedAnL,
listLocation, listLocation,
...@@ -94,7 +93,6 @@ module GHC.Parser.Annotation ( ...@@ -94,7 +93,6 @@ module GHC.Parser.Annotation (
noComments, comment, addCommentsToEpAnn, setCommentsEpAnn, noComments, comment, addCommentsToEpAnn, setCommentsEpAnn,
transferAnnsA, transferAnnsOnlyA, transferCommentsOnlyA, transferAnnsA, transferAnnsOnlyA, transferCommentsOnlyA,
transferPriorCommentsA, transferFollowingA, transferPriorCommentsA, transferFollowingA,
commentsOnlyA, removeCommentsA,
placeholderRealSpan, placeholderRealSpan,
) where ) where
...@@ -929,12 +927,6 @@ srcSpan2e :: SrcSpan -> EpaLocation ...@@ -929,12 +927,6 @@ srcSpan2e :: SrcSpan -> EpaLocation
srcSpan2e ss@(RealSrcSpan _ _) = EpaSpan ss srcSpan2e ss@(RealSrcSpan _ _) = EpaSpan ss
srcSpan2e span = EpaSpan (RealSrcSpan (realSrcSpan span) Strict.Nothing) srcSpan2e span = EpaSpan (RealSrcSpan (realSrcSpan span) Strict.Nothing)
reAnnC :: AnnContext -> EpAnnComments -> Located a -> LocatedC a
reAnnC anns cs (L l a) = L (EpAnn (spanAsAnchor l) anns cs) a
reAnnL :: ann -> EpAnnComments -> Located e -> GenLocated (EpAnn ann) e
reAnnL anns cs (L l a) = L (EpAnn (spanAsAnchor l) anns cs) a
getLocAnn :: Located a -> SrcSpanAnnA getLocAnn :: Located a -> SrcSpanAnnA
getLocAnn (L l _) = noAnnSrcSpan l getLocAnn (L l _) = noAnnSrcSpan l
...@@ -1094,16 +1086,6 @@ transferPriorCommentsA (EpAnn a1 an1 cs1) (EpAnn a2 an2 cs2) ...@@ -1094,16 +1086,6 @@ transferPriorCommentsA (EpAnn a1 an1 cs1) (EpAnn a2 an2 cs2)
cs1' = setFollowingComments emptyComments fc cs1' = setFollowingComments emptyComments fc
cs2' = setPriorComments cs2 (priorComments cs2 <> pc) cs2' = setPriorComments cs2 (priorComments cs2 <> pc)
-- | Remove the exact print annotations payload, leaving only the
-- anchor and comments.
commentsOnlyA :: NoAnn ann => EpAnn ann -> EpAnn ann
commentsOnlyA (EpAnn a _ cs) = EpAnn a noAnn cs
-- | Remove the comments, leaving the exact print annotations payload
removeCommentsA :: EpAnn ann -> EpAnn ann
removeCommentsA (EpAnn a an _) = EpAnn a an emptyComments
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Semigroup instances, to allow easy combination of annotation elements -- Semigroup instances, to allow easy combination of annotation elements
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment