mouseover types via hscolour, haddock, cabal

David Waern david.waern at
Mon Jun 6 20:59:36 CEST 2011

Hi Ranjit,

2011/6/1 Ranjit Jhala <jhala at>:
> Hi all,
> I have just modified HsColour, Haddock and Cabal in order to produce HTML
> sources where the types of the identifiers are displayed when the mouse
> hovers over the identifier. You can see the results for HsColour, Haddock
> and Cabal at:

Cool stuff!

> * Haddock: takes a --annot=FILE option, and generates a text database as
>  described above. This could be useful even in other settings, e.g. to
>  display identifier types within emacs/vim (the current approaches, at
>  least for vim only show types for top-level bindings...)
>  New dependency: syb (to walk over the GHC AST and extract type bindings)

Hmm, do you know that Haddock can already generate a Hoogle database?
If so, is this database significantly different?

About the dependency, I don't think we can depend on syb as it's not a
GHC boot library. (Haddock is used in the GHC build process and can
only depend on boot libraries). syb was moved out of the boot
libraries a while ago, unfortunately.

Thanks for the patch, I will take a look at it.


More information about the cabal-devel mailing list