Add --haddock-* flags to config file #1585

Closed
whittle opened this Issue Nov 19, 2013 · 5 comments

Comments

Projects
None yet
3 participants

whittle commented Nov 19, 2013

Per #510, several --haddock-* flags can be passed to cabal install which affect the generation of documentation, when enabled. (On this basis, I believe #510 can be marked resolved.) What cannot be done in cabal-install-1.18.0.2 is setting those same flags from the cabal config file.

This is a feature request to add the following flags to the cabal config file:

  • --haddock-hoogle
  • --haddock-html
  • --haddock-html-location=URL
  • --haddock-executables
  • --haddock-internal
  • --haddock-css=PATH
  • --haddock-hyperlink-source
  • --haddock-hscolour-css=PATH
  • --haddock-contents-location=URL

whittle commented Nov 19, 2013

There are two parts of this enhancement that I can see:

  1. Add a savedHaddockFlags::HaddockFlags field to Distribution.Client.Config.SaveConfig (along with the Monoid instance and commentSavedConfig default).
  2. Add a parser to Distribution.Client.Config.configFieldDescriptions that matches the same options as Distribution.Client.Setup.haddockOptions, but with boolean arguments instead of trueArg.

Number 1 is trivial, but doing the easy thing and just using Distribution.Client.Setup.haddockOptions for number 2 results in the new haddock options being unparseable.

If someone could provide guidance on how to proceed, I think I could finish the patch myself.

Owner

tibbe commented Jan 16, 2014

@dcoutts What's the right thing to do here? I imagine this issue (having the same thing as both a command line arg and a config file setting) has come up before.

23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 1, 2014

Add a 'haddock-flags' section to '~/.cabal/config'.
Fixes #931, #1585.

The new config file section looks like this by default:

    haddock-flags
      -- keep-temp-files: False
      -- hoogle: False
      -- html: False
      -- html-location:
      -- executables: False
      -- tests: False
      -- benchmarks: False
      -- all:
      -- internal: False
      -- css:
      -- hyperlink-source: False
      -- hscolour-css:
      -- contents-location:

23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 3, 2014

Add a 'haddock' section to '~/.cabal/config'.
Fixes #931, #1585.

The new config file section looks like this by default:

    haddock
      -- keep-temp-files: False
      -- hoogle: False
      -- html: False
      -- html-location:
      -- executables: False
      -- tests: False
      -- benchmarks: False
      -- all:
      -- internal: False
      -- css:
      -- hyperlink-source: False
      -- hscolour-css:
      -- contents-location:
Owner

tibbe commented Mar 5, 2014

@23Skidoo anything left to do here?

Member

23Skidoo commented Mar 5, 2014

@tibbe Waiting for @dcoutts to review.

23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 21, 2014

Add a 'haddock' section to '~/.cabal/config'.
Fixes #931, #1585.

The new config file section looks like this by default:

    haddock
      -- keep-temp-files: False
      -- hoogle: False
      -- html: False
      -- html-location:
      -- executables: False
      -- tests: False
      -- benchmarks: False
      -- all:
      -- internal: False
      -- css:
      -- hyperlink-source: False
      -- hscolour-css:
      -- contents-location:
Member

23Skidoo commented Apr 20, 2014

OK, this was fixed.

@23Skidoo 23Skidoo closed this Apr 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment