Re: hoogling GHC
Hi Neil -- Is there a command line option that allows one to change the default prefix for the URL returned by searches? For example, I managed to get a local hoogle server to index over ghc.foo but a query dfun returned the (dead) link http://hackage.haskell.org/packages/archive/ghc/latest/doc/html/Id.html#v:isDFunId presumably using the default prefix for hackage.haskell.org/... Instead, by manually tweaking the prefix to http://www.haskell.org/ghc/docs/7.0.1/html/libraries/ghc-7.0.1/Id.html#v:isDFunId I get something useful. Is there some way to rig the .txt -- .foo conversion to use a manually supplied prefix? Thanks for your help with this! Ranjit. On Mar 9, 2011, at 1:59 PM, Neil Mitchell wrote: Hi Ranjit, It sounds like you've got quite far. Sadly the manual is a bit out of date with respect to generating databases, but generally you need to produce ghc.txt on your own (using tools such as GHC's make system), then you can do: hoogle convert ghc.txt default.hoo Then you can run the local server with: hoogle server --databases=. That will find databases from the current directory, and serve them. Alternatively, if you put ghc.hoo (or default.hoo) in $DATADIR/databases it will pick them up automatically (where $DATADIR is whatever Cabal configured it to be). If you name the database as default.hoo it will be searched by default, if you name it ghc.hoo then foo +ghc will search for foo in the GHC database. If a copy of ghc.txt was publicly available somewhere (and updated on some schedule), I'd be happy to make the official Hoogle server search it. Usually I just grab databases off Hackage, but I'll happily make an exception for GHC. Thanks, Neil On Sun, Mar 6, 2011 at 7:52 AM, Malcolm Wallace malcolm.wall...@me.com wrote: The final stumbling block is getting the local webserver (hoogle server) to also search the above database. I'm sure there must be some simple way I can pass the name of the database as an argument when I boot up the server, but I can't seem to find it... Have you found the various versions of the web deployment procedure yet? deploy.txt: instructions to follow manually (seems to be up-to-date) deploy.sh: a shell script version to run locally (may be old) Deploy.hs: a haskell version to run remotely (may also be old) Obviously those scripts are tailored to the official installation, but there are some clues in there, for instance the steps cabal configure --datadir=/srv/web/haskell.org/hoogle/ --datasubdir=datadir -O2 and Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/resources Upload datadir/databases/* to /srv/web/haskell.org/hoogle/datadir/databases Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: hoogling GHC
Hi Ranjit, Is there a command line option that allows one to change the default prefix for the URL returned by searches? No command line option, but you can change the .txt file itself by doing: @url http://www.haskell.org/ghc/docs/7.0.1/html/libraries/ghc-7.0.1/ @package ghc That should cause all the URL's in the GHC package that aren't explicit to have the above URL prepended to them. If there's demand, I can add a flag. Thanks, Neil On Mar 9, 2011, at 1:59 PM, Neil Mitchell wrote: Hi Ranjit, It sounds like you've got quite far. Sadly the manual is a bit out of date with respect to generating databases, but generally you need to produce ghc.txt on your own (using tools such as GHC's make system), then you can do: hoogle convert ghc.txt default.hoo Then you can run the local server with: hoogle server --databases=. That will find databases from the current directory, and serve them. Alternatively, if you put ghc.hoo (or default.hoo) in $DATADIR/databases it will pick them up automatically (where $DATADIR is whatever Cabal configured it to be). If you name the database as default.hoo it will be searched by default, if you name it ghc.hoo then foo +ghc will search for foo in the GHC database. If a copy of ghc.txt was publicly available somewhere (and updated on some schedule), I'd be happy to make the official Hoogle server search it. Usually I just grab databases off Hackage, but I'll happily make an exception for GHC. Thanks, Neil On Sun, Mar 6, 2011 at 7:52 AM, Malcolm Wallace malcolm.wall...@me.com wrote: The final stumbling block is getting the local webserver (hoogle server) to also search the above database. I'm sure there must be some simple way I can pass the name of the database as an argument when I boot up the server, but I can't seem to find it... Have you found the various versions of the web deployment procedure yet? deploy.txt: instructions to follow manually (seems to be up-to-date) deploy.sh: a shell script version to run locally (may be old) Deploy.hs: a haskell version to run remotely (may also be old) Obviously those scripts are tailored to the official installation, but there are some clues in there, for instance the steps cabal configure --datadir=/srv/web/haskell.org/hoogle/ --datasubdir=datadir -O2 and Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/resources Upload datadir/databases/* to /srv/web/haskell.org/hoogle/datadir/databases Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: hoogling GHC
Hi Ranjit, It sounds like you've got quite far. Sadly the manual is a bit out of date with respect to generating databases, but generally you need to produce ghc.txt on your own (using tools such as GHC's make system), then you can do: hoogle convert ghc.txt default.hoo Then you can run the local server with: hoogle server --databases=. That will find databases from the current directory, and serve them. Alternatively, if you put ghc.hoo (or default.hoo) in $DATADIR/databases it will pick them up automatically (where $DATADIR is whatever Cabal configured it to be). If you name the database as default.hoo it will be searched by default, if you name it ghc.hoo then foo +ghc will search for foo in the GHC database. If a copy of ghc.txt was publicly available somewhere (and updated on some schedule), I'd be happy to make the official Hoogle server search it. Usually I just grab databases off Hackage, but I'll happily make an exception for GHC. Thanks, Neil On Sun, Mar 6, 2011 at 7:52 AM, Malcolm Wallace malcolm.wall...@me.com wrote: The final stumbling block is getting the local webserver (hoogle server) to also search the above database. I'm sure there must be some simple way I can pass the name of the database as an argument when I boot up the server, but I can't seem to find it... Have you found the various versions of the web deployment procedure yet? deploy.txt: instructions to follow manually (seems to be up-to-date) deploy.sh: a shell script version to run locally (may be old) Deploy.hs: a haskell version to run remotely (may also be old) Obviously those scripts are tailored to the official installation, but there are some clues in there, for instance the steps cabal configure --datadir=/srv/web/haskell.org/hoogle/ --datasubdir=datadir -O2 and Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/resources Upload datadir/databases/* to /srv/web/haskell.org/hoogle/datadir/databases Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: hoogling GHC
Hi Neil -- thanks, this is perfect!! Ranjit. On Mar 9, 2011, at 1:59 PM, Neil Mitchell wrote: Hi Ranjit, It sounds like you've got quite far. Sadly the manual is a bit out of date with respect to generating databases, but generally you need to produce ghc.txt on your own (using tools such as GHC's make system), then you can do: hoogle convert ghc.txt default.hoo Then you can run the local server with: hoogle server --databases=. That will find databases from the current directory, and serve them. Alternatively, if you put ghc.hoo (or default.hoo) in $DATADIR/databases it will pick them up automatically (where $DATADIR is whatever Cabal configured it to be). If you name the database as default.hoo it will be searched by default, if you name it ghc.hoo then foo +ghc will search for foo in the GHC database. If a copy of ghc.txt was publicly available somewhere (and updated on some schedule), I'd be happy to make the official Hoogle server search it. Usually I just grab databases off Hackage, but I'll happily make an exception for GHC. Thanks, Neil On Sun, Mar 6, 2011 at 7:52 AM, Malcolm Wallace malcolm.wall...@me.com wrote: The final stumbling block is getting the local webserver (hoogle server) to also search the above database. I'm sure there must be some simple way I can pass the name of the database as an argument when I boot up the server, but I can't seem to find it... Have you found the various versions of the web deployment procedure yet? deploy.txt: instructions to follow manually (seems to be up-to-date) deploy.sh: a shell script version to run locally (may be old) Deploy.hs: a haskell version to run remotely (may also be old) Obviously those scripts are tailored to the official installation, but there are some clues in there, for instance the steps cabal configure --datadir=/srv/web/haskell.org/hoogle/ --datasubdir=datadir -O2 and Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/resources Upload datadir/databases/* to /srv/web/haskell.org/hoogle/datadir/databases Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: hoogling GHC
Ranjit, I'd like to build a hoogle database that indexes the GHC source. Can anyone point me to how I might do that? (Or better, to a preexisting database?) The author of Hoogle, Neil Mitchell, is currently on holiday, but I'm sure he will have some good advice for you when he returns. In the meantime, the relevant portion of the Hoogle manual is here: http://www.haskell.org/haskellwiki/Hoogle#Database_Creation and a blog post with instructions is here: http://neilmitchell.blogspot.com/2008/08/hoogle-database-generation.html (I've noticed that make haddock generates a bunch of .txt files. Is there some easy way to scour the directories and build a single Hoogle database from them?) I imagine some simple shell scripting would achieve that, starting with find haddockBaseDir -name *.txt -print | ... Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: hoogling GHC
Hi Malcolm, thanks! I'd managed, thanks to the tutorials/blog managed to get to the point where make haddock generated ghc.txt which I converted to the database ghc.hoo After some more fiddling (namely copying the above into the relevant .cabal/share/hoogle/... directory), and renaming the above to default.hoo I'd even managed to induce the command line interface to search the database. The final stumbling block is getting the local webserver (hoogle server) to also search the above database. I'm sure there must be some simple way I can pass the name of the database as an argument when I boot up the server, but I can't seem to find it... Thanks again! Ranjit. On Mar 5, 2011, at 7:13 AM, Malcolm Wallace wrote: Ranjit, I'd like to build a hoogle database that indexes the GHC source. Can anyone point me to how I might do that? (Or better, to a preexisting database?) The author of Hoogle, Neil Mitchell, is currently on holiday, but I'm sure he will have some good advice for you when he returns. In the meantime, the relevant portion of the Hoogle manual is here: http://www.haskell.org/haskellwiki/Hoogle#Database_Creation and a blog post with instructions is here: http://neilmitchell.blogspot.com/2008/08/hoogle-database-generation.html (I've noticed that make haddock generates a bunch of .txt files. Is there some easy way to scour the directories and build a single Hoogle database from them?) I imagine some simple shell scripting would achieve that, starting with find haddockBaseDir -name *.txt -print | ... Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: hoogling GHC
The final stumbling block is getting the local webserver (hoogle server) to also search the above database. I'm sure there must be some simple way I can pass the name of the database as an argument when I boot up the server, but I can't seem to find it... Have you found the various versions of the web deployment procedure yet? deploy.txt: instructions to follow manually (seems to be up-to-date) deploy.sh: a shell script version to run locally (may be old) Deploy.hs: a haskell version to run remotely (may also be old) Obviously those scripts are tailored to the official installation, but there are some clues in there, for instance the steps cabal configure --datadir=/srv/web/haskell.org/hoogle/ -- datasubdir=datadir -O2 and Upload datadir/resources to /srv/web/haskell.org/hoogle/datadir/ resources Upload datadir/databases/* to /srv/web/haskell.org/hoogle/datadir/ databases Regards, Malcolm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
hoogling GHC
Hi all, I'd like to build a hoogle database that indexes the GHC source. Can anyone point me to how I might do that? (Or better, to a preexisting database?) (I've noticed that make haddock generates a bunch of .txt files. Is there some easy way to scour the directories and build a single Hoogle database from them?) Thanks! Ranjit. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users