cabal-install配置文件的文档 [英] documentation for cabal-install configuration file

查看:324
本文介绍了cabal-install配置文件的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

〜/ .cabal / config 存储cabal-install使用的配置。我想对它做一些讨厌的事。 (具体来说,安装了多个GHC版本,我希望有单独的文档索引)。

但是,我不能找到任何有关其语法或变量的文档为什么包含在默认文件中。是否有任何文档可用?



编辑:我已经阐述了上述目标,但让我添加一些细节:如果安装了相同的软件包(例如GTK) GHC的两个版本,它们最终在同一个文档索引文件中。我不希望每个GHC安装的本地文档索引都是分开的。我相信可以用某种方式使用文档目录设置,但目前使用的GHC版本必须有一个变量。如果没有可用的解决方法,但我不能说,除非我看到文档。

解决方案
 文档:True $> 

这似乎可行,但我只用GHC的一个版本进行了测试。 b $ b doc-index-file:$ datadir / doc / $ compiler / index.html

install-dirs user
docdir:$ datadir / doc / $ compiler / $ pkgid

在默认情况下,剩下的其他选项会生成 .cabal / share / doc /< ghc-version> /< package-name> 以及 .cabal / share / doc /< ghc-version> / index中的索引。 html


The ~/.cabal/config stores configuration which cabal-install uses. I wanted to do some hackery on it. (Specifically, having multiple GHC versions installed, I wish to have separate documentation indexes).

I couldn't, however, find any documentation about its' syntax or variables except for what is included in default file. Is there any documentation available?

Edit: I've stated the goal above, but let me add some details: If the same package (eg. GTK) is installed in two versions of GHC they end up in the same documentation index file. I wan't that local documentation index to be separate for each GHC installation. I believe it is possible in some way using documentation directory setting, but there has to be a variable for currently used GHC version. If there isn't one there might be some workarounds available, but I won't be able to say that unless I see the documentation.

解决方案

This seems to work, although I've only tested it with one version of GHC:

documentation: True
doc-index-file: $datadir/doc/$compiler/index.html

install-dirs user
    docdir: $datadir/doc/$compiler/$pkgid

With the other options left at the default, this generates documentation in .cabal/share/doc/<ghc-version>/<package-name>, and the index in .cabal/share/doc/<ghc-version>/index.html.

这篇关于cabal-install配置文件的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆