简体   繁体   English

使用Haskell Stack构建工具的项目之间的依赖关系–最佳工作流程?

[英]Dependencies between projects with Haskell Stack build tool — best workflow?

I am just beginning a relatively large Haskell project using the stack package manager and build tool, and I am trying to figure out the best way to split it up into several stack projects with dependencies between them. 我刚刚开始使用stack包管理器和构建工具开始一个相对较大的Haskell项目,并且我试图找出将其拆分为几个相互依赖的stack项目的最佳方法。

Essentially, while I believe I understand how to use stack to include external packages downloaded from Stackage in my project, I don't understand how to include packages from other local projects. 本质上,虽然我相信我了解如何使用stack将从Stackage下载的外部软件包包括在我的项目中,但我不知道如何包括来自其他本地项目的软件包。 How do I create libraries using stack that I can then use in other projects? 如何使用可以在其他项目中使用的stack创建库?

In stack.yaml there is the field packages . stack.yaml有字段packages This is where you can specify the locations of other projects. 您可以在此处指定其他项目的位置。

For an example, see the stack.yaml file for the hayoo repo: 有关示例,请参见hayoo存储库的stack.yaml文件:

https://github.com/hunt-framework/hayoo/blob/master/stack.yaml https://github.com/hunt-framework/hayoo/blob/master/stack.yaml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM