aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/AttachInstances.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2020-04-18 18:37:38 +0100
committerAlan Zimmerman <alan.zimm@gmail.com>2021-03-15 17:15:26 +0000
commit6173eeaa1608a4325ecd005feec05d3ab4e9323f (patch)
treebb95cc5f7bd8ec026df1e94e989ffed83a548ab5 /haddock-api/src/Haddock/Interface/AttachInstances.hs
parentd930bd87cd43d840bf2877e4a51b2a48c2e18f74 (diff)
Match changes in GHC AST for in-tree API Annotations
As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418
Diffstat (limited to 'haddock-api/src/Haddock/Interface/AttachInstances.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/AttachInstances.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index 6bc8b8c8..e8a79b2b 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -30,14 +30,11 @@ import qualified Data.Set as Set
import GHC.Data.FastString (unpackFS)
import GHC.Core.Class
-import GHC.Driver.Session
import GHC.Core (isOrphan)
-import GHC.Utils.Error
import GHC.Core.FamInstEnv
import GHC
import GHC.Core.InstEnv
import GHC.Unit.Module.Env ( ModuleSet, moduleSetElts )
-import GHC.Utils.Monad (liftIO)
import GHC.Types.Name
import GHC.Types.Name.Env
import GHC.Utils.Outputable (text, sep, (<+>))
@@ -104,7 +101,7 @@ attachToExportItem index expInfo getInstDoc getFixity export =
fam_instances = maybeToList mb_instances >>= snd
fam_insts = [ ( synFamInst
, getInstDoc n
- , spanNameE n synFamInst (L eSpan (tcdName d))
+ , spanNameE n synFamInst (L (locA eSpan) (tcdName d))
, nameModule_maybe n
)
| i <- sortBy (comparing instFam) fam_instances
@@ -116,7 +113,7 @@ attachToExportItem index expInfo getInstDoc getFixity export =
]
cls_insts = [ ( synClsInst
, getInstDoc n
- , spanName n synClsInst (L eSpan (tcdName d))
+ , spanName n synClsInst (L (locA eSpan) (tcdName d))
, nameModule_maybe n
)
| let is = [ (instanceSig i, getName i) | i <- cls_instances ]