diff options
author | alexbiehl <alex.biehl@gmail.com> | 2018-02-09 18:44:23 +0100 |
---|---|---|
committer | alexbiehl <alex.biehl@gmail.com> | 2018-02-09 18:44:23 +0100 |
commit | 4b4733a05c7bf35d98ed82f2a62d4771db1fb788 (patch) | |
tree | 7963c779c76aa1aa4204ad33ca8fa732f6a81040 /haddock-api | |
parent | e870c70cdbe739693c1eacddc42e64106c8ecfdf (diff) |
Expand SigD in a better place
In https://github.com/haskell/haddock/issues/287 we found that
haddock-2.19.0 would miss documentation on class methods with
multiples names.
This patch uses expandSigDecls in a more sensible place.
Diffstat (limited to 'haddock-api')
-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 7f0594e0..75e7e9a1 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -391,7 +391,7 @@ mkMaps dflags gre instances decls = do subNs = [ n | (n, _, _) <- subs ] dm = [ (n, d) | (n, Just d) <- zip ns (repeat doc) ++ zip subNs subDocs ] am = [ (n, args) | n <- ns ] ++ zip subNs subArgs - cm = [ (n, [ldecl]) | n <- ns ++ subNs ] + cm = [ (n, expandSigDecls [ldecl]) | n <- ns ++ subNs ] seqList ns `seq` seqList subNs `seq` @@ -498,7 +498,7 @@ classDecls class_ = filterDecls . collectDocs . sortByLoc $ decls -- ordered by source location, with documentation attached if it exists. topDecls :: HsGroup GhcRn -> [(LHsDecl GhcRn, [HsDocString])] topDecls = - filterClasses . filterDecls . collectDocs . sortByLoc . expandSigDecls . ungroup + filterClasses . filterDecls . collectDocs . sortByLoc . ungroup -- | Extract a map of fixity declarations only mkFixMap :: HsGroup GhcRn -> FixMap |