diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-10-28 19:05:51 +0100 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2021-11-02 21:39:32 +0000 |
commit | 39eed84c2188b15ed312b4468f1a44c6a49fb268 (patch) | |
tree | 0db2b8b53a33d4f61c273504b5665ba333474476 /compiler/GHC/Tc/TyCl.hs | |
parent | a7e1be3d84d2b7d0515f909175cdfa5dcf0dc55c (diff) | |
download | haskell-39eed84c2188b15ed312b4468f1a44c6a49fb268.tar.gz |
EPA: Get rid of bare SrcSpan's in the ParsedSource
The ghc-exactPrint library has had to re-introduce the relatavise
phase.
This is needed if you change the length of an identifier and want the
layout to be preserved afterwards.
It is not possible to relatavise a bare SrcSpan, so introduce `SrcAnn
NoEpAnns` for them instead.
Updates haddock submodule.
Diffstat (limited to 'compiler/GHC/Tc/TyCl.hs')
-rw-r--r-- | compiler/GHC/Tc/TyCl.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index dc12ac0735..5dfa4cec86 100644 --- a/compiler/GHC/Tc/TyCl.hs +++ b/compiler/GHC/Tc/TyCl.hs @@ -2822,7 +2822,7 @@ tcInjectivity _ Nothing -- But this does not seem to be useful in any way so we don't do it. (Another -- reason is that the implementation would not be straightforward.) tcInjectivity tcbs (Just (L loc (InjectivityAnn _ _ lInjNames))) - = setSrcSpan loc $ + = setSrcSpanA loc $ do { let tvs = binderVars tcbs ; dflags <- getDynFlags ; checkTc (xopt LangExt.TypeFamilyDependencies dflags) @@ -4964,7 +4964,7 @@ checkValidRoleAnnots role_annots tc check_no_roles = whenIsJust role_annot_decl_maybe illegalRoleAnnotDecl -checkRoleAnnot :: TyVar -> Located (Maybe Role) -> Role -> TcM () +checkRoleAnnot :: TyVar -> LocatedAn NoEpAnns (Maybe Role) -> Role -> TcM () checkRoleAnnot _ (L _ Nothing) _ = return () checkRoleAnnot tv (L _ (Just r1)) r2 = when (r1 /= r2) $ |