堆栈package.yaml文件中有什么? [英] What goes in a Stack package.yaml file?

查看:138
本文介绍了堆栈package.yaml文件中有什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到Stack支持使用 package.yaml 文件来生成一个 .cabal 文件。例如, yi-core / package.yaml 。它的结构看起来与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

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,可以在这里找到: https://github.com/sol/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文件中有什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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