prune-juice-0.7: Prune unused Haskell dependencies
Safe HaskellNone
LanguageHaskell2010

Data.Prune.Dependency

Description

 
Synopsis

Documentation

parsePkg :: MonadLogger m => Text -> m (Maybe (DependencyName, Set ModuleName)) Source #

Parse a single package output from ghc-pkg.

getCabalRawGhcPkgs :: FilePath -> IO String Source #

Get the combined dump for the locations cabal uses for ghc-pkg.

getStackRawGhcPkgs :: IO String Source #

Get the combined dump for the locations stack uses for ghc-pkg.

getDependencyByModule :: (MonadIO m, MonadLogger m) => FilePath -> BuildSystem -> [Package] -> m (Map ModuleName (Set DependencyName)) Source #

For the dependencies listed in the specified packages, load ghc-pkg and inspect the exposed-modules field. Return a map of module to dependency name.