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

Data.Prune.ApplyStrategy.Smart

Description

 
Synopsis

Documentation

data StripTarget Source #

A type for which target we're trying to strip.

Constructors

StripTargetBaseLibrary

The base library

StripTargetCompilable Compilable

Any library, executable, test-suite, benchmark, etc stanza.

StripTargetCommonStanza (Set CommonName)

Any common stanza matching the set.

dependencyNameRegex :: Regex Source #

Regex for dependency names like base <5.0.

matchDependencyName :: String -> Maybe DependencyName Source #

Parse a dependency name from a string.

stripOneBuildDepends :: String -> Set DependencyName -> Maybe String Source #

Strip matching dependencies from a single line.

stripBuildDepends :: [String] -> Set DependencyName -> [String] Source #

Strip matching dependencies from a build-depends section.

stripNestedSection :: NestedSection -> Set DependencyName -> (NestedSection, Set CommonName) Source #

Strip matching dependencies from a nested section.

stripNestedSections :: [NestedSection] -> Set DependencyName -> ([NestedSection], Set CommonName) Source #

Strip matching dependencies from many nested sections.

stripSection :: Section -> Set DependencyName -> StripTarget -> (Section, Set CommonName) Source #

Strip dependencies from any top-level section.

stripSections :: [Section] -> Set DependencyName -> Maybe Compilable -> [Section] Source #

Strip dependencies from many top-level sections.