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

Re: Haskell-hoogle package is ready for upload. (Re: Anyone can dput haskell-src-exts and agda?)



Dear Joachim.

On Wed, Sep 12, 2012 at 5:32 AM, Joachim Breitner <nomeata@debian.org> wrote:
> I see you added a .hs file to the package that is run using runhaskell.
> Why are you not compiling this at build time and ship it as a binary?
> Seems to be more efficient, reduces dependencies (ok, few people will
> install hoogle without ghc :-)) and enables hoogle on architectures
> without GHCi.

The reason is for my own taste.
But I agree your point that say "some people will install hoogle without ghc".
New debian/rules compiles haddock_collect.hs with command
"ghc -Wall -O haddock_collect.hs; strip haddock_collect".
And haddock_collect binary is more fast than haddock_collect.hs.

> How useful are the lib-hoogle-* packages? Do you expect any users of the
> library?

Now no one need it.
But below API is useful for me.
We can develop another search engine to read hoogle database.

http://hackage.haskell.org/packages/archive/hoogle/4.2.13/doc/html/Hoogle.html


> I improved the description of the hoogle package.

Thank's.


> Why does it depend on haskell-platform? Can’t I use it to just search
> the packages that I happen to have installed?

Because haddock_collect.hs use Codec.Compression.GZip.
But the depend isn't needed, because haddock_collect.hs is installed
with compile now.


> Have you tested your update-hoogle script on a system with no
> libghc-*-doc package installed (I expect at least an ugly error).

I think the problem is only for error message.
How about below patch.

-----------
diff -rN -u old-debian/files_hoogle/update-hoogle
new-debian/files_hoogle/update-hoogle
--- old-debian/files_hoogle/update-hoogle       2012-09-12
08:17:18.907412898 +0900
+++ new-debian/files_hoogle/update-hoogle       2012-09-12
08:17:18.939413058 +0900
@@ -16,11 +16,11 @@
 $HOOGLE data keyword

 echo "Collect txt files on ghc-doc"
-find /usr/share/doc/ghc-doc/html/libraries/*/ -name "*.txt*" | \
+find /usr/share/doc/ghc-doc/html/libraries/*/ -name "*.txt*" 2>/dev/null | \
   /usr/share/hoogle/tool/haddock_collect.hs $URLPREFIX $DATABASE_DIR/

 echo "Collect txt files on libghc-*-doc"
-find /usr/share/doc/libghc-*-doc/html/ -name "*.txt*" | \
+find /usr/share/doc/libghc-*-doc/html/ -name "*.txt*" 2>/dev/null | \
   /usr/share/hoogle/tool/haddock_collect.hs $URLPREFIX $DATABASE_DIR/

 # convert
-----------

If hoogle package can't find any txt files, hoogle only search keyword.


> Is there any point in keeping the *.txt and *.hoo files
> in /var/lib/hoogle/databases after a update_hoogle run? It seems, at a
> first glance, that /var/lib/hoogle/databases/default.hoo is enough.
>
> I did not yet test the cgi interface. I’d also welcome if other people
> from DHG would review this non-trivial package.

I think you can use cgi interface http://localhost/cgi-bin/hoogle,
with apache2, dwww and hoogle packages.

Best regards,
-- 
Kiwamu Okabe


Reply to: