在哪里可以找到Haskell的正确软件包名称和版本? [英] Where can I find correct package name and version for Haskell?

查看:84
本文介绍了在哪里可以找到Haskell的正确软件包名称和版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说,我需要System.Eval.Haskell.或其他.我怎么知道应该在我的package.yaml中指定哪个软件包?当我转到 https://hackage .haskell.org/package/plugins-1.5.7/docs/System-Eval-Haskell.html ,我看不到任何软件包名称.

Say, I need System.Eval.Haskell. Or whatever else. How do I know which package I should specify in my package.yaml? When I go to the https://hackage.haskell.org/package/plugins-1.5.7/docs/System-Eval-Haskell.html, I see no package name.

P.S. 插件"对我不起作用.因此,我认为这是不同的.我希望如此:)

P.S. "plugins" did not work for me. Thus, I assume it's something different. I hope so :)

看起来在配置中的额外依赖项和常规"依赖项之间有些不太明显的区别.提到plugins-1.5.7作为额外的确确实有效.我是在这里做一些依赖关系管理不善,还是那绿色的路要走?

Looks like there is somewhat quite unclear difference between extra-dependencies and "regular" dependencies in the configuration. Mentioning plugins-1.5.7 as extra-dep indeed works. Am I doing some dependency mismanagement here, or that's green way to go?

推荐答案

看起来在配置中的额外依赖项和常规"依赖项之间有些差别还不清楚.提到plugins-1.5.7作为额外深度确实有效.我是在这里做一些依赖关系管理不善,还是那绿色的路要走?

Looks like there is somewhat quite unclear difference between extra-dependencies and "regular" dependencies in the configuration. Mentioning plugins-1.5.7 as extra-dep indeed works. Am I doing some dependency mismanagement here, or that's green way to go?

这就是应该的样子.问题在于Haskell软件包有两个主要档案: Hackage ,基本上包括每个软件包和以前的每个版本,以及 Stackage ,它是捆绑的Hackage的很大一部分.到相互兼容的软件包和版本的快照中. Stack默认情况下是从Stackage提取图形包,因此,如果您要使用Hackage中不在Stackage中的软件包,则还必须将其添加到stack.yamlextra-deps中.可以在Hackage文档的内容页面中找到该软件包是否在堆栈中(如果在Stackage上,则在分发"(Distributions)字段中将有一个条目).另外相关的是 Stackage Hoogle ,它使您可以在Stackage中搜索软件包名称,模块和标识符.快照.

That's how it is supposed to be. The issue is that there are two major archives of Haskell packages: Hackage, which includes basically every package and every version ever, and Stackage, which is a large subset of Hackage bundled into snapshots of mutually compatible packages and versions. Stack defaults to drawing packages from Stackage, so if you want to use a package from Hackage that is not in Stackage you have to also add it to the extra-deps of stack.yaml. Whether a package is in Stackage can be found the contents page of the package in the Hackage docs (if it is on Stackage, there will be an entry for it in the "Distributions" field). Also relevant is Stackage Hoogle, which lets you search for package names, modules and identifiers within a Stackage snapshot.

PS:要进一步了解Hackage,Stackage和Stack之间的关系,您可以看看我对 的答案和Cab的区别是什么? (如果您使用的是"package.yaml",则可以用"package.yaml"替换其中提到的".cabal文件".)

P.S.: For more on the relationship between Hackage, Stackage and Stack, you might have a look at my answer to What is the difference between Cabal and Stack? (You may replace any mentions of "the .cabal file" there by "package.yaml", if that's what you are using.)

这篇关于在哪里可以找到Haskell的正确软件包名称和版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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