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

编程入门 行业动态 更新时间:2024-10-28 20:23:55
本文介绍了如何更改cabal配置文件的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在Win7上使用HaskellPlatform-2012.4.0.0。它被安装为便携式。路径通过.bat文件管理,所以 ghci 和 ghc 可以工作。 但是cabal安装它在C:\\\\\\\\\'\\\\\\\\\\\\\\\\\\\\\\\\\\'$ p> cabal update 编辑配置文件删除除config以外的所有文件

更改路径:

remote-repo-cache:d:\ h1\cabal\packages world-file:d:\h1\cabal\world build-summary:d:\h1\cabal\logs\build.log 它可以工作,但它远非真正的便携式。

Cabal配置更大问题。它似乎必须留在C:\ Users \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'$ 说配置文件路径源是默认配置文件。

问题: 1.哪个是默认配置文件? 2.可以远程repo-cache,世界文件和其他路径是相对的? 3.是否有一个设置默认cabal路径的方式,以便它永远不会去C:\ Users \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 运行cabal:

cabal --config-file =path / to / config

I am using HaskellPlatform-2012.4.0.0 on Win7. It's installed as portable. Paths are managed through .bat file so ghci and ghc works. But cabal installs it self at C:\Users\name\AppData\Roaming\cabal\ To circumvent that I did:

cabal update edit config file delete all files except config

Changed 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's far from truly portable.

Cabal config is bigger problem. It seems that it must be left in C:\Users\name\AppData\Roaming\cabal which is not portable at all. First run of cabal update says Config file path source is default config file.

Questions: 1. where is that default config file? 2. can remote-repo-cache, world-file and other paths be relative? 3. is there a way of setting default cabal path so it never goes to C:\Users\name\AppData\Roaming\cabal

解决方案

Run cabal with:

cabal --config-file="path/to/config"

更多推荐

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

本文发布于:2023-10-07 10:56:09,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:配置文件   路径   如何更改   cabal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!