diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-03-23 08:32:31 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-03-29 16:17:31 -0400 |
commit | 824903442865c50977a67790b07acee5909af8b3 (patch) | |
tree | 2b7c92ae7f8038a657d9e31f714e492aeff093c2 /compiler/GHC.hs | |
parent | 0917bd86c72a30548cdbc875f800bd6a05b091f4 (diff) | |
download | haskell-824903442865c50977a67790b07acee5909af8b3.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.
(cherry picked from commit c64c119d08531049acb33dba4afb7d0dfef57981)
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r-- | compiler/GHC.hs | 12 |
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 |