This module implements functionality surrounding the package repository. The repository is the index of all packages known to the package manager. It contains metadata about the packages, such as their names, versions dependencies and where they can be acquired. The repository does not contain the actual packages. For a list of packages that are currently installed locally, you can consult the database.
emptyRepository
:: Repository
Creates an empty repository. |
findAllVersions
:: Repository -> String -> Bool -> [Package]
Finds all versions of a package known to the repository. |
searchPackages
:: Repository -> Bool -> Bool -> String -> [[Package]]
Search the names and synopses of all compiler-compatbile packages in the repository for a particular term. |
listPackages
:: Repository -> [[Package]]
Get all packages in the repository and group them by versions (newest first). |
findLatestVersion
:: Config -> Repository -> String -> Bool -> Maybe Package
Finds the latest compiler-compatbile version of a package. |
findVersion
:: Repository -> String -> (Int,Int,Int,Maybe String) -> Maybe Package
Finds a specific version of a package. |
allPackages
:: Repository -> [Package]
Get all packages in the central package index. |
readRepository
:: Config -> IO Repository
Reads all package specifications from the default repository. |
updateRepository
:: Config -> IO ([LogEntry],Either LogEntry ())
Updates the package index from the central Git repository. |
updateRepositoryCache
:: Config -> IO ()
Updates the repository cache with the current repository index. |
Constructors:
Creates an empty repository.
|
Finds all versions of a package known to the repository. Returns the packages sorted from newest to oldest.
|
Search the names and synopses of all compiler-compatbile packages in the repository for a particular term. Lower/upercase is ignored for the search. Returns all matching versions (newest first) of each package.
|
Get all packages in the repository and group them by versions (newest first).
|
Finds the latest compiler-compatbile version of a package.
|
Finds a specific version of a package. |
Get all packages in the central package index.
|
Reads all package specifications from the default repository. Use the cache if is present or update the cache after reading. If some errors occur, show them and terminate with exit status.
|
Updates the package index from the central Git repository. Cleans also the global package cache in order to support downloading the newest versions. |
Updates the repository cache with the current repository index. |