[commit: haddock] alexbiehl-patch-1, ghc-8.0, ghc-head, ghc-head1, headdock-library-1.4.5, ie_avails, master, pr-filter-maps, pr/cabal-desc, travis, v2.17, v2.18, wip/new-tree-one-param, wip/rae, wip/remove-frames, wip/remove-frames1, wip/revert-ttg-2017-11-20, wip/ttg-2017-10-13, wip/ttg-2017-10-31, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13: Fix rendering of class methods for Eq and Ord (240bc38)

git at git.haskell.org git at git.haskell.org
Mon Nov 20 21:04:14 UTC 2017


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

On branches: alexbiehl-patch-1,ghc-8.0,ghc-head,ghc-head1,headdock-library-1.4.5,ie_avails,master,pr-filter-maps,pr/cabal-desc,travis,v2.17,v2.18,wip/new-tree-one-param,wip/rae,wip/remove-frames,wip/remove-frames1,wip/revert-ttg-2017-11-20,wip/ttg-2017-10-13,wip/ttg-2017-10-31,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/240bc38b94ed2d0af27333b23392d03eeb615e82

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

commit 240bc38b94ed2d0af27333b23392d03eeb615e82
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Tue Sep 20 19:44:04 2016 +0100

    Fix rendering of class methods for Eq and Ord
    
    See #549 and GHC issue #12519
    
    (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b)


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

240bc38b94ed2d0af27333b23392d03eeb615e82
 haddock-api/src/Haddock/Convert.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 660be72..7de840e 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -82,7 +82,7 @@ tyThingToLHsDecl t = case t of
                         (map (noLoc . getName) l, map (noLoc . getName) r) ) $
                          snd $ classTvsFds cl
          , tcdSigs = noLoc (MinimalSig mempty . noLoc . fmap noLoc $ classMinimalDef cl) :
-                      map (noLoc . synifyIdSig DeleteTopLevelQuantification)
+                      map (noLoc . synifyTcIdSig DeleteTopLevelQuantification)
                         (classMethods cl)
          , tcdMeths = emptyBag --ignore default method definitions, they don't affect signature
          -- class associated-types are a subset of TyCon:
@@ -317,6 +317,8 @@ synifyName = noLoc . getName
 synifyIdSig :: SynifyTypeState -> Id -> Sig Name
 synifyIdSig s i = TypeSig [synifyName i] (synifySigWcType s (varType i))
 
+synifyTcIdSig :: SynifyTypeState -> Id -> Sig Name
+synifyTcIdSig s i = ClassOpSig False [synifyName i] (synifySigType s (varType i))
 
 synifyCtx :: [PredType] -> LHsContext Name
 synifyCtx = noLoc . map (synifyType WithinType)



More information about the ghc-commits mailing list