| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
When writing the first patch, I forgot to do the fix in both branches of an #if
macro.
|
|
|
|
|
|
|
|
|
| |
We were saving interfaces of all processed modules including those hidden using
{-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links
when generating the index for the libraries that come with GHC.
This patch excludes modules with hidden documentation when writing .haddock
files. It should fix the above problem.
|
| |
|
|
|
|
|
| |
Instead of explicitly making some binders Undocumented, treat all names the
same way (that is, try to find a Documented name).
|
|
|
|
|
|
|
| |
For running Haddock on GHC this reduces memory usage by about 50 MB on
a 32 bit system. A heap profile shows total memory usage peak at
about 100 MB, but actual usage is at around 300 MB even with
compacting GC (+RTS -c).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were not getting docs for re-exported class methods. This was because we
were looking up the docs in a map made from the declarations in the current
module being rendered. Obviously, re-exported class methods come from another
module.
Class methods and ATs were the only thing we were looking up using the doc map,
everything else we found in the ExporItems. So now I've put subordinate docs
in the ExportItem's directly, to make things a bit more consistent.
To do this, I added subordinates to the the declarations in the declaration
map. This was easy since we were computing subordinates anyway, to store
stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we
call what is now stored in the map.
This little refactoring removes duplicate code to retrieve subordinates and
documentation from the HsGroup.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The only place in the code where we want the subordinates for a declaration is
right after having looked up the declaration in the map.
And since we include subordinates in the map, we might as well take the
opportunity to store those subordinates that belong to a particular declaration
together with that declaration.
We also store the documentation for each subordinate.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It was there to know the documentation home module when creating
a wiki link, but we already know this since we have the DocName.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The support for DocPic was merged into the GHC source long ago,
but the support in Haddock was forgotten. Thanks Peter Gavin for
submitting this fix!
|
| |
|
|
|
|
| |
It was accidentally removed in the patch for GHC 6.8.2 compatibility
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We add some strictness annotations to the fields of Interface,
so that less GHC data is hold on to during processing.
|
|
|
|
|
|
| |
At the same time, we fix a bug where the list of interfaces were
processed in the wrong order, when building the links and renaming
the interfaces.
|
|
|
|
|
|
| |
This still doesn't fix the memory leak since the typechecked source is
retained and then processed separately. To fix the leak, modules must
be processed directly after typechecking.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
environment.
Getting it from the environment must have been a remnant from the
times when we were using unqualified names (versions 0.x).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
functions much better
|