ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

Add config mode #66

Open ndmitchell opened 10 years ago

ndmitchell commented 10 years ago

It would be useful to have hoogle config or similar that sets Cabal up to always build haddock documentation, and always generate hoogle docs, now the feature is available in the latest cabal: http://blog.johantibell.com/2014/04/announcing-cabal-120.html

tobiasgwaaler commented 10 years ago

Could this be as simple as making sure that ~/.cabal/config contains "haddock -- hoogle: False"?

ndmitchell commented 10 years ago

Shouldn't it be True? But yes, it's find the ~/.cabal/config file (with whatever logic cabal uses) and change that config line. I haven't looked into what the syntax should be. I don't expect it to be rocket science, just a bit of help so people don't have to remember the script.

tobiasgwaaler commented 10 years ago

Hehe, yes, of course it should be True :) My bad.

But yeah, great idea

tobiasgwaaler commented 10 years ago

About finding the cabal config file: https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Client/Config.hs#L232

So getAppUserDataDirectory "cabal" is enough for locating the file