Haddock is a documentation generator for Haskell
Questions tagged [haddock]
129 questions
10
votes
2 answers
Is it possible to hide specific functions from appearing in the documentation using haddock?
I use haddock and don't want all of my exported functions to be displayed in the documentation. Is it possible to hide specific functions?
I found the prune attribute at http://www.haskell.org/haddock/doc/html/module-attributes.html, but this is not…

efie
- 544
- 5
- 22
10
votes
4 answers
Haddock for Cabal-installed modules?
I'm using GHC and have installed several packages via Cabal. One of the packages' web site says "go see the haddock documentation". The haddock command seems to only work on source files, and cabal haddock only seems to work in the top-level…

Harold L
- 5,166
- 28
- 28
10
votes
1 answer
How to install haddock with cabal install
I tried to install haddock by running the following command cabal install haddock but I run through the following problem.
leonzo@lion:~/opt$ cabal install haddock
Resolving dependencies...
Configuring haddock-2.11.0...
Building…

Fopa Léon Constantin
- 11,863
- 8
- 48
- 82
9
votes
2 answers
Use of unicode characters in Haddock documentation
Haddock seems to incorrectly re-encode non-ASCII characters in the documentation in UTF-8 encoded source files. I often need to include mathematical formulas in the documentation and they are much more readable if some common math symbols such as…

Grzegorz Chrupała
- 3,053
- 17
- 24
9
votes
1 answer
How to link to a named chunk of documentation in Haddock?
I might be missing something really obvious (or might have developed temporary blindness staring at the Haddock user guide), but I can't seem to find any way to link to a named chunk of documentation in Haddocks
Edit: I'm trying to create an…

Saurabh Nanda
- 6,373
- 5
- 31
- 60
8
votes
1 answer
Is there a way to make Haddock render per-argument docs for type class methods?
It turns out that Haddock does not render per-argument docs for type class
methods:
class Foo a where
foo
:: Int -- ^ This string will be ignored by Haddock
-> a
This causes certain issues for users of a library I maintain, because
the…

Mark Karpov
- 7,499
- 2
- 27
- 62
8
votes
2 answers
{} in .cabal for Haddock-documentation in Haskell
If I got the line
> { -# OPTIONS_GHC -fglasgow-exts -XTemplateHaskell #- }
in the documentation-part (description) of the .cabal-file I'll get the error message
haddock: parsing haddock prologue failed
when running
$ cabal haddock
but if I get…

finnsson
- 4,037
- 2
- 35
- 44
8
votes
1 answer
Is the Hackage document building queue visible?
After uploading a new version of a Haskell package to Hackage, automatic document building can take some time, during with the package lacks online documentation. I'd prefer not to announce package changes until such documentation has been built.
Is…

orome
- 45,163
- 57
- 202
- 418
8
votes
1 answer
ghc-pkg check haddock warnings
Upon a fresh install of the haskell-platform (via homebrew) (GHC x64 7.6.3) on OSX 10.9.2 I receive the following warnings when I run ghc-pkg check (see below)
Warning: haddock-interfaces:…

The Internet
- 7,959
- 10
- 54
- 89
7
votes
1 answer
How to write special characters like new line, and format output of haddock
I would like to format my haddock documentation as I do with javadoc, something like inserting html or any other markup that let me get a cleaner output without uncluding any javascript or CSS... Specially, I would like to know how to insert a line…

Throoze
- 3,988
- 8
- 45
- 67
7
votes
0 answers
How to use a custom haddock executable to generate documentation with stack?
I'm working on a new theme for Haddock and want to try it on some real projects. How can I configure stack to use my haddock executable? I don't see any config option in stack.yaml. I've also tried putting the new haddock executable into my PATH but…

wereHamster
- 477
- 4
- 9
7
votes
2 answers
How do I get documentation for my Haskell package onto Hackage?
UPDATE: This question is now out of date. Hackage now uses Haskell
version 7.10.2 to build, so the following failure does not
occur. The change also appears to have broken some of the scripts
mentioned in the answers.
How do I get…

orome
- 45,163
- 57
- 202
- 418
7
votes
1 answer
Differential Documentation with haddock
If I do a cabal build on my library, then change a file, the next time I run cabal build, I only have to recompile files affected by the changes. I'm not getting the same behavior with the cabal haddock command: when I run it after changing a file,…

crockeea
- 21,651
- 10
- 48
- 101
7
votes
1 answer
Haskell Haddock latex equation in comments
I'd like to use latex notation for equations in my source code.
For example, I would write the following comment in some haskell source file Equations.hs:
-- | $v = \frac{dx}{dt}$
In the doc directory, this gets rendered by haddock in…

Maarten
- 1,037
- 1
- 11
- 32
6
votes
1 answer
Haddock hyperlinks and without warning about redundant imports
I have a dummy module in my project, whose sole purpose is to hold Haddock documentation for the rest of the library. In fact I don't need to import anything in this module, but if I don't import other modules, Haddock doesn't hyperlink function…

sastanin
- 40,473
- 13
- 103
- 130