Questions tagged [haddock]

Haddock is a documentation generator for Haskell

129 questions
3
votes
1 answer

cabal: dist/doc/html/creatur/haddock-prolog27972.txt: invalid argument

When I run cabal haddock on my package, I don't get any errors. But I've uploaded the package to Hackage, and the build log includes this message: cabal: dist/doc/html/creatur/haddock-prolog27972.txt: invalid argument I assume this is why the…
mhwombat
  • 8,026
  • 28
  • 53
3
votes
1 answer

Haskell cabal: Generate latex haddock documentation

I am trying to generate API documentation via cabal and haddock. I want it to be latex. So I do: cabal haddock --haddock-option=--latex This fails ultimately with: haddock: internal error: declaration not supported by declNames Is there something…
scravy
  • 11,904
  • 14
  • 72
  • 127
3
votes
1 answer

Does {-# OPTIONS_HADDOCK hide #-} have any effect on non-exported modules?

Suppose I have a library packaged and built using Cabal, and some module Internal is not in my cabal file's Exposed-modules. Does it then make any difference if I specify a pragma {-# OPTIONS_HADDOCK hide #-} at the top of Internal.hs, or is it…
Ben Millwood
  • 6,754
  • 24
  • 45
2
votes
0 answers

How to redirect cabal haddock output to a different folder?

I have a test project with the following structure: Test Test Test.hs Test.cabal Test.hs is an empty module: {-| Description: Test Test -} module Test.Test () where Test.cabal: cabal-version: 3.0 name: Test version: 0.0.0 library …
Liisi
  • 329
  • 1
  • 6
2
votes
0 answers

How to show progress of `stack haddock`?

Ran stack haddock haskell-src-exts I get: haskell-src-exts-1.20.3: configure haskell-src-exts-1.20.3: build haskell-src-exts-1.20.3: haddock And I've been waiting around for an hour but it still hasn't finished. Adding --haddock-arguments…
dspyz
  • 5,280
  • 2
  • 25
  • 63
2
votes
1 answer

Generating haddock for test modules with stack

Is there any way (using stack) to generate Haddock documentation for the test modules? The command: stack haddock will generate documentation for the library modules. I've tried to change some command line options using haddock-arguments without…
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34
2
votes
0 answers

Haddock: generating documentation for multiple re-exported modules through the same identifier

Is it possible to have haddock generating documentation for modules that are re-exported with an aliased identifier? I have the following two modules: Module A: module A where data A = A Module B: module B where data B = B Then if I re-export…
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34
2
votes
1 answer

Haddock - Data record fields names not being generated

I'm having trouble getting haddock to display the field names of my data records. Some of my data types have many different numeric values, so documenting the names is key. An example data record: -- | API response container for daily price…
aviaviavi
  • 188
  • 9
2
votes
0 answers

Tell Haddock to use a different base URL for hyperlinked identifiers from other packages

I'd like to host my haddock docs on my own site, but when I generate them on my machine they contain file:// links to the values and types from base:
rampion
  • 87,131
  • 49
  • 199
  • 315
2
votes
1 answer

Haddock losing part of the documentation?

I have the following function: -- | Exponential moving average. ema :: (Fractional a) => a -- ^ Alpha -> [a] -- ^ Input data -> [a] -- ^ Output ema alpha xs = scanl1 (\a b -> a+(alpha*(b-a))) xs Haddock takes the above and generates…
qrest
  • 3,083
  • 3
  • 25
  • 26
2
votes
1 answer

Should I use 'let' in my REPL Haddock examples?

What is the correct idiom for assignments in Haddock REPL examples? Specifically, should I use let >>> let x = 5 >>> x + 2 7 (as is — still — expected by GHCi) or omit it >>> x = 5 >>> x + 2 7 (as I can in IHaskell)?
orome
  • 45,163
  • 57
  • 202
  • 418
2
votes
2 answers

Why am I getting build plan errors running "stack haddock" when "stack test" works?

I'm creating a new Haskell project using Stack 0.1.3.1 on Windows 8. My stack.yaml file looks like this: flags: {} packages: - 'lazy-engine' extra-deps: [] resolver: lts-3.4 When I run stack build or stack test, everything works beautifully. I can…
Aaron Rotenberg
  • 972
  • 7
  • 22
2
votes
0 answers

cabal haddock failing because function is defined in multiple files

I try to generate documentation for my executable using cabal haddock. My project structure looks like this: ~/.../project_name project_name.cabal Setup.hs src/ Main.hs Data/ ... test/ MainTestSuite ... When I run cabal haddock…
jules
  • 1,897
  • 2
  • 16
  • 19
2
votes
1 answer

Haddock on record fields Haskell

I am trying write haddock for record fields on an interface. Only some of the fields are exported so I only want some of them documented. I read the documentation page here: http://www.haskell.org/haddock/doc/html/ch03s02.html#id565178 However, I…
Joe
  • 1,534
  • 9
  • 19
2
votes
2 answers

Embed bold face markup in Haddock documentation

Is there a way to get bold faced text when documenting Haskell source code with haddock markup? There is / / for emphasis, but nothing obvious for strong. I'm hoping for an elegant hack but I'll settle for a kludgy workaround... AfC
Andrew Cowie
  • 100
  • 7
1 2 3
8 9