The Curry Package Manager

This repository contains the Curry package manager (CPM).

Quick Start

To build the Curry package manager, you need to run make inside this directory. The Makefile assumes that the curry executable and git are on your path. If the build was successful, a cpm binary will be placed in the directory ~/.cpm/bin (which is also the directory where CPM installs binaries of tools distributed in packages). Therefore, you should add this directory to your path. Afterwards, run cpm update to clone a copy of the central package index repository. More information can be found in the manual, see the docs directory.


Use make manual to generate a PDF version of the manual. A working LaTeX installation is required. make doc generates the CurryDoc documentation for the CPM source code in the cdoc directory.


Please run the tests using make test before publishing your changes. You should also run the performance tests when you make changes to the API or behavior comparison modules or the resolution algorithm. To run the performance tests, build the performance test program using make buildperf. You can then use bin/perftest to execute the different performance test.

To test the API comparison algorithm, use bin/perftest api -n NUMBER, where NUMBER is the number of added, changed and removed functions and types each that you want to compare. Note that when you specify 1000, the API comparison will compare 6000 elements: 1000 added functions, 1000 removed functions, 1000 changed functions, 1000 added types, 1000 removed types, and 1000 changed types.

The behavior comparison algorithm can be tested using bin/perftest behavior -t T -f F, where F is the number of functions to compare and T is the depth to which the type of each function's argument is nested. For example, if T is set to 2, each generated function will take a type Nested1, which is defined as follows:

data Nested1 = Nested1 Nested2
data Nested2 = Nested2 String

To test the resolution algorithm, you need a set of test data, which you can find in the cpm-perf-test-data repository. Make sure that packages.term from thate repository is available in the current directory and then run bin/perftest resolution --packages=P, where P is a comma-separated list of package identifiers. A complete list of package identifiers available in the test data set can be found in the packages.txt file alongside packages.term. A good set of packages to start with is the following: