Which Haskell package contains given module

By : luntain
Source: Stackoverflow.com
Question!

I know a Haskell module name, but I can't figure out in what package it is defined. This is bad because I can't compile without a package exposing this module.

Specificaly it is Text.Regex that I can't locate, but I would like to know how to solve that problem in general.

By : luntain


Answers

If you are using Debian and the Debian-provided packages, there is a global documentation index at /usr/share/doc/ghc-doc/html/libraries/index.html which lists the package in the last column.



If you're using Cabal and you have the package installed, you can just try to compile it with cabal build, and Cabal will inform you of which package you forgot to add to your dependencies:

Main.hs:1:8:
    Could not find module `Text.Regex':
      It is a member of the hidden package `regex-compat-0.93.1'.
      Perhaps you need to add `regex-compat' to the build-depends in your .cabal file.
      Use -v to see a list of the files searched for.
By : hammar


The best tools are:

Both are search engines for Haskell modules and functions.



This video can help you solving your question :)
By: admin