summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-10-23 10:49:55 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-24 01:27:21 -0400
commit691c450f1e9cc3fd83b662be3c0134fde03e97db (patch)
treedff88e789b1af701542301d7303559b3585856e2 /compiler/GHC/Tc
parent3bab222c585343f8febe2a627d280b7be9401e92 (diff)
downloadhaskell-691c450f1e9cc3fd83b662be3c0134fde03e97db.tar.gz
EPA: Use LocatedA for ModuleName
This allows us to use an Anchor with a DeltaPos in it when exact printing.
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r--compiler/GHC/Tc/Module.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index 2c425e6eda..cb71508227 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -223,7 +223,7 @@ tcRnModule hsc_env mod_sum save_rn_syntax
pair :: (Module, SrcSpan)
pair@(this_mod,_)
| Just (L mod_loc mod) <- hsmodName this_module
- = (mkHomeModule home_unit mod, mod_loc)
+ = (mkHomeModule home_unit mod, locA mod_loc)
| otherwise -- 'module M where' is omitted
= (mkHomeModule home_unit mAIN_NAME, srcLocSpan (srcSpanStart loc))
@@ -271,7 +271,7 @@ tcRnModuleTcRnM hsc_env mod_sum
; -- TODO This is a little skeevy; maybe handle a bit more directly
let { simplifyImport (L _ idecl) =
( renameRawPkgQual (hsc_unit_env hsc_env) (ideclPkgQual idecl)
- , ideclName idecl)
+ , reLoc $ ideclName idecl)
}
; raw_sig_imports <- liftIO
$ findExtraSigImports hsc_env hsc_src