summaryrefslogtreecommitdiff
path: root/compiler/GHC.hs
diff options
context:
space:
mode:
authorGHC GitLab CI <ghc-ci@gitlab-haskell.org>2021-03-23 08:32:31 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-25 04:53:16 -0400
commit1350a5cd730f1cbbe306b849def26bfcd119c103 (patch)
tree45c8b4ef2cd4b09d6f9a24da905a1be5ff5ee616 /compiler/GHC.hs
parent0029df2bd52aa7f93e2254a369428e4261e5d3ae (diff)
downloadhaskell-1350a5cd730f1cbbe306b849def26bfcd119c103.tar.gz
EPA : Remove ApiAnn from ParsedModule
All the comments are now captured in the AST, there is no need for a side-channel structure for them.
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r--compiler/GHC.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index 7a237b2146..0c55bfbea1 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -283,7 +283,7 @@ module GHC (
parser,
-- * API Annotations
- ApiAnns(..),AnnKeywordId(..),AnnotationComment(..),
+ AnnKeywordId(..),AnnotationComment(..),
-- * Miscellaneous
--sessionHscEnv,
@@ -1021,9 +1021,7 @@ class TypecheckedMod m => DesugaredMod m where
data ParsedModule =
ParsedModule { pm_mod_summary :: ModSummary
, pm_parsed_source :: ParsedSource
- , pm_extra_src_files :: [FilePath]
- , pm_annotations :: ApiAnns }
- -- See Note [Api annotations] in GHC.Parser.Annotation
+ , pm_extra_src_files :: [FilePath] }
instance ParsedMod ParsedModule where
modSummary m = pm_mod_summary m
@@ -1115,8 +1113,7 @@ parseModule ms = do
hsc_env <- getSession
let hsc_env_tmp = hsc_env { hsc_dflags = ms_hspp_opts ms }
hpm <- liftIO $ hscParse hsc_env_tmp ms
- return (ParsedModule ms (hpm_module hpm) (hpm_src_files hpm)
- (hpm_annotations hpm))
+ return (ParsedModule ms (hpm_module hpm) (hpm_src_files hpm))
-- See Note [Api annotations] in GHC.Parser.Annotation
-- | Typecheck and rename a parsed module.
@@ -1130,8 +1127,7 @@ typecheckModule pmod = do
(tc_gbl_env, rn_info)
<- liftIO $ hscTypecheckRename hsc_env_tmp ms $
HsParsedModule { hpm_module = parsedSource pmod,
- hpm_src_files = pm_extra_src_files pmod,
- hpm_annotations = pm_annotations pmod }
+ hpm_src_files = pm_extra_src_files pmod }
details <- liftIO $ makeSimpleDetails hsc_env_tmp tc_gbl_env
safe <- liftIO $ finalSafeMode (ms_hspp_opts ms) tc_gbl_env