diff options
author | Ćukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-07-21 14:44:22 +0200 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-08-21 18:22:31 +0100 |
commit | 42d49d550642aa58696af91bb250487ac42e9095 (patch) | |
tree | ad864149c293af4801a723909233441061ae1fe9 | |
parent | 59d809746c08e3e3e506da5eeaaaed9d04407743 (diff) |
Attach source locations to the specialized class methods.
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 4862945a..67405915 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -223,14 +223,13 @@ ppTyName :: Name -> Html ppTyName = ppName Prefix -ppSimpleSig :: LinksInfo -> Splice -> Unicode -> Qualification +ppSimpleSig :: LinksInfo -> Splice -> Unicode -> Qualification -> SrcSpan -> [DocName] -> HsType DocName -> Html -ppSimpleSig links splice unicode qual names typ = +ppSimpleSig links splice unicode qual loc names typ = topDeclElem' names $ ppTypeSig True occNames ppTyp unicode where - -- TODO: Use *helpful* source span. - topDeclElem' = topDeclElem links (UnhelpfulSpan undefined) splice + topDeclElem' = topDeclElem links loc splice ppTyp = ppType unicode qual typ occNames = map getOccName names @@ -551,10 +550,10 @@ ppInstanceSigs :: LinksInfo -> Splice -> Unicode -> Qualification -> InstSpec DocName -> InstHead DocName -> [Html] ppInstanceSigs links splice unicode qual (InstSpec {..}) (InstHead {..}) = do - TypeSig lnames (L sspan typ) _ <- ispecSigs + TypeSig lnames (L loc typ) _ <- ispecSigs let names = map unLoc lnames let typ' = rename' . sugar $ specializeTyVarBndrs ispecTyVars ihdTypes typ - return $ ppSimpleSig links splice unicode qual names typ' + return $ ppSimpleSig links splice unicode qual loc names typ' where fv = foldr Set.union Set.empty . map freeVariables $ ihdTypes rename' = rename fv |