21 Aug 2012 17:55
Combining databases from packages installed with cabal install
Marco TĂșlio Pimenta Gontijo <marcotmarcot <at> gmail.com>
2012-08-21 15:55:51 GMT
2012-08-21 15:55:51 GMT
Hi.
I'm configuring haddock via cabal install (see [0]) to build the
hoogle database. The database is being installed in
~/.cabal/share/doc/$package-$version/html/$package.txt, but is not
being combined with the default database. That is, if right after the
installation I try to search with the hoogle command for some a
function, it will not work. I wrote the following script, which I
called cabal-install:
#!/bin/sh
set -e
set -x
cabal \
install \
--enable-documentation \
--enable-library-profiling \
--haddock-hyperlink-source \
--haddock-hoogle \
--haddock-html \
"$ <at> "
cd ~/.cabal/share/hoogle-4.2.13/databases/
for file in ~/.cabal/share/doc/*/html/*.txt
do
hoo=`echo $file | sed 's/.txt$/.hoo/;s#.*/##'`
if [ ! -f $hoo ]
then
(Continue reading)
RSS Feed