From 730d8b0e76c5e637f2cdd7d980865f6208729366 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Wed, 29 Jul 2015 18:43:39 +0200 Subject: Create helper method for specializing type signatures. --- haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Decl.hs') diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 294af864..7255bf42 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -31,7 +31,6 @@ import Haddock.Doc (combineDocumentation) import Data.List ( intersperse, sort ) import qualified Data.Map as Map -import qualified Data.Set as Set import Data.Maybe import Text.XHtml hiding ( name, title, p, quote ) @@ -601,13 +600,9 @@ ppInstanceSigs :: LinksInfo -> Splice -> Unicode -> Qualification -> LHsTyVarBndrs DocName -> [HsType DocName] -> [Sig DocName] -> [Html] ppInstanceSigs links splice unicode qual bndrs tys sigs = do - TypeSig lnames (L loc typ) _ <- sigs + TypeSig lnames (L loc typ) _ <- map (specializeSig bndrs tys) sigs let names = map unLoc lnames - let typ' = rename' . sugar $ specializeTyVarBndrs bndrs tys typ - return $ ppSimpleSig links splice unicode qual loc names typ' - where - fv = foldr Set.union Set.empty . map freeVariables $ tys - rename' = rename fv + return $ ppSimpleSig links splice unicode qual loc names typ lookupAnySubdoc :: Eq id1 => id1 -> [(id1, DocForDecl id2)] -> DocForDecl id2 -- cgit v1.2.3