Libraries Digest, Vol 60, Issue 4

John Lato jwlato at
Mon Aug 4 19:29:16 EDT 2008

On Mon, Aug 4, 2008 at 5:26 AM,  Duncan Coutts wrote:
> Oh, great. I didn't know OS X had a standard location for per-user
> installs. That's excellent. So is there a preferred layout for those
> dirs? I'm guessing there probably is.
>> * ~/.cabal is bad on Mac OS, too.  Preferences ought to go into ~/
>> Library/Preferences/

~/Library/Preferences should only be used if the .plist format is
supported.  In general, I agree with Brendan that unixy programs don't
belong here, and I'm happy with .cabal.  However, if you want to use
the OSX dirs, I would think that most of the items in .cabal could be
placed in ~/Library/Application Support/Cabal/.  Unlike most other
standard directories, this appears to be completely

> Ok. BTW, in that case we should probably fix
> System.Directory.getAppUserDataDirectory to follow the system convention
> on OSX. Currently it uses $HOME/.appname on all unix systems (and the
> Windows convention on Windows). If necessary we may want to
> split getAppUserDataDirectory into a variant for config and another for
> data.
> Since cabal-install is a program should it still be
> using ~/Library/Preferences/ or is there are
> corresponding ~/Applications/Preferences/ ? Where would be
> appropriate for cabal-install put its download cache and build logs?

All preferences are in ~/Library/Preferences/, in Apple's .plist
format.  There is no ~/Applications/Preferences/.
Build logs should go in ~/Library/Logs/, either in a subdirectory or
directly in this folder.
There is a ~/Library/Caches/, but I believe that's reserved for the
NSURL cache (accessed through Cocoa).

> It's less clear what we'd do on windows if we want versioned binaries
> since there are no links.

I have personally ended up just copying the latest version of
"appname-n.n.n" to "appname".  Granted I've only done that on my own
computer, never as part of an install process.

John Lato

More information about the Libraries mailing list