inventory: Project statistics and definition analysis

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/aaronallen8455/inventory#readme


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4
Change log ChangeLog.md
Dependencies appendmap (>=0.1.5 && <0.2), base (>=4.7 && <5), bytestring (>=0.10.12 && <0.11), containers (>=0.6.2 && <0.7), directory (>=1.3.6 && <1.4), filepath (>=1.4.2 && <1.5), ghc (>=8.8 && <8.11), ghc-paths (>=0.1.0 && <0.2), inventory, mtl (>=2.2.2 && <2.3) [details]
License BSD-3-Clause
Copyright 2021 Aaron Allen
Author Aaron Allen
Maintainer aaronallen8455@gmail.com
Category Utility
Home page https://github.com/aaronallen8455/inventory#readme
Bug tracker https://github.com/aaronallen8455/inventory/issues
Source repo head: git clone https://github.com/aaronallen8455/inventory
Uploaded by aaronallen8455 at 2021-02-20T23:14:10Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for inventory-0.1.0.0

[back to package description]

Inventory

This is a utility that provides a variety of statistics about your Haskell project. These include:

Using inventory

Inventory uses .hie files to gather information about all haskell files in the project. Once you have generated .hie files for your project, execute inventory from your project's root.

How to generate .hie files

Cabal

Add this to your cabal.project.local file:

package *
  ghc-options: -fwrite-ide-info -hiedir=.hie

Then do a full rebuild of the project:

cabal clean
cabal build all

Stack

Add this to your stack.yaml file:

ghc-options:
  "$locals": -fwrite-ide-info
             -hiedir=.hie

Then do a full rebuild:

stack clean
stack build

Examples

Here are some excerpts of the output that was produced by running inventory on the stack codebase:

Definition counts

Definiton counts image

Most used definitions

Most used image

Matching type signatures

Equivalent signatures image

The output for matching signatures can be useful for discovering functions that are duplicates of one another. For instance, the packageIdent and packageIdentifier functions in the above output turned out to be duplicates.

Known Issues/Limitations