How to change the path to the cabal configuration file?

I am using HaskellPlatform-2012.4.0.0 on Win7. It is installed as portable. Paths are managed through a .bat file, so ghci and ghc work.
But cabal installs it on its own in C: \ Users \ name \ AppData \ Roaming \ cabal \
To get around this, I did:

 cabal update edit config file delete all files except config 

Modified paths:

 remote-repo-cache: d:\h1\cabal\packages world-file: d:\h1\cabal\world build-summary: d:\h1\cabal\logs\build.log 

It works, but it is far from truly portable.

Cabal configuration is a big problem. It seems that it should be left in C: \ Users \ name \ AppData \ Roaming \ cabal, which is not portable at all.
The first run of cabal update says Config file path source is default config file.

Questions:
1. Where is the default configuration file located?
2. Can the remote repo cache, world file and other paths be relative?
3. Is there a way to set the default path by default, so it never goes to C: \ Users \ name \ AppData \ Roaming \ cabal

+8
windows path haskell haskell-platform cabal
source share
1 answer

Run cabal with

 cabal --config-file="path/to/config" 
+3
source share

All Articles