Haddock is a documentation generator for Haskell
Questions tagged [haddock]
129 questions
2
votes
2 answers
Haddock comments on imported entities
Is there a way to add Haddock documentation to an entity in the module which exports it, rather than the one that declares it?
I've got a hidden module that declares a dozen types or so, and then another module which exports just the parts that the…

MathematicalOrchid
- 61,854
- 19
- 123
- 220
2
votes
1 answer
Haddock not obeying ignore-exports correctly
Take this example:
{-# OPTIONS_HADDOCK ignore-exports #-}
module HaddockTest (e1) where
-- * Exported
-- | This is exported.
e1 :: Int
e1 = 1
-- * Private
-- | This is not exported.
p1 :: Int
p1 = 1
Strangely, the doc-string for the…

Asherah
- 18,948
- 5
- 53
- 72
1
vote
1 answer
Creating haskell haddock properties on multiple lines
I would like to add a property in my haddock documentation that spans multiple lines.
For example, I would like to do the following:
-- prop> a <= b &&
-- prop> b <= c ==>
-- prop> a <= c

hobbitProg
- 11
- 4
1
vote
0 answers
error when building haddock-api-2.24.0 with cabal
I tried to install haddock-api-2.24.0 package with cabal (on archlinux) but it failed:
➜ ~ cabal install haddock-api-2.24.0
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
…

Y.F.
- 23
- 3
1
vote
1 answer
How to link to a module with different name in Haddock?
I have a module defined as foo.bar and I want to reference it from a different part of the project. However for legibility I want it to show up as bar not foo.bar.
Normally I would just use "foo.bar", but Haddock would show foo.bar. Is there a way…

Santiago Cuellar
- 385
- 1
- 6
1
vote
0 answers
Automatically linking to functions (or modules) from the README file in Hackage
Is there any way for the README file to support automatic linking to known identifiers (eg. function names or module names), similar to how Haddock does it ?

Saurabh Nanda
- 6,373
- 5
- 31
- 60
1
vote
1 answer
Does Hackage generate haddocks for package candidates?
I'd like to get feedback on my package's documentation before publishing it to the main index. However, irrespective of how long I wait, Hackage doesn't seem to be building haddocks for my package candidate. Is this a known issue?
Is my only option…

Saurabh Nanda
- 6,373
- 5
- 31
- 60
1
vote
2 answers
Stack ExitFailure 1
I've been trying to run stack install hsdev --stack-yaml ./Documents/hsdev.yaml, where hsdev.yaml contains
packages: []
resolver: lts-13.29
extra-deps:
- hsdev-0.3.3.4
- hdocs-0.5.3.2
- haddock-api-2.22.0
- network-3.0.1.1
This returns the error
--…

Hello World
- 76
- 7
1
vote
0 answers
ghci :info and haddock on type synonyms
I have a type synonym like
type Events t b = Tb.T t b
The underlying type Tb.T is an instance of many typeclasses, e.g.
instance [safe] (Eq time, Eq body) => Eq (Tb.T time body)
instance [safe] Functor (Tb.T time)
..
My type synonym (of course)…

Martin Drautzburg
- 5,143
- 1
- 27
- 39
1
vote
1 answer
What does `stack haddock --skip ` do?
After being unable to run stack haddock on my project because one package causes it to hang (see How to show progress of `stack haddock`? ) I tried to skip that package with
stack haddock --skip haskell-src-exts
But it still tries to haddock…

dspyz
- 5,280
- 2
- 25
- 63
1
vote
0 answers
How to separate lines of a LaTeX eqnarray in Haddock markup?
I can't seem to get this simple LaTeX code, embedded in a Haskell comment, to render properly when run through Haddock with HTML target:
\[
\begin{eqnarray}
y &=& f(x) \\
z &=& g(y)
\end{eqnarray}
\]
When I run the Haskell code containing the above…

dbanas
- 1,707
- 14
- 24
1
vote
1 answer
Why is the Signature section of my Haddock generated documentation home page empty?
I'm generating documentation for my Haskell library using:
stack haddock --no-haddock-deps
And the resultant index.html page has an empty Signatures section.
Why is the Signatures section empty?

dbanas
- 1,707
- 14
- 24
1
vote
2 answers
How to generate Haddock docs with Cabal?
I'm lost. I do not get how I generate docs locally with cabal. What I want is cabal install gtk3 which does generate the documenation also. Or well if that does not work how to I generate the docs locally?
I've put that into my .config file from…

Friedrich
- 5,916
- 25
- 45
1
vote
1 answer
Auto-generate Servant-API documentation for Haskell developers
I build a web-API using servant that grows increasingly large.
I am aware of two ways to automatically create documentation for the api.
First, there's haddock. Haddock turns my code into hyperlinked HTML-pages. Neat! This is especially helpful,…

ruben.moor
- 1,876
- 15
- 27
1
vote
0 answers
What does the star (*) in instance documentation mean?
In the MonadState doc page, there's a star (*) inside the ReaderT type of the MonadState instance:
MonadState s m => MonadState s (ReaderT * r m)
But actually in the source, there's no star:
instance MonadState s m => MonadState s (ReaderT r m)…

Ben
- 3,612
- 3
- 19
- 24