[commit: haddock] ghc-head, ghc-head1, 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: Revert "Don't use subMap in attachInstances" (527596c)

git at git.haskell.org git at git.haskell.org
Mon Nov 20 21:11:09 UTC 2017


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

On branches: ghc-head,ghc-head1,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
Link       : http://git.haskell.org/haddock.git/commitdiff/527596cdec687f4dc03b3281a400158be60fe36d

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

commit 527596cdec687f4dc03b3281a400158be60fe36d
Author: Alexander Biehl <abiehl at novomind.com>
Date:   Thu Oct 5 11:27:58 2017 +0200

    Revert "Don't use subMap in attachInstances"
    
    This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9.


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

527596cdec687f4dc03b3281a400158be60fe36d
 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 2231ce7..0e5811b 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
-               , n' <- n : (map fst subDocs ++ patsyn_names)
-               , Just f <- [instLookup instFixMap n' iface ifaceMap instIfaceMap]
+              , Just subs <- [instLookup instSubMap n iface ifaceMap instIfaceMap <|> Just []]
+              , n' <- n : (subs ++ 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