From b888192534c7c070647755f1778fa5a55002d87f Mon Sep 17 00:00:00 2001
From: David Waern <david.waern@gmail.com>
Date: Sun, 13 Jul 2008 13:51:54 +0000
Subject: Small touches

---
 src/Haddock/Interface/Create.hs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/Haddock')

diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 8bbc5341..24def155 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -54,7 +54,7 @@ createInterface ghcMod flags modMap = do
       localNames    = ghcDefinedNames ghcMod
       subMap        = mkSubMap group
       decls         = topDecls group
-      declMap       = mkDeclMap' decls
+      declMap       = mkDeclMap decls
       ignoreExps    = Flag_IgnoreAllExports `elem` flags
       exportedNames = ghcExportedNames ghcMod
       origEnv       = Map.fromList [ (nameOccName n, n) | n <- exportedNames ]
@@ -130,9 +130,9 @@ parseOption other = tell ["Unrecognised option: " ++ other] >> return Nothing
 -- documentation declarations.
 -- Subordinate names are mapped to the parent declaration, but with the doc
 -- for the subordinate declaration.
-mkDeclMap' decls = Map.fromList [ (n, (L loc d, doc)) | (L loc d, doc) <- decls 
-                                , (n, doc) <- (declName d, doc) : subordinates d
-                                , notDocOrInstance d ]
+mkDeclMap decls = Map.fromList [ (n, (L loc d, doc)) | (L loc d, doc) <- decls 
+                               , (n, doc) <- (declName d, doc) : subordinates d
+                               , notDocOrInstance d ]
 
 
 notDocOrInstance (InstD _) = False
@@ -177,7 +177,6 @@ declsFromClass class_ = docs ++ defs ++ sigs ++ ats
     ats  = decls tcdATs TyClD class_
 
 
-declName :: HsDecl Name -> Name
 declName (TyClD d) = tcdName d
 declName (ForD (ForeignImport n _ _)) = unLoc n
 -- we have normal sigs only (since they are taken from ValBindsOut)
-- 
cgit v1.2.3