From the Hackage check/upload page:
Checking a Cabal package
Re-uploading a package with the same version number is not permitted, so you might want to do some checking before uploading:
- You could check that your source bundle builds, including the haddock documentation if it’s a library.
- The following form checks that a package is uploadable, warns about sundry other matters, and presents a preview of the web page for the package. It does not add the package to the database.
(my emphasis)
How do I generate a preview of the web page for the package locally? i.e. without using that website form?
(The “web page for the package” is e.g. this is QuickCheck’s.)
You use
cabal haddockto generate this page. This will generate the documentation indist/doc/html/<library-or-executable-name>/index.html.Additionally, you can edit your
~/.cabal/configfile to include the line:This will automatically install documentation for all of the packages you install with Cabal, and you will get a list of all installed modules on the system in the
~/.cabal/share/doc/index.htmlfile; this is useful forghcisessions or when you want to find out which package contains which modules, etc.