问题描述
我注意到Stack支持使用 package.yaml
文件来生成一个 .cabal
文件。例如,。它的结构看起来与Cabal文件非常相似,但不完全相同。一些键已被重命名(例如,Stack使用 source-dirs
而不是 hs-source-dirs
) 。
I notice that Stack supports using a package.yaml
file that it will use to generate a .cabal
file. For example, yi-core/package.yaml. Its structure seems very similar to a Cabal file, but not quite the same. Some of the keys have been renamed (for example, Stack uses source-dirs
instead of hs-source-dirs
).
我还没有找到关于此功能的任何文档。 似乎没有提及 package.yaml $ c $完全可以。规范是否存在?
I haven't found any documentation on this feature. The Stack docs don't seem to mention package.yaml
at all. Does a specification exist?
推荐答案
这是hpack,可以在这里找到:
This is hpack, available here: https://github.com/sol/hpack
这是一种稍微不同的封装格式,如您所说,可以是用于生成cabal文件。它不直接绑定到堆栈。
It's a slightly different package format, and, as you say, can be used to generate cabal files. It isn't directly tied to stack.
这篇关于堆栈package.yaml文件中有什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!