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

Re: How about add --hoogle option to haskell-devscripts's DEB_HADDOCK_OPTS



HI.

On Mon, Aug 20, 2012 at 11:07 PM, Iustin Pop <iustin@debian.org> wrote:
>> How about add --hoogle option to haskell-devscripts's DEB_HADDOCK_OPTS?
>>
>> I am trying pack hoogle for Debian.
>> But, libghc-*-doc packages don't have *.txt file for hoogle.
>> If they have *.txt, hoogle package will be able to search API on all
>> Debian packages installed.
>
> I don't know what the implications are for this change, but I would be
> very interested to have hoogle packaged; thanks a lot!

Thank you for your reply.

http://www.haskell.org/haskellwiki/Hoogle#Database_Creation

Hoogle needs database file to search packages' API.
A textual database file (foo.txt) can be created by haddock --hoogle command.
And we need to convert textual database to binary database by hoogle command.

  package foo =haddoc=> foo.txt =hoogle=> foo.hoo

Hoogle can search above binary database (foo.hoo).
But today, hoogle can't create foo.hoo file, because libghc-*-doc package
don't have any foo.txt file.
It's a problem on Debian.

Can I apply below patch to haskell-devscripts?

--- hlibrary.mk.old     2012-08-20 23:58:37.238800490 +0900
+++ hlibrary.mk 2012-08-20 23:59:06.578945982 +0900
@@ -52,6 +52,7 @@
 GHC_VERSION = $(shell ghc --numeric-version)
 DEB_HADDOCK_DIR ?= /usr/lib/ghc-doc/haddock/$(CABAL_PACKAGE)-$(CABAL_VERSION)/

+DEB_HADDOCK_OPTS += --hoogle
 ifndef DEB_NO_IMPLICIT_HADDOCK_HYPERLINK
 DEB_HADDOCK_OPTS += --hyperlink-source
 endif

The patched haskell-devscripts will create libghc-*-doc packages.
The libghc-*-doc package have foo.txt file.
In future, my hoogle package will collect textual database files installed,
and convert them to binary database files.

Regards,
-- 
Kiwamu Okabe


Reply to: