Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
tools:cpm [2017-02-01 13:21] – created mh | tools:cpm [2017-02-01 13:36] – [Overview] mh | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Overview ===== | ===== Overview ===== | ||
+ | |||
+ | The Curry Package Manager (CPM) is a tool to distribute and | ||
+ | install Curry libraries and manage version dependencies | ||
+ | between these libraries. | ||
+ | These libraries are organized in packages. | ||
+ | There is a central index of all these packages which can | ||
+ | easily be downloaded by CPM. | ||
+ | The individual packages are currently not stored in a central | ||
+ | server but their source can be anywhere. | ||
+ | CPM organizes the automatic access to appropriate versions | ||
+ | of these packages so that a user does not need to know | ||
+ | about these details. | ||
+ | |||
+ | Currently, there is no support for automatically uploading | ||
+ | new packages. However, if you have developed an interesting package, | ||
+ | please write to '' | ||
+ | it publish to other users. | ||
+ | ===== Installing the Curry Package Manager ===== | ||
+ | |||
+ | The installation assumes that one of the Curry systems PAKCS or KiCS2 | ||
+ | in installed and the executables '' | ||
+ | If '' | ||
+ | of the variable '' | ||
+ | Otherwise, perform the following steps to install CPM: | ||
+ | |||
+ | 1> git clone https:// | ||
+ | 2> cd cpm | ||
+ | 3> make | ||
+ | |||
+ | If this was successful, the binary '' | ||
+ | directory '' | ||
+ | in your path or create a symbolic link from some path directory | ||
+ | to this binary. | ||
+ | |||
+ | ===== Quick Start ===== | ||
+ | |||
+ | Now you can clone a copy of the central package index repository by | ||
+ | |||
+ | > cpm update | ||
+ | |||
+ | You can show a short list of all packages in this index by | ||
+ | |||
+ | > cpm list | ||
+ | |||
+ | The command | ||
+ | |||
+ | > cpm info PACKAGE | ||
+ | |||
+ | can be used to see more information about a package. | ||
+ | |||
+ | In order to use a package in your Curry program which you intend | ||
+ | to develop, you have to start a new project. | ||
+ | Note that your project can also contribute to the Curry packages. | ||
+ | Therefore, to initialize it and use other packages, you need | ||
+ | a package description file in some project directory. | ||
+ | All this can be created by the command '' | ||
+ | some questions: | ||
+ | |||
+ | > cpm new | ||
+ | Create a new package | ||
+ | -------------------- | ||
+ | What is the name of the new package? myproject | ||
+ | What is the first version of the package? [0.0.1] | ||
+ | Who is the author of the package? Joe Curry < | ||
+ | Please provide a short (one line) summary of what the package does: | ||
+ | > This is just for testing. | ||
+ | A new package in the directory ' | ||
+ | Please go into this directory, add dependencies in ' | ||
+ | and run 'cpm install' | ||
+ | |||
+ | As you will see, an initial package description file '' | ||
+ | and a subdirectory '' | ||
+ | for your project, write it as a dependency in '' | ||
+ | Then run | ||
+ | |||
+ | > cpm install | ||
+ | |||
+ | to install all dependencies of the current package. | ||
+ | Afterwards, start your interactive Curry environment by | ||
+ | |||
+ | > cpm curry | ||
+ | |||
+ | and you will be able to load the modules of the used packages. | ||
+ | In particular, the source directory '' | ||
+ | so that you can directly load any program you have stored | ||
+ | in this directory. | ||
+ | |||
+ | For further information, | ||