diff options
| author | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2009-08-23 07:26:05 +0000 | 
|---|---|---|
| committer | Isaac Dupree <id@isaac.cedarswampstudios.org> | 2009-08-23 07:26:05 +0000 | 
| commit | 7d06f667278dde53285b1abc72701f11f0cccd6f (patch) | |
| tree | 130a6ec2a06b925b995866b07596753a10d6343a /src/Haddock/Interface | |
| parent | 3a51468aabab2a3f4b9e06e7e0025f2421e07469 (diff) | |
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!
Diffstat (limited to 'src/Haddock/Interface')
| -rw-r--r-- | src/Haddock/Interface/Create.hs | 13 | 
1 files changed, 6 insertions, 7 deletions
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  | 
