Questions tagged [haddock]

Haddock is a documentation generator for Haskell

129 questions
1
vote
1 answer

Haddock breaks down on #if #else #endif clauses

I am trying to generate documentations for a github library using haddock. Here's the code I entered: $ find -name '*.hs' | xargs haddock --html -o docs src/Reflex/Dom/Xhr.hs:154:0: error: missing binary operator before token "(" #if…
john mangual
  • 7,718
  • 13
  • 56
  • 95
1
vote
2 answers

how to generate documentations with haddock?

The project I am using does not have docs on Stackage (they're out of date). Here is the original one which is on verson 0.3 https://hackage.haskell.org/package/reflex-dom-0.3/docs/Reflex-Dom-Widget-Basic.html I was told I could generate docs with…
john mangual
  • 7,718
  • 13
  • 56
  • 95
1
vote
1 answer

Hiding declaration of type synonym in Haddock

I'm writing a library, and in it I have defined and exported some (very convoluted) type synonym T. -- | A type type T a b i o = ReaderT (WriterT i a X) (WriterT i b o) Internal to the library, the type makes sense. To a user, however, it is…
Kwarrtz
  • 2,693
  • 15
  • 24
1
vote
2 answers

getting and testing a random item in a list in Haskell

Lets say there is a list of all possible things all3PStrategies :: [Strategy3P] all3PStrategies = [strategyA, strategyB, strategyC, strategyD] //could be longer, maybe even infinite, but this is good enough for demonstrating Now we have another…
chris Frisina
  • 19,086
  • 22
  • 87
  • 167
1
vote
0 answers

cabal: installing documentation under hsenv

I have a hsenv sandbox for a project, and I can't get cabal install to install the documentation for the libraries. The following: cabal install --enable-documentation $package installs the package, but without generating any haddock docs (only…
oggy
  • 3,483
  • 1
  • 20
  • 24
1
vote
0 answers

Why can't cabal haddock find lens?

I've got a project where I'm trying out the lens library. I'm trying to generate haddock docs so I can see the functions produced by the makeClassy TemplateHaskell function. cabal build works fine, but cabal haddock fails with $ cabal…
purefn
  • 836
  • 4
  • 14
1
vote
1 answer

Haddock: Failed to create dependency graph (when adding sections with * or a module heading)

I compiled and installed haddock-2.4.2 from the tarball source. Adding a few simple comments to the code here: https://dl.getdropbox.com/u/143480/doc/DualMap.hs and running haddock $ haddock -h -o doc Data/DualMap.hs Warning: Data.DualMap: could…
Jared Updike
  • 7,165
  • 8
  • 46
  • 72
0
votes
0 answers

How to make haddock documentation link to documentation of other packages?

Minimal example: I have a Cabal project with the following structure: Test Test.cabal Test.hs The code file: {- Description: Description. * Description -} module Test (test) where -- | Test. test :: Int test = 0 The cabal…
Liisi
  • 329
  • 1
  • 6
0
votes
0 answers

Is it possible to create asciidoc from haddock?

I am currently building my Haskell project (and generating html documentation) with stack build --test --haddock. Is there a way to get asciidoc as output format?
Joe
  • 287
  • 3
  • 13
0
votes
0 answers

Haddock invocation from another directory

I can successfully generate haddock html files from inside the src directory: $ cd src && haddock --html Person.hs -o ../docs && cd ../ Haddock coverage: # some parts were omitted for brevity Warning: Package name is not available. 100% ( 2 / 2)…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

No Markup in Haddock Docs Section

I have an ASCII diagram in a module's documentation that I would like to display in haddock, however I cannot figure out how to turn off markup for that section of the comments so that it doesn't treat characters as markup / special characters. Does…
0
votes
1 answer

cabal v2-haddock - renderBuildTargetProblem: unexpected status

I have tried to run cabal v2-haddock and I got cabal: renderBuildTargetProblem: unexpected status (TargetDisabledByUser,Nothing) CallStack (from HasCallStack): error, called at ./Distribution/Client/CmdErrorMessages.hs:329:14 in…
Přemysl Šťastný
  • 1,676
  • 2
  • 18
  • 39
0
votes
2 answers

How to align Haddock comments for function parameters in emacs?

It seems that the only way to document function parameters is to use the -- ^ docs here style. Unfortunately, this gets very unwieldy when function parameters are of different lengths. For example: myFunc :: (Int -> String -> Bool -> IO ()) -- ^…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
0
votes
1 answer

Build local Hoogle DB despite error in Haddock

Is there a workaround to build a lokal Hoogle DB despite Haddock errors in some packages. For example, is there a workaround on how to exclude those packages from the Haddock sub-task during the lokal Hoogle DB build? As a concret example: $ stack…
nemron
  • 701
  • 6
  • 23
0
votes
0 answers

haddock generating docs, but returning exit code 1

I've tried invoking haddock via stack using the following commands: stack haddock --no-haddock-deps --haddock-internal webservice:lib stack haddock --haddock-arguments "--odir=/tmp/haddock" --no-haddock-deps --haddock-internal webservice:lib stack…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
1 2 3
8
9