
I think the "right" way to accomplish this is through the Paths_pkg module generated by Cabal: http://www.haskell.org/cabal/users-guide/developing-packages.html#accessing-... Specifically, the getDataFile function can be used to look up the actual location of files specified in the data-files: field of the .cabal file. This should even work if someone uses a nonstandard --prefix. On 2013-12-20 12:29, Henk-Jan van Tuyl wrote:
On Thu, 19 Dec 2013 18:15:09 +0100, Michael Orlitzky
wrote: On 12/19/2013 01:40 AM, Tim C. Schroeder wrote:
I think this is what you're looking for:
http://hackage.haskell.org/package/directory-1.2.0.1/docs/System-Directory.h...
getAppUserDataDirectory will give me the user's configuration directory (ala $HOME/.htsnrc), but not the global one (whatever I'm supposed to use instead of /etc on Windows).
You could use the environment variable AllUsersProfile[0] for this.
The directory package should be extended with a function getAppGlobalDataDirectory.
Regards, Henk-Jan van Tuyl
-- Joeri van Eekelen - j.v.eekelen@gmail.com