Where can I find correct package name and version for Haskell?

前端 未结 3 1648
既然无缘
既然无缘 2020-12-18 07:41

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://hackag

3条回答
  •  無奈伤痛
    2020-12-18 07:53

    Say, I need System.Eval.Haskell. Or whatever else. How do I know which package I should specify in my package.yaml?

    There may be many packages which export a particular module, so you can't necessarily know which package to import from the module name. But generally it's obvious from a google search.

    As duplode mentions the package is named plugins, and as you found out stack uses the - format to specify a package name + version in the stack.yaml. Cabal uses a different format, which is more flexible (can specify fuzzy package version ranges, etc.). Since stack works on fixed snapshots of package versions, the plugins-1.5.7 format is sufficient.

    When you write plugins in your *.cabal file, you're specifying something like "any version of plugins but prefer the most recent". But because your package repository is limited to a particular snapshot by stack what you're really doing is letting stack manage your dependencies.

提交回复
热议问题