[Haskell-cafe] How to determine the right path to haddock html documentation?

Roman Cheplyaka roma at ro-che.info
Tue Dec 17 15:37:18 UTC 2013


* Carlo Hamalainen <carlo at carlo-hamalainen.net> [2013-12-17 13:10:43+0100]
> On 17/12/13 11:32, Roman Cheplyaka wrote:
> >
> > First, no need to use that fork — all patches have been merged into
> > Cabal master at https://github.com/haskell/Cabal. (However, they are not
> > released yet, so you still have to build the git version.)
> 
> OK, I've built cabal from github in a clean test account.
> 
> > Second, no, installation won't happen automatically. At the moment you
> > have to do that manually, like this:
> >
> >   cabal install --haskell-suite -w hs-gen-iface mtl
> 
> I may be missing something obvious, but which package provides
> haskell-suite? I see that it's a group of repositories on github.

haskell-suite is not a real package or program. In this context, it's
the name of a "virtual compiler" known to cabal.

> $ cabal install --haskell-suite -w parsec
> cabal: The program haskell-suite is required but it could not be found.

The correct command is

  $ cabal install --haskell-suite -w hs-gen-iface parsec

The -w flag lets cabal know that you want to compile using hs-gen-iface,
which is a concrete compiler implementing the haskell-suite interface.

> > It'd be nice to add a cabal.config option to do that automatically.
> 
> Ditto for --haddock-hyperlink-source which I use all the time so that I
> get locally built documentation. Very handy for when I work at a cafe.

Yeah, ideally haddock and hscolor should be just separate compilers,
just like ghc and hs-gen-iface are. The user would then specify in
cabal.config what set of compilers to use for simple `cabal install $pkg`.

> I want to make the development process in Vim as smooth as possible. A
> newbie should be able to ask "what's this?" or "where is this from?" and
> get a quick answer, right there in the editor. Hoogle is very useful but
> there should be an editor-integrated solution that works locally and
> gives an answer like "this symbol in this file comes from this module on
> this system".

Then you may be also interested in Ariadne :)
https://github.com/feuerbach/ariadne

Roman


More information about the Haskell-Cafe mailing list