diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-10-21 17:39:41 +0530 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-10-21 17:58:34 +0530 |
commit | 95b25a0fa66cb7eda4bc54ba3cce3d9fc73c8262 (patch) | |
tree | c3b26ba54590cd6f4c666fa2f0592b39faa2b3bb /compiler/GHC/Unit/Module | |
parent | 1c4078db07df370e5ba48268c980e3ff5145e111 (diff) | |
download | haskell-wip/backpack-errs.tar.gz |
Rename `ms_hspp_file` to `ms_hspp_file_loc` and change itswip/backpack-errs
type to a `RealSrcLoc` to accomodate backpack
Diffstat (limited to 'compiler/GHC/Unit/Module')
-rw-r--r-- | compiler/GHC/Unit/Module/ModSummary.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/GHC/Unit/Module/ModSummary.hs b/compiler/GHC/Unit/Module/ModSummary.hs index 9d6199f632..cb0e0760f4 100644 --- a/compiler/GHC/Unit/Module/ModSummary.hs +++ b/compiler/GHC/Unit/Module/ModSummary.hs @@ -5,7 +5,6 @@ -- (ModuleGraph) module GHC.Unit.Module.ModSummary ( ExtendedModSummary (..) - , PreprocessedFile(..) , extendModSummaryNoDeps , ModSummary (..) , ms_unitid @@ -97,8 +96,10 @@ data ModSummary ms_parsed_mod :: Maybe HsParsedModule, -- ^ The parsed, nonrenamed source, if we have it. This is also -- used to support "inline module syntax" in Backpack files. - ms_hspp_file :: PreprocessedFile, - -- ^ Filename of preprocessed source file + ms_hspp_file_loc :: RealSrcLoc, + -- ^ Filename of preprocessed source file with the location + -- The location doesn't always start at line 1, column 1, for + -- example for backpack ms_hspp_opts :: DynFlags, -- ^ Cached flags from @OPTIONS@, @INCLUDE@ and @LANGUAGE@ -- pragmas in the modules source code @@ -106,10 +107,6 @@ data ModSummary -- ^ The actual preprocessed source, if we have it } -data PreprocessedFile - = PreprocessedFile FilePath -- ^ This is a regular haskell file that has been preprocessed - | BackpackFile RealSrcLoc -- ^ There is no preprocessed source since we are instantiating a backpack signature at this location - ms_unitid :: ModSummary -> UnitId ms_unitid = toUnitId . moduleUnit . ms_mod |