
I've got a sandbox set up to build a local copy of Haddock documentation for various packages I'm using. Is there a way to get Cabal to just run Haddock and not actually build the packages in question? If the haddock program needs the compiled definitions then no, but I'm getting the impression it just runs over the raw sources. The config file I'm using at the moment is a very simple: $ cat cabal.config Documentation: True $ which is doing the trick to get Haddock run, I'm just wondering if there's ActualBuild: False equivalent? AfC

On 9 March 2015 at 15:04, Andrew Cowie
I've got a sandbox set up to build a local copy of Haddock documentation for various packages I'm using.
Is there a way to get Cabal to just run Haddock and not actually build the packages in question? If the haddock program needs the compiled definitions then no, but I'm getting the impression it just runs over the raw sources.
The config file I'm using at the moment is a very simple:
$ cat cabal.config Documentation: True $
which is doing the trick to get Haddock run, I'm just wondering if there's ActualBuild: False equivalent?
cabal configure && cabal haddock && cp -r dist/doc/html/<package name> /path/to/destination/ ?
AfC
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

On Mon, Mar 9, 2015 at 3:10 PM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
cabal configure && cabal haddock && ...
That'll build documentation for the current pwd's project (if there even is one), but that doesn't install and build the haddocks for dependencies. Well, unless you do `cabal install --only-dependencies` first, which brings us back to the original question. I'm trying to get a local version of the documentation of all the packages I tend to use so I don't need to keep reaching out to hackage.haskell.org while developing [offline]. Easily enough done; I'm just trying to skip building the code which, in this sandbox, I don't need. AfC

That's not possible; haddock uses the ghc api so it needs to be able to load the dependencies. If the packages in question never use template haskell, you could try to install them with -fno-code -fwrite-interface. Otherwise, the next best thing is to pass -O0. On 09/03/15 00:18, Andrew Cowie wrote:
On Mon, Mar 9, 2015 at 3:10 PM, Ivan Lazar Miljenovic
mailto:ivan.miljenovic@gmail.com> wrote: cabal configure && cabal haddock && ...
That'll build documentation for the current pwd's project (if there even is one), but that doesn't install and build the haddocks for dependencies. Well, unless you do `cabal install --only-dependencies` first, which brings us back to the original question.
I'm trying to get a local version of the documentation of all the packages I tend to use so I don't need to keep reaching out to hackage.haskell.org http://hackage.haskell.org while developing [offline]. Easily enough done; I'm just trying to skip building the code which, in this sandbox, I don't need.
AfC
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (3)
-
Andrew Cowie
-
Ivan Lazar Miljenovic
-
Roman Cheplyaka