From 7d06f667278dde53285b1abc72701f11f0cccd6f Mon Sep 17 00:00:00 2001 From: Isaac Dupree Date: Sun, 23 Aug 2009 07:26:05 +0000 Subject: cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! --- src/Haddock/Interface/Create.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/Haddock/Interface') diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index d919ab4b..65028a9f 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -509,15 +509,14 @@ mkExportItems modMap this_mod gre exported_names decls declMap let hsdecl = tyThingToHsSynSig tyThing return [ mkExportDecl t ( hsdecl - , (fmap (fmapHsDoc getName) $ - Map.lookup t (instDocMap iface), Map.empty{-todo-}) + , fromMaybe noDocForDecl $ + Map.lookup t (instDocMap iface) , map (\subt -> - ( subt - , (fmap (fmapHsDoc getName) $ - Map.lookup subt (instDocMap iface), Map.empty{-todo-}) + ( subt , + fromMaybe noDocForDecl $ + Map.lookup subt (instDocMap iface) ) - ) - subs + ) subs )] mkExportDecl :: Name -> DeclInfo -> ExportItem Name -- cgit v1.2.3