You can use ghc-pkg find-module instead of list , which immediately gives you the installed version of the package containing the module:
- Fire ghci
:load YourModule.hs , get :info from your value- Use the name of this module with
ghc-pkg find-module . - Now you know the exact module, package and version.
This still forces you to check the hack documentation. However, if you add documentation: true to your cabinet configuration or --enable-documentation , cabal will automatically create documentation during the installation of this package. Then you can shorten the procedure to
- Fire ghci
:load YourModule.hs , get :info from your value- Check your local documentation for the link module.
The local documentation will be saved in your cabal directory or, if you are in a sandboxed environment, in .cabal-sandbox/share/doc/<plattform>/index.html .
source share