Questions tagged [haddock]

Haddock is a documentation generator for Haskell

129 questions
4
votes
0 answers

Why can't Haddock find link destinations without Cabal?

I am in the process of writing a Cabal-install replacement for compiling my own projects (available for peeks on Github if you are curious), and have almost made it fully operational but for one detail : when generating documentation for separate…
user3340662
  • 191
  • 4
4
votes
1 answer

Haddock can't find the documentation for installed packages

I'm trying to make the documentation for my package. When I run the cabal haddock --executable it gives the following output: Running Haddock for Geometroid-0.1... Warning: The documentation for the following packages are not installed. No links…
Michael Pankov
  • 3,581
  • 2
  • 23
  • 31
4
votes
1 answer

Running Haddock on its own

I would like to start using Haddock; the primary reason is not that I do (or anyone else does) need nice HTML documentation for what I'm writing right now, but that it will teach me a standardized way commenting Haskell modules. For this reason, I'd…
David
  • 8,275
  • 5
  • 26
  • 36
3
votes
1 answer

Is it possible to have a documentation only file with Haddock?

I'm writing a documentation for a Haskell module with great number of tests and examples. This make my source file very long (3000 lines). My idea is to make a second source file (*.hs) with my full examples and only documentation (no functions…
JeanJouX
  • 2,555
  • 1
  • 25
  • 37
3
votes
2 answers

Link two functions without a space between them

I am writing documentation for a library using haddock, and, for reasons that are not really necessary to explain, I need to include a little code block in my documentation that looks like: z(<>) Importantly there can be no space between z and…
Wheat Wizard
  • 3,982
  • 14
  • 34
3
votes
1 answer

How to link to a specific implementation of a typeclass function?

I'm writing the documentation for a type-class where I'd like to point to an existing typeclass implementation to given an example of how to write your own instances. Here's what I'm trying: class Something a where -- | Please take a look at…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
3
votes
1 answer

How to document type-class constraints using Haddock?

I'm trying to document some very scary type-class constraints and explaining why they're required, but I can't seem to get the following working in Haddock: {-| This will show-up at the top of the module -} module Try where -- | This shows up…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
3
votes
1 answer

How to specify Haddock options (pragmas) at the project level?

From the Haddock section on Stephen Diehl's "What I Wish I Knew When Learning Haskell" page: haddock options can also be specified with pragmas in the source, either at the module or project level. An example of a pragma at the module level is…
kostmo
  • 6,222
  • 4
  • 40
  • 51
3
votes
1 answer

Why doesn't haddock generate HTML for some modules in base?

There are some modules in the base haddock that don't have documentation links. For example, GHC/Show.hs has haddock comments, but there is no documentation for the GHC.Show module on Hackage. Why not? Is this a bug?
Chris Martin
  • 30,334
  • 10
  • 78
  • 137
3
votes
2 answers

How to generate a table in Haddock documentation

I am writing some documentation with Haddock, and I need to put a multi-column table with some values in it. How can I do it with Haddock? I cannot find info about it. Embedding some html as alternative looks no possible too.
Randomize
  • 8,651
  • 18
  • 78
  • 133
3
votes
1 answer

CPP within Haddock

I can change haddocks based on a flag if I put the entire block within the CPP conditional branches: #if SOME_MACRO -- | Whether SOME_MACRO is true -- >>> someMacro -- True someMacro :: Bool someMacro = macroVal #else -- | Whether SOME_MACRO is…
user2141650
  • 2,827
  • 1
  • 15
  • 23
3
votes
1 answer

How to generate a Haddock inline code span that takes up a whole line

In Haddock, the "inline code"¹ markup, @...@, is the same as the "code block" markup, @ ... @ How can I write a single-line Haddock comment that consists only of an inline code span, without it being misinterpreted as a block? A comment like --…
Antal Spector-Zabusky
  • 36,191
  • 7
  • 77
  • 140
3
votes
1 answer

Why isn't haddock generating documentation?

My Haskell file (pretty sure this is not the problem) is basically: import System.IO ... -- | Every Word is a String type Word = String ... -- | Some documentation for Haddock to see main :: IO () main = do ... My Setup.hs: import…
wrongusername
  • 18,564
  • 40
  • 130
  • 214
3
votes
1 answer

How can I organize local haskell package documents?

I have many haskell packages and I have enabled some flag to allow them generate haddock documents. Now these documents are under directories like /usr/share/doc/{package-name}-{version}/html/. Is there a tool to organize them? I want something like…
Javran
  • 3,394
  • 2
  • 23
  • 40
3
votes
1 answer

Haddock - Trying to use named block while documenting class method

Is it possible to document a class method with Haddock and query pieces of documentation in the instance declaration code? For exemple, I would like the class documented like this : class ModifMATH a where -- | Explanations of simpMath method. …
JeanJouX
  • 2,555
  • 1
  • 25
  • 37
1 2 3
8 9