0

How we can find a "name" of package to include in package.yaml in list of dependences, which is corresponds to a particular "import" sentence in a haskell source file? For instance. In a hs source code I need to have something like

import Systm.Arch

What the name of the package to put into the package.yaml file in the list of dependences? It should be something like:

... 
dependences:
- base >= 4.7 && < 5
- <package_name_corresponding_to "import System.Arch">

Where can I find such a list, suiteable for package.yaml or cabal file? Thank you in advance. P.S. For instance, if I had in hs code

import Data.Time

in package.yaml, I have this sting

- time 
sjakobi
  • 3,546
  • 1
  • 25
  • 43
Forestshield
  • 101
  • 6
  • 1
    Does this answer your question? [Where can I find correct package name and version for Haskell?](https://stackoverflow.com/questions/48854832/where-can-i-find-correct-package-name-and-version-for-haskell) – Mark Seemann Oct 07 '20 at 20:17
  • Yo can search this with [Hoogle](https://hoogle.haskell.org/?hoogle=System.Arch&scope=set%3Astackage). For [`System.Arch`](https://hackage.haskell.org/package/cpu-0.1.2/docs/System-Arch.html), it is likely the [`cpu` package](https://hackage.haskell.org/package/cpu-0.1.2). – Willem Van Onsem Oct 07 '20 at 20:18

1 Answers1

0

Use Hoogle. E.g. if you look for Data.Map, you see it is in the containers package (green text below the result): https://hoogle.haskell.org/?hoogle=Data.Map&scope=set%3Astackage

Sir4ur0n
  • 1,753
  • 1
  • 13
  • 24