[Haskell-cafe] determine hoolge database directory

Gregory Dean Weber gdweber at iue.edu
Wed Jun 25 14:07:27 UTC 2014


Hi, Tobi, and welcome to Haskell.

Maybe this would help:

http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html

See also the Cabal User's Guide -- in particular, the section
on "Accessing data files from package code" --

http://www.haskell.org/cabal/users-guide/
http://www.haskell.org/cabal/users-guide/developing-packages.html#accessing-data-files-from-package-code

Gregory
 
On 2014-Jun-23, Tobias Pflug and/or a Mail User Agent wrote:
> Hi haskellers,
> 
> i'm new to haskell and am currently working on some tool that is
> supposed to fiddle with hoogle database files. Now I'm looking
> for a sane way to determine the directory where hoogle stores its
> database directories (when you perform `hoogle data`).
> In my case this is:
> .cabal/share/x86_64-linux-ghc-7.8.2/hoogle-4.2.33/databases
> 
> So this is [home directory]/.cabal/[ghc-version]/[hoogle-version]/databases
> 
> Could someone suggest me a sane way how I can determine this path at
> runtime ? Maybe there is a way to extract this
> from somewhere ? I'm out of ideas on this. I could of course take
> the easy way out and let users declare the path
> as config parameter but it would be nice if there was a way ...
> 
> thanks in advance.
> 
> regards,
> Tobi
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-- 
Gregory D. Weber, Ph. D.                  http://mypage.iu.edu/~gdweber/
Associate Professor of Informatics        Tel (765) 973-8420
Indiana University East                   FAX (765) 973-8550



More information about the Haskell-Cafe mailing list