| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
Silly, but nice with some consistency :-)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This fixes the missing docs problem. The Eq and Ord instances for Name uses the
unique number in Name. This number is created at deserialization time by GHC's
magic Binary instance for Name, and it is random. Thus, fromAscList can't be used
at deserialization time, even though toAscList was used at serialization time.
|
|
|
|
| |
Word32 instead of Int for FastString and Name offsets
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
| |
We require that the instances of Binary that we use from GHC will not change
between patchlevel versions.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a proper Haddock module header to each module, with a more finegrained
copyright. If you feel mis-accreditted, please correct any copyright notice!
The maintainer field is set to haddock@projects.haskell.org.
Next step is to add a brief description to each module.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This fixes GHC ticket 2746.
In order to also link to the exported subordinate names of a declaration, we
need to re-introduce the sub map in the .haddock files.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We store documentation for an entity in the 'InstalledInterface' of the
definition site module, and never in the same structure for a module which
re-exports the entity. So when a client of the Haddock library wants to look up
some documentation, he/she might need to access a hidden module. But we
currently don't store hidden modules in the .haddock files.
So we add the hidden modules and the Haddock options to the .haddock files.
The options will be used to filter the module list to obtain the visible
modules only, which is necessary for generating the contents and index for
installed packages.
|
| |
|
| |
|
|
|
|
| |
It was accidentally removed in the patch for GHC 6.8.2 compatibility
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required one bigger change: 'readInterfaceFile' used to take an
optional 'Session' argument. This was used to optionally update the
name cache of an existing GHC session. This does not work with the
new GHC API, because an active session requires the function to return
a 'GhcMonad' action, but this is not possible if no session is
provided.
The solution is to use an argument of functions for reading and
updating the name cache and to make the function work for any monad
that embeds IO, so it's result type can adapt to the calling context.
While refactoring, I tried to make the code a little more
self-documenting, mostly turning comments into function names.
|
| |
|
| |
|
|
|
|
|
|
| |
We need to do this, since our .haddock format can potentially
change whenever GHC's version changes (even when only the patchlevel
changes).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ross Paterson reported a bug where links would point to the defining module
instead of the "best" module for an identifier (e.g Int pointing to GHC.Base
instead of Data.Int). This patch fixes this problem by refactoring the way
renamed names are represented. Instead of representing them by:
> data DocName = Link Name | NoLink Name
they are now represented as such:
> data DocName = Documented Name Module | Undocumented Name
and the the link-env looks like this:
> type LinkEnv = Map Name Module
There are several reasons for this. First of all, the bug was caused by
changing the module part of Names during the renaming process, without changing
the Unique field. This caused names to be overwritten during the loading of
.haddock files (which caches names using the NameCache of the GHC session).
So we might create new Uniques during renaming to fix this (but I'm not
sure that would be problem-free). Instead, we just keep the Name and add the
Module where the name is best documented, since it can be useful to keep
the original Name around (for e.g. source-code location info and for users of
the Haddock API).
Also, the names Link/NoLink don't really make sense, since wether to use
links or not is entirely up to the users of DocName.
In the process of following this change into H.Backends.Html I removed the
assumption that binder names are Undocumented (which was just an unnecessary
assumption, the OccName is the only thing needed to render these). This will
probably make it possible to get rid of the renamer and replace it with a
traversal from SYB or Uniplate.
Since DocName has changed, InterfaceFile has changed so this patch also
increments the file-format version. No backwards-compatibility is implemented.
|
| |
|
|
|
|
|
|
| |
Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B
<ghc-libdir> to Haddock when there're no source files to process. This is nice when
computing contents/index for external packages.
|
|
|
|
|
|
|
| |
We introduce InstalledInterface capturing the part of Interface that is stored
in the interface files. We change the ppHtmlContents and ppHtmllIndex to take
this structure instead of a partial Interface. We add stuff like the doc map
and exported names to the .haddock file (via InstalledInterface).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|