gpt4 book ai didi

来自 github 的 Haskell Stack 安装包依赖项

转载 作者:行者123 更新时间:2023-12-03 10:14:40 25 4
gpt4 key购买 nike

是否可以使用 Haskell 堆栈从 github 安装一个软件包版本?

例如在 .cabalstack.yaml文件,如何将依赖项指向 git repo/branch/revision?

最佳答案

对于 <1.11 的堆栈:

documentation for the stack.yaml packages section给出了引用更复杂的包位置的示例。

packages:
- location: .
- location: dir1/dir2
- location: https://example.com/foo/bar/baz-0.0.2.tar.gz
- location: http://github.com/yesodweb/wai/archive/2f8a8e1b771829f4a8a77c0111352ce45a14c30f.zip
- location:
git: git@github.com:commercialhaskell/stack.git
commit: 6a86ee32e5b869a877151f74064572225e1a0398
- location:
hg: https://example.com/hg/repo
commit: da39a3ee5e6b4b0d3255bfef95601890afd80709


然后添加 extra-dep: truepackage输入只是为了告诉 stack不要将它引入的代码视为您正在开发的东西(例如,不要在 GHCi 中加载它)。

关于来自 github 的 Haskell Stack 安装包依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38377521/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com