如何更改cabal配置文件的路径?

CoR*_*CoR 8 windows haskell path cabal haskell-platform

我在Win7上使用HaskellPlatform-2012.4.0.0.它安装为便携式.路径是通过.bat文件管理,以便ghcighc工作.
但是cabal会在C:\ Users \name\AppData\Roaming\cabal \中自行安装它
来绕过我的行为:

cabal update
edit config file
delete all files except config
Run Code Online (Sandbox Code Playgroud)

改变路径:

remote-repo-cache: d:\h1\cabal\packages 
world-file: d:\h1\cabal\world
build-summary: d:\h1\cabal\logs\build.log
Run Code Online (Sandbox Code Playgroud)

它有效,但它远非真正便携.

Cabal配置是一个更大的问题.它似乎必须保留在C:\ Users \name\AppData\Roaming\cabal中,它根本不可移植.
第一轮cabal updateConfig file path source is default config file.

问题:
1.默认配置文件在哪里?
2.远程repo-cache,world-file和其他路径可以相对吗?
3.有没有办法设置默认的cabal路径,所以它永远不会转到C:\ Users \name\AppData\Roaming\cabal

sin*_*yma 4

运行阴谋集团:

cabal --config-file="path/to/config"
Run Code Online (Sandbox Code Playgroud)

  • @CoR我有相同的版本,你必须将开关放在任何命令*之前*。就像 `cabal --config-file=... install ...` (2认同)