[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFC : Hoogle in Debian (long)



Hi all,

I am currently packaging Hoogle, the Haskell API search engine for
Debian. Hoogle is both a command line application and a CGI program.
In the following, I will mainly be dealing with the Hoogle CGI.

If anyone hasn't used hoogle, they can get a feel for it by
trying the public one here:

    http://www.haskell.org/hoogle/

Notice that a search result like:

    http://www.haskell.org/hoogle/?hoogle=map

includes links to documentation like this:

    http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:map

which even has a link to the source code:

    http://haskell.org/ghc/docs/latest/html/libraries/base/src/GHC-Base.html#map

There are a number of minor problems with the public hoogle. First
and foremost, the number of hoogle database files is limited and
secondly, since the upstream author is on windows, he has no way of
building database files for any Unix or Linux specific modules.

Anyway, I basically have a working Debian package for Hoogle. It
depends on two packages in the NEW queue and I'm waiting for the
upstream to release a new version which includes a couple of my
patches. Once that is sorted out I intend to do my first upload.

However, since I've got the basics working I'd like to explore the
possibilities a little further.

Hoogle relies on database files with the '.hoo' file extention which
for my package sit in /usr/share/hoogle/database/ . These database
files are generated using haddock with the --hoogle command line
option. Currently the database files shipped with the hoogle .deb are
the ones shipped with the upstream hoogle sources.

However, since this is Debian, I believe we can do much better. My
rough proposal is as follows:

 - That haskell-devscripts be updated to modify the rules that make
   libghc6-@pkgname@-doc and @pkgname@-doc to also build and install
   the hoogle database files.

 - Modify the Debian version of hoogle so that the results it points
   at are the ones served off the same machine as the CGI as static
   HTML.

This would mean that if someone has the Hoogle CGI running on their
machine and then installs a Debian version of package XXXX including
the -doc package, it would be immediately searchable using Hoogle
and they would be able to drill all the way down to the Haskell source.

I think that having this in place would make Debian the most compelling
plaform to run Haskell on. The easy availablity of documentation would
be perfect for university compsci departments teaching or using Haskell.
It would also be invaluable for any commerical enterprise using Debian
and Haskell in-house.

Is anyone else as excited as me about this? Does anyone think any of
this is a bad idea?

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


Reply to: