Module CPM.Resolution

This module contains the dependency resolution algorithm.

Summary of exported operations:

resolveDependenciesFromLookupSet :: Config -> Package -> LookupSet -> IO ([LogEntry],Either LogEntry ResolutionResult)   
Resolves the dependencies of a package using packages from a lookup set, inside an error logger.
resolve :: Config -> Package -> LookupSet -> ResolutionResult   
Resolves the dependencies of a package using packages from a lookup set.
resolvedPackages :: ResolutionResult -> [Package]   
Gives a list of all activated packages for a successful resolution.
resolutionSuccess :: ResolutionResult -> Bool   
Was a resolution successful?
showDependencies :: ResolutionResult -> String   
Renders a dependency tree from a successful resolution.
showConflict :: ResolutionResult -> String   
Renders a conflict resolution into a textual representation.
showResult :: ResolutionResult -> String   
Renders a resolution result into a textual representation for the user.
allTransitiveDependencies :: LookupSet -> String -> [String]   
transitiveDependencies :: LookupSet -> Package -> [String]   
isCompatibleToCompiler :: Config -> Package -> Bool   

Exported datatypes:


ResolutionResult

Result of a resolution run. In case of success, it contains the original package as well as a list of resolved packages. If the resolution failed, it contains the conflict tree.

Constructors:


Exported operations:

resolveDependenciesFromLookupSet :: Config -> Package -> LookupSet -> IO ([LogEntry],Either LogEntry ResolutionResult)   

Resolves the dependencies of a package using packages from a lookup set, inside an error logger.

resolve :: Config -> Package -> LookupSet -> ResolutionResult   

Resolves the dependencies of a package using packages from a lookup set.

resolvedPackages :: ResolutionResult -> [Package]   

Gives a list of all activated packages for a successful resolution.

resolutionSuccess :: ResolutionResult -> Bool   

Was a resolution successful?

Further infos:
  • solution complete, i.e., able to compute all solutions

showDependencies :: ResolutionResult -> String   

Renders a dependency tree from a successful resolution.

showConflict :: ResolutionResult -> String   

Renders a conflict resolution into a textual representation.

showResult :: ResolutionResult -> String   

Renders a resolution result into a textual representation for the user. In case of success, the dependency tree is shown. In case of failure, information on the cause of the conflict is shown.

allTransitiveDependencies :: LookupSet -> String -> [String]   

transitiveDependencies :: LookupSet -> Package -> [String]   

Properties:

transitiveDependencies db pkg -=- ["B","C"] where pkg = cPackage "A" (0,0,1,Nothing) [cDep "B" ">= 1.0.0",cDep "C" "= 1.2.0"] b = cPackage "B" (1,0,9,Nothing) [] c = cPackage "C" (1,2,0,Nothing) [] db = cDB [b,c] (test_transitiveDependencies_simpleCase)
transitiveDependencies db pkg -=- ["B","C"] where pkg = cPackage "A" (0,0,1,Nothing) [cDep "B" ">= 1.0.0",cDep "C" "= 1.2.0"] b = cPackage "B" (1,0,0,Nothing) [cDep "C" "= 1.2.0"] c = cPackage "C" (1,2,0,Nothing) [cDep "B" ">= 1.0.0"] db = cDB [b,c] (test_transitiveDependencies_loop)
transitiveDependencies db pkg -=- ["B","D","C"] where pkg = cPackage "A" (0,0,1,Nothing) [cDep "B" ">= 1.0.0"] b100 = cPackage "B" (1,0,0,Nothing) [cDep "C" "= 1.0.0"] b110 = cPackage "B" (1,1,0,Nothing) [cDep "D" "= 1.0.0"] c = cPackage "C" (1,0,0,Nothing) [] d = cPackage "D" (1,0,0,Nothing) [] db = cDB [b100,b110,c,d] (test_transitiveDependencies_multipleVersions)

isCompatibleToCompiler :: Config -> Package -> Bool