[commit: haddock] ghc-head, ghc-head1, wip/T14529, wip/revert-ttg-2017-11-20, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13, wip/ttg6-unrevert-2017-11-22: Don't use subMap in attachInstances (3adf5bc)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:55:07 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: ghc-head,ghc-head1,wip/T14529,wip/revert-ttg-2017-11-20,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13,wip/ttg6-unrevert-2017-11-22
Link       : http://git.haskell.org/haddock.git/commitdiff/3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9

>---------------------------------------------------------------

commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9
Author: Alexander Biehl <abiehl at novomind.com>
Date:   Thu Oct 5 11:27:05 2017 +0200

    Don't use subMap in attachInstances


>---------------------------------------------------------------

3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9
 haddock-api/src/Haddock/Interface/AttachInstances.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index 0e5811b..2231ce7 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -118,12 +118,12 @@ attachToExportItem index expInfo iface ifaceMap instIfaceMap export =
   where
     attachFixities e at ExportDecl{ expItemDecl = L _ d
                                , expItemPats = patsyns
+                               , expItemSubDocs = subDocs
                                } = e { expItemFixities =
       nubByName fst $ expItemFixities e ++
       [ (n',f) | n <- getMainDeclBinder d
-              , Just subs <- [instLookup instSubMap n iface ifaceMap instIfaceMap <|> Just []]
-              , n' <- n : (subs ++ patsyn_names)
-              , Just f <- [instLookup instFixMap n' iface ifaceMap instIfaceMap]
+               , n' <- n : (map fst subDocs ++ patsyn_names)
+               , Just f <- [instLookup instFixMap n' iface ifaceMap instIfaceMap]
       ] }
       where
         patsyn_names = concatMap (getMainDeclBinder . fst) patsyns



More information about the ghc-commits mailing list