Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell Cabal regenerate documentation for all installed packages

How can I generate and install documentation for all locally installed cabal packages? I turned on the documentation flag in ~/.cabal/config which means that all newly installed packages will have documentation also generated. But how to generate documentation for all already installed packages?

Is there a way to automatically cabal install --reinstall all already installed packages? And more importantly, is that a good idea?

like image 336
Anupam Jain Avatar asked Jul 03 '11 15:07

Anupam Jain


People also ask

How do I install the Cabal executable in Haskell?

To install the cabal executable you can use ghcup (if you're using Linux), the Haskell Platform, install the cabal-install package from your distributions package manager (if using Linux or Mac), or download the source or prebuilt binary from the Download page.

How do I upgrade CABL in Haskell?

Install/Upgrade cabal. To install the cabal executable you can use ghcup (if you're using Linux), the Haskell Platform, install the cabal-install package from your distributions package manager (if using Linux or Mac), or download the source or prebuilt binary from the Download page.

Why do I get error when reinstalling Cabal?

Particularly when upgrading from old versions, you may see: ERROR: cabal: The following packages are likely to be broken by the reinstalls: ... Use --force-reinstalls if you want to install anyway. This can happen if your package archive gets into a broken state.

How do I install Cabal on Linux?

Install/Upgrade cabal To install the cabal executable you can use ghcup (if you're using Linux), the Haskell Platform, install the cabal-install package from your distributions package manager (if using Linux or Mac), or download the source or prebuilt binary from the Download page.


1 Answers

If you have a recent-ish version of cabal-install (>= 0.10, I think), you can try doing

$ cabal install --reinstall --upgrade-dependencies world

Unfortunately, it didn't work in my case:

$ cabal install --dry-run --reinstall world
Resolving dependencies...
cabal: cannot configure Agda-2.2.10. It requires haskell-src-exts >=1.9.6 &&
<1.10
For the dependency on haskell-src-exts >=1.9.6 && <1.10 there are these
packages: haskell-src-exts-1.9.6. However none of them are available.
haskell-src-exts-1.9.6 was excluded because haskell-src-exts-1.11.1 was
selected instead
haskell-src-exts-1.9.6 was excluded because hlint-1.8.12 requires
haskell-src-exts ==1.11.*

If you bump into an error like this, you can try manually editing the ~/.cabal/world file.

like image 187
Mikhail Glushenkov Avatar answered Oct 21 '22 03:10

Mikhail Glushenkov