diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2020-01-26 00:19:37 +0300 |
---|---|---|
committer | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2020-02-28 15:53:52 +0300 |
commit | b104c573fdc6efcecc3bfaa2fb6084b7679f32da (patch) | |
tree | 2e81f4ec519b0c60cf325a5a980395d4c6545afc /haddock-api/src/Haddock/Interface/Create.hs | |
parent | 78d0e033a2f8ce5dc1f5e2e4eb8b823ee4d1d1bf (diff) |
Ignore the BufLoc/BufSpan added in GHC's !2516
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Create.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 94443856..977fc9ca 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -377,7 +377,7 @@ mkMaps dflags pkgName gre instances decls = do , [(Name, Map Int (MDoc Name))] , [(Name, [LHsDecl GhcRn])] ) - mappings (ldecl@(L (RealSrcSpan l) decl), docStrs) = do + mappings (ldecl@(L (RealSrcSpan l _) decl), docStrs) = do let declDoc :: [HsDocString] -> Map Int HsDocString -> ErrMsgM (Maybe (MDoc Name), Map Int (MDoc Name)) declDoc strs m = do @@ -409,7 +409,7 @@ mkMaps dflags pkgName gre instances decls = do mappings (L (UnhelpfulSpan _) _, _) = pure ([], [], []) instanceMap :: Map RealSrcSpan Name - instanceMap = M.fromList [(l, n) | n <- instances, RealSrcSpan l <- [getSrcSpan n] ] + instanceMap = M.fromList [(l, n) | n <- instances, RealSrcSpan l _ <- [getSrcSpan n] ] names :: RealSrcSpan -> HsDecl GhcRn -> [Name] names _ (InstD _ d) = maybeToList (SrcLoc.lookupSrcSpan loc instanceMap) -- See note [2]. |