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

Data.Prune.ImportParser

Description

 
Synopsis

Documentation

parseFileImports :: FilePath -> IO (Either String (Set ModuleName)) Source #

Parse a Haskell source file's imports.

getUsedDependencies :: Map ModuleName (Set DependencyName) -> Set ModuleName -> Set DependencyName Source #

Get the dependencies used by a list of modules imported by a Haskell source file.

getCompilableUsedDependencies :: (MonadIO m, MonadLogger m) => Map ModuleName (Set DependencyName) -> Compilable -> m (Set DependencyName) Source #

Get the dependencies used by a thing to compile by (1) parsing each source file's imports, (2) getting the dependencies each of those files use, and (3) smooshing all the dependencies together to return.