|
This is the main module of the Curry Package Manager.
cpmBanner
:: String
|
main
:: IO ()
|
runWithArgs
:: Options -> IO ()
|
configOpts
:: Options -> ConfigOptions
|
depsOpts
:: Options -> DepsOptions
|
checkoutOpts
:: Options -> CheckoutOptions
|
installOpts
:: Options -> InstallOptions
|
uninstallOpts
:: Options -> UninstallOptions
|
infoOpts
:: Options -> InfoOptions
|
listOpts
:: Options -> ListOptions
|
searchOpts
:: Options -> SearchOptions
|
upgradeOpts
:: Options -> UpgradeOptions
|
linkOpts
:: Options -> LinkOptions
|
addOpts
:: Options -> AddOptions
|
newOpts
:: Options -> NewOptions
|
execOpts
:: Options -> ExecOptions
|
docOpts
:: Options -> DocOptions
|
defaultBaseDocURL
:: String
|
testOpts
:: Options -> TestOptions
|
diffOpts
:: Options -> DiffOptions
|
readLogLevel
:: String -> Either String LogLevel
|
readRcOption
:: String -> Either String (String,String)
|
readVersion'
:: String -> Either String (Int,Int,Int,Maybe String)
|
applyEither
:: [Options -> Either String Options] -> Options -> Either String Options
|
applyParse
:: [Options -> Either String Options] -> Either String Options
|
(>.>)
:: Either String a -> (a -> b) -> Either String b
|
optionParser
:: [String] -> ParseSpec (Options -> Either String Options)
|
checkRequiredExecutables
:: IO ()
|
checkExecutables
:: [String] -> IO [String]
|
configCmd
:: ConfigOptions -> Config -> IO ([LogEntry],Either LogEntry ())
|
updateCmd
:: Config -> IO ([LogEntry],Either LogEntry ())
|
depsCmd
:: DepsOptions -> Config -> IO ([LogEntry],Either LogEntry ())
|
infoCmd
:: InfoOptions -> Config -> IO ([LogEntry],Either LogEntry ())
|
printInfo
:: Config -> Bool -> Bool -> Package -> IO ([LogEntry],Either LogEntry ())
|
checkoutCmd
:: CheckoutOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
|
installCmd
:: InstallOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
|
installapp
:: CheckoutOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
Installs the application (i.e., binary) provided by a package. |
checkCompiler
:: Config -> Package -> IO ()
Checks the compiler compatibility. |
installExecutable
:: Config -> Package -> IO ([LogEntry],Either LogEntry ())
Installs the executable specified in the package in the bin directory of CPM (compare .cpmrc). |
uninstall
:: UninstallOptions -> Config -> IO ([LogEntry],Either LogEntry ())
|
uninstallPackageExecutable
:: Config -> Package -> IO ([LogEntry],Either LogEntry ())
|
tryFindVersion
:: String -> (Int,Int,Int,Maybe String) -> Repository -> IO ([LogEntry],Either LogEntry Package)
|
listCmd
:: ListOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
Lists all (compiler-compatible if lall
is false) packages
in the given repository.
|
filterCompatPkgs
:: Config -> [Package] -> Package
Returns the first package of a list of packages compatible to the current compiler (according to the given configuration). |
packageVersionAsTable
:: Config -> [Package] -> ([Int],[[String]])
|
showVersionIfCompatible
:: Config -> Package -> String
Shows the version of a package if it is compatible with the current compiler, otherwise shows the version in brackets. |
cpmInfo
:: String
|
searchCmd
:: SearchOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
Search in all (compiler-compatible) packages in the given repository. |
upgradeCmd
:: UpgradeOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
upgrade
command.
|
linkCmd
:: LinkOptions -> Config -> IO ([LogEntry],Either LogEntry ())
link
command.
|
addCmd
:: AddOptions -> Config -> IO ([LogEntry],Either LogEntry ())
add
command: copy the given package to the repository index
and package installation directory so that it is available as
any other package.
|
addPackageCmd
:: String -> Bool -> Config -> IO ([LogEntry],Either LogEntry ())
add --package
command: copy the given package to the repository index
and package installation directory so that it is available as
any other package.
|
useForce
:: String
|
addDependencyCmd
:: String -> Bool -> Config -> IO ([LogEntry],Either LogEntry ())
add --dependency
command: add the given package as a new
dependency to the current package.
|
docCmd
:: DocOptions -> Config -> IO ([LogEntry],Either LogEntry ())
doc
command: run curry doc
on the modules provided as an argument
or, if they are not given, on exported modules (if specified in the
package), on the main executable (if specified in the package),
or on all source modules of the package.
|
genPackageManual
:: DocOptions -> Config -> Package -> String -> IO ([LogEntry],Either LogEntry ())
Generate manual according to documentation specification of package. |
replaceSubString
:: String -> String -> String -> String
Replace every occurrence of the first argument by the second argument in a string (third argument). |
genDocForPrograms
:: DocOptions -> Config -> String -> String -> Package -> IO ([LogEntry],Either LogEntry ())
Generate program documentation: run curry doc
on the modules provided as an argument
or, if they are not given, on exported modules (if specified in the
package), on the main executable (if specified in the package),
or on all source modules of the package.
|
testCmd
:: TestOptions -> Config -> IO ([LogEntry],Either LogEntry ())
test
command: run curry check
on the modules provided as an argument
or, if they are not provided, on the exported (if specified)
or all source modules of the package.
|
curryModulesInDir
:: String -> IO [String]
Get the names of all Curry modules contained in a directory. |
diffCmd
:: DiffOptions -> Config -> Repository -> IO ([LogEntry],Either LogEntry ())
|
compiler
:: ExecOptions -> Config -> IO ([LogEntry],Either LogEntry ())
|
execCmd
:: ExecOptions -> Config -> IO ([LogEntry],Either LogEntry ())
|
execWithPkgDir
:: ExecOptions -> Config -> String -> IO ([LogEntry],Either LogEntry ())
|
execWithCurryPath
:: ExecOptions -> Config -> String -> IO ([LogEntry],Either LogEntry ())
|
computePackageLoadPath
:: Config -> String -> IO ([LogEntry],Either LogEntry String)
|
cleanPackage
:: Config -> LogLevel -> IO ([LogEntry],Either LogEntry ())
|
newPackage
:: NewOptions -> IO ([LogEntry],Either LogEntry ())
Creates a new package. |
packageNotFoundFailure
:: String -> IO ([LogEntry],Either LogEntry a)
Fail with a "package not found" message. |
compatPackageNotFoundFailure
:: Config -> String -> String -> IO ([LogEntry],Either LogEntry a)
Fail with a "compatible package not found" message and a comment |
curryPathCacheFile
:: String -> String
The name of the cache file in a package directory. |
baseVersionCacheFile
:: String -> String
The name of the cache file for the base version in a package directory. |
saveBaseVersionToCache
:: Config -> String -> IO ()
Saves baseVersion of config in local cache file in the given package dir. |
loadBaseVersionFromCache
:: String -> IO String
Loads baseVersion from local cache file in the given package dir. |
saveCurryPathToCache
:: Config -> String -> String -> IO ()
Saves package CURRYPATH in local cache file in the given package dir. |
getCurryLoadPath
:: Config -> String -> IO ([LogEntry],Either LogEntry String)
Gets CURRYPATH of the given package (either from the local cache file in the package dir or compute it). |
loadCurryPathFromCache
:: Config -> String -> IO ([LogEntry],Either LogEntry (Maybe String))
Restores package CURRYPATH from local cache file in the given package dir, if it is still up-to-date, i.e., it exists and is newer than the package specification. |
cleanCurryPathCache
:: String -> IO ([LogEntry],Either LogEntry ())
Cleans the local cache file for CURRYPATH. |
Constructors:
Constructors:
NoCommand
:: Command
Config
:: ConfigOptions -> Command
Deps
:: DepsOptions -> Command
Checkout
:: CheckoutOptions -> Command
Install
:: InstallOptions -> Command
Uninstall
:: UninstallOptions -> Command
PkgInfo
:: InfoOptions -> Command
Compiler
:: ExecOptions -> Command
Update
:: Command
List
:: ListOptions -> Command
Search
:: SearchOptions -> Command
Upgrade
:: UpgradeOptions -> Command
Link
:: LinkOptions -> Command
Add
:: AddOptions -> Command
Exec
:: ExecOptions -> Command
Doc
:: DocOptions -> Command
Test
:: TestOptions -> Command
Diff
:: DiffOptions -> Command
New
:: NewOptions -> Command
Clean
:: Command
Constructors:
ConfigOptions
:: Bool -> ConfigOptions
Fields:
configAll
:: Bool
Constructors:
DepsOptions
:: Bool -> DepsOptions
Fields:
depsPath
:: Bool
Constructors:
CheckoutOptions
:: String -> (Maybe Version) -> Bool -> CheckoutOptions
Fields:
coPackage
:: String
coVersion
:: (Maybe Version)
coPrerelease
:: Bool
Constructors:
InstallOptions
:: (Maybe String) -> (Maybe Version) -> Bool -> Bool -> Bool -> InstallOptions
Fields:
instTarget
:: (Maybe String)
instVersion
:: (Maybe Version)
instPrerelease
:: Bool
instExecutable
:: Bool
instExecOnly
:: Bool
Constructors:
UninstallOptions
:: (Maybe String) -> (Maybe Version) -> UninstallOptions
Fields:
uninstPackage
:: (Maybe String)
uninstVersion
:: (Maybe Version)
Constructors:
InfoOptions
:: (Maybe String) -> (Maybe Version) -> Bool -> Bool -> InfoOptions
Fields:
infoPackage
:: (Maybe String)
infoVersion
:: (Maybe Version)
infoAll
:: Bool
infoPlain
:: Bool
Constructors:
ListOptions
:: Bool -> Bool -> Bool -> ListOptions
Fields:
listVers
:: Bool
listCSV
:: Bool
listCat
:: Bool
Constructors:
SearchOptions
:: String -> Bool -> Bool -> SearchOptions
Fields:
searchQuery
:: String
searchModule
:: Bool
searchExec
:: Bool
Constructors:
UpgradeOptions
:: (Maybe String) -> UpgradeOptions
Fields:
upgrTarget
:: (Maybe String)
Constructors:
LinkOptions
:: String -> LinkOptions
Fields:
lnkSource
:: String
Constructors:
AddOptions
:: Bool -> Bool -> String -> Bool -> AddOptions
Fields:
addPackage
:: Bool
addDependency
:: Bool
addSource
:: String
forceAdd
:: Bool
Constructors:
NewOptions
:: String -> NewOptions
Fields:
projectName
:: String
Constructors:
ExecOptions
:: String -> ExecOptions
Fields:
exeCommand
:: String
Constructors:
DocOptions
:: (Maybe String) -> (Maybe [String]) -> Bool -> Bool -> Bool -> String -> DocOptions
Fields:
docDir
:: (Maybe String)
docModules
:: (Maybe [String])
docPrograms
:: Bool
docManual
:: Bool
docGenImports
:: Bool
docPackageURL
:: String
Constructors:
TestOptions
:: (Maybe [String]) -> TestOptions
Fields:
testModules
:: (Maybe [String])
Constructors:
DiffOptions
:: (Maybe Version) -> (Maybe [String]) -> Bool -> Bool -> Bool -> DiffOptions
Fields:
diffVersion
:: (Maybe Version)
diffModules
:: (Maybe [String])
diffAPI
:: Bool
diffBehavior
:: Bool
diffUseAna
:: Bool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Installs the application (i.e., binary) provided by a package. This is done by checking out the package into CPM's application packages cache (default: $HOME/.cpm/apppackages, see APPPACKAGE_PATH in .cpmrc configuration file) and then install this package. Internal note: the installed package should not be cleaned or removed after the installation since its execution might refer (via the config module) to some data stored in the package. |
Checks the compiler compatibility. |
Installs the executable specified in the package in the bin directory of CPM (compare .cpmrc). |
|
|
|
Lists all (compiler-compatible if |
Returns the first package of a list of packages compatible to the current compiler (according to the given configuration). If there is no compatible package, returns the first one. |
|
Shows the version of a package if it is compatible with the current compiler, otherwise shows the version in brackets. |
|
Search in all (compiler-compatible) packages in the given repository. |
|
|
|
|
|
|
|
Generate manual according to documentation specification of package. |
Replace every occurrence of the first argument by the second argument in a string (third argument). |
Generate program documentation:
run |
|
Get the names of all Curry modules contained in a directory. Modules in subdirectories are returned as hierarchical modules. |
|
|
|
|
|
|
|
Creates a new package. |
Fail with a "package not found" message. |
Fail with a "compatible package not found" message and a comment |
The name of the cache file in a package directory. |
The name of the cache file for the base version in a package directory. |
Saves baseVersion of config in local cache file in the given package dir. |
Loads baseVersion from local cache file in the given package dir. |
Saves package CURRYPATH in local cache file in the given package dir. |
Gets CURRYPATH of the given package (either from the local cache file in the package dir or compute it). |
Restores package CURRYPATH from local cache file in the given package dir, if it is still up-to-date, i.e., it exists and is newer than the package specification. |
Cleans the local cache file for CURRYPATH. This might be necessary for upgrade/install/link commands. |