是否可以使用 Haskell 堆栈从 github 安装软件包的版本?
例如在一个.cabal
or a stack.yaml
文件,如何在 git repo/branch/revision 上指向依赖项?
对于堆栈
The 的文档stack.yaml packages section http://docs.haskellstack.org/en/stable/yaml_configuration/#packages给出了引用更复杂的包位置的示例。
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: [email protected] /cdn-cgi/l/email-protection:commercialhaskell/stack.git
commit: 6a86ee32e5b869a877151f74064572225e1a0398
- location:
hg: https://example.com/hg/repo
commit: da39a3ee5e6b4b0d3255bfef95601890afd80709
然后加extra-dep: true
to the package
条目只是为了告诉stack
不要将其引入的代码视为您正在开发的代码(例如,不要将其加载到 GHCi 中)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)