Questions tagged [haddock]

Haddock is a documentation generator for Haskell

129 questions
5
votes
2 answers

stop cloudera CDH5 cluster command line

I would like to know command line for stopping and starting cloudera CDH5.2 cluster. Reason, I am writing an automation script for running some benchmark tests and want to stop and start cluster before starting with each benchmark test. I have seen…
rational
  • 143
  • 10
5
votes
0 answers

Is there any tool/website where I can read Haskell source code with the Haddock rendered?

I'd like to read the source code for a library (example), but with the Haddock comments rendered pretty (example) . http://www.haskell.org/ghc/docs has both of these views, but doesn't combine them together. Has anyone made a UI to view these…
misterbee
  • 5,142
  • 3
  • 25
  • 34
5
votes
1 answer

Control documented type signature of re-exported function

Suppose there is a library module Foo which is not under my control: module Foo (Foo, thing) where data Foo = Foo Int thing :: Foo thing = Foo 3 Now suppose I have my own library module, which re-exports thing from the Foo module. module Bar…
Dan Burton
  • 53,238
  • 27
  • 117
  • 198
4
votes
1 answer

Building Haddock documentation without compiling the source

I'm working on a Haskell library that contains parts that target WebAssembly (WASM) using Asterius. These parts can't be compiled with the normal ghc and for that reason we have flags that exclude/include the WASM parts. Trying to build the…
Netråm
  • 453
  • 6
  • 12
4
votes
0 answers

How do I document the parameters of a function inside of a record type with Haddock?

I have a record type that contains a function. I'm trying to document the parameters to that function, but Haddock gives me a parse error. (When I actually compile the code to run it, it works fine.) data Browserful jsval = Browserful { -- |…
Mike
  • 716
  • 4
  • 10
4
votes
1 answer

How to instruct haddock to link to hackage documentation for hackage packages?

So, I am using haddock (through cabal) to generate documentation for my local Haskell package. It has no trouble hyperlinking its own local html documents to each other. However, whenever my package references a symbol from another package, it does…
PyRulez
  • 10,513
  • 10
  • 42
  • 87
4
votes
0 answers

Getting stack to build only haddock docs and not the library/executable

Following up from How to exclude dependencies when building haddocks? I'm stuck in the following loop: Run the following command: stack haddock --no-haddock-deps webservice Wait for the webservice library to be built Haddock then starts processing…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
4
votes
1 answer

How to reduce documentation duplication using Haddock

I have two very similar functions and both need exactly the same documentation. Is there a way in Haddock to avoid comment duplication? I could not find description of this feature in Haddock documentation, but I guess there is a way to do so. For…
klappvisor
  • 1,099
  • 1
  • 10
  • 28
4
votes
1 answer

Stack Haddock - Do not generate docs for dependencies

I am generating my haddocks with: stack haddock --no-haddock-deps My understanding of this option from the help: Enable/disable building Haddocks for dependencies would be that it would not generate haddocks for any dependencies. But this is not…
GreenSaguaro
  • 2,968
  • 2
  • 22
  • 41
4
votes
0 answers

Named documentation chunk with Haddock

I'm trying to document my sources and I have a problem with named chunk. I would like to document a large amount of patterns (more than 50), I would like to keep each explanation near the code and gather all the explanations in the header I tried…
JeanJouX
  • 2,555
  • 1
  • 25
  • 37
4
votes
1 answer

Why does cabal haddock --hyperlink-source not generate the source HTMLs?

For a cabal project, I wanted to generate haddock documentation with hyperlinks to the source code, so I did the usual: cabal haddock --hyperlink-source The links were generated, but upon clicking the links I find that the actual source code is not…
Rufflewind
  • 8,545
  • 2
  • 35
  • 55
4
votes
1 answer

Changing the documentation for re-exported types and values

Suppose I have a module which re-exports a value from an internal module: module My.Cool.Module (SomeType, someValue) where import My.Cool.Module.Internal (SomeType, someValue) I'd like to show different documentation for SomeType and someValue in…
rampion
  • 87,131
  • 49
  • 199
  • 315
4
votes
1 answer

Why isn't Cabal hyperlinking my sources?

$ cabal --version cabal-install version 1.22.2.0 using version 1.22.2.0 of the Cabal library $ cabal install --haddock-hyperlink-source gloss-juicy Warning: /home/theking/.cabal/config: Unrecognized field hyperlink-source on line 91 I do have…
PyRulez
  • 10,513
  • 10
  • 42
  • 87
4
votes
1 answer

How to make haddock documentation for hsc2hs enum members

I'm using hsc2hs to import a bunch of enum values from C header. My code (simplified) looks like this: -- | newtype wrapper around Windows SDK SE_OBJECT_TYPE enumeration newtype SecurityObjectType = SecurityObjectType BYTE #{enum SecurityObjectType,…
Anton
  • 978
  • 5
  • 11
4
votes
0 answers

Haskell: annotating tuples in Haddock

I have Haskell function signature with a long tuple in it, which I am trying to annotate for Haddock: gssAcceptSecContext :: Maybe GssCtxId -- ^ context_handle -> Maybe GssCredId -- ^ acceptor_cred_handle -> GssToken …
1 2 3
8 9