Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-tools
Commits
c76a3422
Commit
c76a3422
authored
May 10, 2017
by
Michael Hanus
Browse files
CPM updated
parent
849ff959
Changes
16
Hide whitespace changes
Inline
Side-by-side
cpm/docs/manual.tex
View file @
c76a3422
...
...
@@ -272,12 +272,13 @@ of this default path).
To use the dependencies of a package, the Curry compiler needs to be
started via CPM so that the compiler will know where to search for the
modules provided. You can use the
\
code
{
cpm curry
}
command
to start the
modules provided. You can use the
command
\c
code
{
cpm curry
}
to start the
Curry compiler (which is either the compiler used to install CPM
or specified with the configuration option
\code
{
curry
_
bin
}
,
or specified with the configuration option
\code
{
CURRY
_
BIN
}
,
see Section~
\ref
{
sec:config
}
).
Any parameters given to
\code
{
cpm curry
}
will be passed along verbatim to
the Curry compiler, for example the following will start the Curry
Any parameters given to
\ccode
{
cpm curry
}
will be passed along verbatim to
the Curry compiler.
For example, the following will start the Curry
compiler, print the result of evaluating the expression
\code
{
39+3
}
and then quit.
...
...
@@ -285,10 +286,12 @@ and then quit.
> cpm curry :eval "39+3" :quit
\end{lstlisting}
%
To execute other Curry commands such as
\code
{
curry check
}
with the package's
dependencies available, you can use the
\code
{
cpm exec
}
command.
\code
{
cpm exec
}
will set the
\code
{
CURRYPATH
}
environment variable and then execute the command
it is given.
To execute other Curry commands, such as
\ccode
{
curry check
}
,
with the package's dependencies available,
you can use the
\ccode
{
cpm exec
}
command.
This command will set the
\code
{
CURRYPATH
}
environment variable
and then execute the command given after
\ccode
{
exec
}
.
\subsection
{
Replacing Dependencies with Local Versions
}
\label
{
sec:cpm-link
}
...
...
@@ -502,33 +505,36 @@ CPM can be configured via the \code{\$HOME/.cpmrc} configuration file. The
following list shows all configuration options and their default values.
\begin{description}
\item
[\fbox{\code{
repository_path
}}]
The path to the index repository.
\item
[\fbox{\code{
REPOSITORY_PATH
}}]
The path to the index repository.
Default value:
\code
{
\$
HOME/.cpm/index
}
.
\item
[\fbox{\code{
package_install_path
}}]
The path to the global package cache.
\item
[\fbox{\code{
PACKAGE_INSTALL_PATH
}}]
The path to the global package cache.
This is where all downloaded packages are stored.
Default value:
\code
{
\$
HOME/.cpm/packages
}
\item
[\fbox{\code{
bin_install_path
}}]
The path to the executables
\item
[\fbox{\code{
BIN_INSTALL_PATH
}}]
The path to the executables
of packages. This is the location where the compiled executables
of packages containing full applications are stored.
Hence, in order to use such applications, one should have this path
in the personal load path (environment variable
\code
{
PATH
}
).
Default value:
\code
{
\$
HOME/.cpm/bin
}
\item
[\fbox{\code{
app_package_path
}}]
\item
[\fbox{\code{
APP_PACKAGE_PATH
}}]
The path to the package cache where packages are checked out if only
their binaries are installed (see Section~
\ref
{
sec:installapp
}
).
Default value:
\code
{
\$
HOME/.cpm/app
_
packages
}
.
\item
[\fbox{\code{
curry_bin
}}]
\item
[\fbox{\code{
CURRY_BIN
}}]
The name of the executable of the Curry system used
to compile and test packages.
The default value is the binary of the Curry system which has been used
to compile CPM.
\end{description}
%
Note that one can override the values of these configuration options
Note that one write the option names also in lowercase or omit
the underscores. For instance, one can also write
\code
{
currybin
}
instead of
\code
{
CURRY
_
BIN
}
.
Moreover, one can override the values of these configuration options
by the CPM options
\code
{
-d
}
or
\code
{
--define
}
.
For instance, to install the binary
of the package
\code
{
spicey
}
in the directory
\code
{
\$
HOME/bin
}
,
...
...
@@ -544,7 +550,7 @@ one can execute the command
CPM's central package index is a Git repository containing package specification
files. A copy of this Git repository is stored on your local system in the
\code
{
\$
HOME/.cpm/index
}
directory, unless you changed the location using the
\code
{
repository
_
path
}
setting. CPM uses the package index when searching for
\code
{
REPOSITORY
_
PATH
}
setting. CPM uses the package index when searching for
and installing packages and during dependency resolution.
When a package is installed on the system, it is stored in the
...
...
@@ -840,7 +846,7 @@ some version of a package should be examined or installed
If a newest package should be installed, i.e., no specific version
number is provided, then only the newest version
which is compatible to the current Curry compiler
(see also Section~
\ref
{
sec:config
}
for configuration option
\code
{
curry
_
bin
}
)
(see also Section~
\ref
{
sec:config
}
for configuration option
\code
{
CURRY
_
BIN
}
)
is considered.
Similarly, the current package is executed
(CPM commands
\code
{
curry
}
and
\code
{
test
}
)
...
...
cpm/src/CPM/Config.curry
View file @
c76a3422
...
...
@@ -11,7 +11,7 @@ module CPM.Config
, readConfiguration, readConfigurationWithDefault, defaultConfig
, showCompilerVersion ) where
import Char (to
Low
er)
import Char (to
Upp
er)
import Directory (getHomeDirectory, createDirectoryIfMissing)
import Distribution (installDir, curryCompiler, curryCompilerMinorVersion
, curryCompilerMajorVersion)
...
...
@@ -152,22 +152,22 @@ mergeConfigSettings cfg props = applyEither setters cfg
unlines (map fst keySetters)
Just s -> \c -> Right $ s v c
--- Removes leading and trailing whitespace from option keys and values
--- and transforms option keys to
low
ercase.
--- Removes leading and trailing whitespace
s
from option keys and values
--- and transforms option keys to
upp
ercase
where underscores are removed
.
---
--- @param opts - the options
stripProps :: [(String, String)] -> [(String, String)]
stripProps = map ((map to
Lower
. strip) *** strip)
stripProps = map ((map to
Upper . filter (/='_')
. strip) *** strip)
--- A map from option names to functions that will update a configuration
--- record with a value for that option.
keySetters :: [(String, String -> Config -> Config)]
keySetters =
[ ("
repository_path
" , \v c -> c { repositoryDir = v })
, ("
package_install_path"
, \v c -> c { packageInstallDir = v})
, ("
bin_install_path"
, \v c -> c { binInstallDir = v})
, ("
app_package_path"
, \v c -> c { appPackageDir = v})
, ("
curry_bin
" , \v c -> c { curryExec = v})
[ ("
REPOSITORYPATH
" , \v c -> c { repositoryDir = v })
, ("
PACKAGEINSTALLPATH"
, \v c -> c { packageInstallDir = v
})
, ("
BININSTALLPATH"
, \v c -> c { binInstallDir = v
})
, ("
APPPACKAGEPATH"
, \v c -> c { appPackageDir = v
})
, ("
CURRYBIN
" , \v c -> c { curryExec = v
})
]
--- Sequentially applies a list of functions that transform a value to a value
...
...
cpm/vendor/boxes/package.json
View file @
c76a3422
{
"name"
:
"boxes"
,
"version"
:
"0.0.2"
,
"author"
:
"Jonas Oberschweiber <jonas@oberschweiber.com>"
,
"category"
:
[
"Printing"
],
"synopsis"
:
"A pretty printer for boxes"
,
"dependencies"
:
{},
"exportedModules"
:
[
"Boxes"
],
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/boxes.git"
,
"tag"
:
"$version"
}
"name"
:
"boxes"
,
"version"
:
"0.0.2"
,
"author"
:
"Jonas Oberschweiber <jonas@oberschweiber.com>"
,
"category"
:
[
"Printing"
],
"synopsis"
:
"A pretty printer for boxes"
,
"dependencies"
:
{},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"exportedModules"
:
[
"Boxes"
],
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/boxes.git"
,
"tag"
:
"$version"
}
}
cpm/vendor/cass-analysis/package.json
View file @
c76a3422
...
...
@@ -6,6 +6,10 @@
"category"
:
[
"Analysis"
],
"dependencies"
:
{
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/cass-analysis.git"
,
"tag"
:
"$version"
...
...
cpm/vendor/cass/package.json
View file @
c76a3422
...
...
@@ -7,6 +7,10 @@
"dependencies"
:
{
"cass-analysis"
:
">= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"configModule"
:
"CASS.PackageConfig"
,
"executable"
:
{
"name"
:
"cass"
,
...
...
cpm/vendor/det-parse/package.json
View file @
c76a3422
{
"name"
:
"det-parse"
,
"version"
:
"0.0.1"
,
"synopsis"
:
"Deterministic parser combinators"
,
"category"
:
[
"Parsing"
],
"author"
:
"Jonas Oberschweiber"
,
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/det-parse.git"
,
"tag"
:
"v0.0.1"
}
"name"
:
"det-parse"
,
"version"
:
"0.0.1"
,
"synopsis"
:
"Deterministic parser combinators"
,
"category"
:
[
"Parsing"
],
"author"
:
"Jonas Oberschweiber"
,
"dependencies"
:
{
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0"
,
"kics2"
:
">= 0.5.0"
},
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/det-parse.git"
,
"tag"
:
"v0.0.1"
}
}
cpm/vendor/json/package.json
View file @
c76a3422
{
"name"
:
"json"
,
"version"
:
"0.0.3"
,
"author"
:
"Jonas Oberschweiber"
,
"maintainer"
:
"Michael Hanus <mh@informatik.uni-kiel.de>"
,
"synopsis"
:
"A JSON library for Curry"
,
"name"
:
"json"
,
"version"
:
"0.0.3"
,
"author"
:
"Jonas Oberschweiber
<jonas@oberschweiber.com>
"
,
"maintainer"
:
"Michael Hanus <mh@informatik.uni-kiel.de>"
,
"synopsis"
:
"A JSON library for Curry"
,
"category"
:
[
"Data"
,
"Web"
],
"dependencies"
:
{
"det-parse"
:
"= 0.0.1"
},
"dependencies"
:
{
"det-parse"
:
"= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"exportedModules"
:
[
"JSON.Data"
,
"JSON.Parser"
,
"JSON.Pretty"
],
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/json.git"
,
"tag"
:
"$version"
}
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/json.git"
,
"tag"
:
"$version"
}
}
cpm/vendor/opt-parse/package.json
View file @
c76a3422
{
"name"
:
"opt-parse"
,
"version"
:
"0.0.3"
,
"author"
:
"Jonas Oberschweiber <jonas@oberschweiber.com>"
,
"category"
:
[
"Parsing"
],
"synopsis"
:
"An option parser for Curry"
,
"dependencies"
:
{
"det-parse"
:
">= 0.0.1"
,
"boxes"
:
">= 0.0.1"
},
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/opt-parse.git"
,
"tag"
:
"$version"
}
"name"
:
"opt-parse"
,
"version"
:
"0.0.3"
,
"author"
:
"Jonas Oberschweiber <jonas@oberschweiber.com>"
,
"category"
:
[
"Parsing"
],
"synopsis"
:
"An option parser for Curry"
,
"dependencies"
:
{
"det-parse"
:
">= 0.0.1"
,
"boxes"
:
">= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0"
,
"kics2"
:
">= 0.5.0"
},
"exportedModules"
:
[
"OptParse"
],
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/opt-parse.git"
,
"tag"
:
"$version"
}
}
currycheck/.cpm/packages/rewriting/package.json
View file @
c76a3422
...
...
@@ -14,6 +14,10 @@
PAKCS/KiCS2 distributions."
,
"category"
:
[
"Rewriting"
,
"Narrowing"
],
"dependencies"
:
{
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"exportedModules"
:
[
"Rewriting.CriticalPairs"
,
"Rewriting.Narrowing"
,
"Rewriting.Strategy"
,
"Rewriting.Unification"
,
"Rewriting.DefinitionalTree"
,
...
...
currypp/.cpm/packages/cass-analysis/package.json
View file @
c76a3422
...
...
@@ -6,6 +6,10 @@
"category"
:
[
"Analysis"
],
"dependencies"
:
{
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/cass-analysis.git"
,
"tag"
:
"$version"
...
...
currypp/.cpm/packages/cass/package.json
View file @
c76a3422
...
...
@@ -7,6 +7,10 @@
"dependencies"
:
{
"cass-analysis"
:
">= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"configModule"
:
"CASS.PackageConfig"
,
"executable"
:
{
"name"
:
"cass"
,
...
...
currypp/.cpm/packages/currycheck/package.json
View file @
c76a3422
...
...
@@ -7,6 +7,10 @@
"dependencies"
:
{
"rewriting"
:
">= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"configModule"
:
"CurryCheckConfig"
,
"executable"
:
{
"name"
:
"curry-check"
,
...
...
currypp/.cpm/packages/rewriting/package.json
View file @
c76a3422
...
...
@@ -14,6 +14,10 @@
PAKCS/KiCS2 distributions."
,
"category"
:
[
"Rewriting"
,
"Narrowing"
],
"dependencies"
:
{
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"exportedModules"
:
[
"Rewriting.CriticalPairs"
,
"Rewriting.Narrowing"
,
"Rewriting.Strategy"
,
"Rewriting.Unification"
,
"Rewriting.DefinitionalTree"
,
...
...
currypp/.cpm/packages/verify/package.json
View file @
c76a3422
...
...
@@ -10,6 +10,10 @@
"currycheck"
:
">= 1.0.0"
,
"rewriting"
:
">= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.10.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"exportedModules"
:
[
"ToVerifier"
,
"VerifyOptions"
,
"ToAgda"
],
"configModule"
:
"VerifyPackageConfig"
,
"executable"
:
{
...
...
optimize/.cpm/packages/cass-analysis/package.json
View file @
c76a3422
...
...
@@ -6,6 +6,10 @@
"category"
:
[
"Analysis"
],
"dependencies"
:
{
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/cass-analysis.git"
,
"tag"
:
"$version"
...
...
optimize/.cpm/packages/cass/package.json
View file @
c76a3422
...
...
@@ -7,6 +7,10 @@
"dependencies"
:
{
"cass-analysis"
:
">= 0.0.1"
},
"compilerCompatibility"
:
{
"pakcs"
:
">= 1.14.0, < 2.0.0"
,
"kics2"
:
">= 0.5.0, < 2.0.0"
},
"configModule"
:
"CASS.PackageConfig"
,
"executable"
:
{
"name"
:
"cass"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment