Module CPM.Repository.Select

Author
Michael Hanus
Version
November 2024

Some queries on the repository cache.


DO NOT EDIT THIS FILE SINCE IT IS AUTO-GENERATED BY CURRYPP #

Exported Functions


searchNameSynopsisModules :: Config -> String -> ErrorLogger [Package]  Non-deterministic 

Returns the packages of the repository containing a given string in the name, synopsis, or exported modules. In each package, the name, version, synopsis, and compilerCompatibility is set.


searchExportedModules :: Config -> String -> ErrorLogger [Package]  Non-deterministic 

Returns the packages of the repository containing a given module in the list of exported modules. In each package, the name, version, synopsis, compilerCompatibility, and exportedModules is set.


searchExecutable :: Config -> String -> ErrorLogger [Package]  Non-deterministic 

Returns the packages of the repository containing a given string in the name of the executable. In each package, the name, version, synopsis, compilerCompatibility, and executableSpec is set.


getRepositoryWithNameVersionSynopsis :: Config -> ErrorLogger Repository  Non-deterministic 

Returns the complete repository where in each package the name, version, synopsis, and compilerCompatibility is set.


getRepositoryWithNameVersionSynopsisDeps :: Config -> ErrorLogger Repository  Non-deterministic 

Returns the complete repository where in each package the name, version, synopsis, dependencies and compilerCompatibility is set.


getRepositoryWithNameVersionCategory :: Config -> ErrorLogger Repository  Non-deterministic 

Returns the complete repository where in each package the name, version, category, and compilerCompatibility is set.


getBaseRepository :: Config -> ErrorLogger Repository  Non-deterministic 

Returns the complete repository where in each package the name, version, dependencies, and compilerCompatibility is set. The information is read either from the cache DB or from the cache file.


getRepoForPackageSpec :: Config -> Package -> ErrorLogger Repository  Non-deterministic 

Returns the repository containing all packages and dependencies (in all versions) mentioned in the given package specification. In each package the name, version, dependencies, and compilerCompatibility is set. The information is read either from the cache DB or from the cache file.


getRepoForPackages :: Config -> [String] -> ErrorLogger Repository  Non-deterministic 

Returns the repository containing only packages of the second argument and all the packages on which they depend (including all versions). In each package the name, version, dependencies, and compilerCompatibility is set. The information is read either from the cache DB or from the cache file.


getAllPackageVersions :: Config -> String -> Bool -> ErrorLogger [Package]  Non-deterministic 

Retrieves all versions of a package with a given name from the repository.

:: Config  the current CPM configuration
-> String  the package name to be retrieved
-> Bool  should pre-release versions be included?
-> ErrorLogger [Package] 

getPackageVersion :: Config -> String -> (Int, Int, Int, Maybe String) -> ErrorLogger (Maybe Package)  Non-deterministic 

Retrieves a package with a given name and version from the repository.

:: Config  the current CPM configuration
-> String  the package name to be retrieved
-> Version  the requested version of the package
-> ErrorLogger (Maybe Package) 

addPackageToRepositoryCache :: Config -> Package -> ErrorLogger ()  Non-deterministic 

Adds a new package to the repository cache. In the file-based implementation, we simply clean the cache files.


updatePackageInRepositoryCache :: Config -> Package -> ErrorLogger ()  Non-deterministic 

Updates an existing package in the repository cache. In the file-based implementation, we simply clean the cache files.