diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-03-25 21:24:27 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-31 11:13:28 -0400 |
commit | 0fe5175ac537c0ce2afe969ec82a0d1c73a4ae38 (patch) | |
tree | da9e816a7d18be58e795b3c9dd07b87106ab82fc /compiler/GHC/Parser/Lexer.x | |
parent | 2fcebb72d97edd1e630002bef89bc6982529e36f (diff) | |
download | haskell-0fe5175ac537c0ce2afe969ec82a0d1c73a4ae38.tar.gz |
EPA : Rename ApiAnn to EPAnn
Follow-up from !2418, see #19579
Updates haddock submodule
Diffstat (limited to 'compiler/GHC/Parser/Lexer.x')
-rw-r--r-- | compiler/GHC/Parser/Lexer.x | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x index 8eea1aea62..125e6aaaf6 100644 --- a/compiler/GHC/Parser/Lexer.x +++ b/compiler/GHC/Parser/Lexer.x @@ -65,7 +65,7 @@ module GHC.Parser.Lexer ( ExtBits(..), xtest, xunset, xset, lexTokenStream, - mkParensApiAnn, + mkParensEpAnn, getCommentsFor, getPriorCommentsFor, getFinalCommentsFor, getEofPos, commentToAnnotation, @@ -2892,13 +2892,13 @@ class Monad m => MonadP m where getBit :: ExtBits -> m Bool -- | Go through the @comment_q@ in @PState@ and remove all comments -- that belong within the given span - allocateCommentsP :: RealSrcSpan -> m ApiAnnComments + allocateCommentsP :: RealSrcSpan -> m EpAnnComments -- | Go through the @comment_q@ in @PState@ and remove all comments -- that come before or within the given span - allocatePriorCommentsP :: RealSrcSpan -> m ApiAnnComments + allocatePriorCommentsP :: RealSrcSpan -> m EpAnnComments -- | Go through the @comment_q@ in @PState@ and remove all comments -- that come after the given span - allocateFinalCommentsP :: RealSrcSpan -> m ApiAnnComments + allocateFinalCommentsP :: RealSrcSpan -> m EpAnnComments instance MonadP P where addError err @@ -2934,15 +2934,15 @@ instance MonadP P where comment_q = comment_q' } (AnnCommentsBalanced (fromMaybe [] header_comments') (reverse newAnns)) -getCommentsFor :: (MonadP m) => SrcSpan -> m ApiAnnComments +getCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments getCommentsFor (RealSrcSpan l _) = allocateCommentsP l getCommentsFor _ = return noCom -getPriorCommentsFor :: (MonadP m) => SrcSpan -> m ApiAnnComments +getPriorCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments getPriorCommentsFor (RealSrcSpan l _) = allocatePriorCommentsP l getPriorCommentsFor _ = return noCom -getFinalCommentsFor :: (MonadP m) => SrcSpan -> m ApiAnnComments +getFinalCommentsFor :: (MonadP m) => SrcSpan -> m EpAnnComments getFinalCommentsFor (RealSrcSpan l _) = allocateFinalCommentsP l getFinalCommentsFor _ = return noCom @@ -3437,9 +3437,9 @@ clean_pragma prag = canon_ws (map toLower (unprefix prag)) -- |Given a 'SrcSpan' that surrounds a 'HsPar' or 'HsParTy', generate -- 'AddEpAnn' values for the opening and closing bordering on the start -- and end of the span -mkParensApiAnn :: SrcSpan -> [AddEpAnn] -mkParensApiAnn (UnhelpfulSpan _) = [] -mkParensApiAnn (RealSrcSpan ss _) = [AddEpAnn AnnOpenP (AR lo),AddEpAnn AnnCloseP (AR lc)] +mkParensEpAnn :: SrcSpan -> [AddEpAnn] +mkParensEpAnn (UnhelpfulSpan _) = [] +mkParensEpAnn (RealSrcSpan ss _) = [AddEpAnn AnnOpenP (AR lo),AddEpAnn AnnCloseP (AR lc)] where f = srcSpanFile ss sl = srcSpanStartLine ss |