-
Notifications
You must be signed in to change notification settings - Fork 644
Installing an Idris Development version in a Cabal sandbox
NOTE: Cabal's Sandbox feature is now obsolete (see: https://github.com/haskell/cabal/issues/6866)
This page documents how a development version of Idris
can be installed using cabal-sandboxes.
These instructions have been tested on both Ubuntu 14.04 LTS and Debian Jessie, however, it is assumed that most of these instructions should apply equally well to other systems.
While not strictly necessary, it can be convenient to have highlight-versions installed. highlight-versions
can be used to easily see the dependencies that would be installed.
cabal install highlight-versions
export PATH=$PATH:.cabal-sandbox/bin
The first step in our installation process is to install external and internal dependencies that can be satisfied by our system's package manager. Instructions for your favourite platform are available..
With the dependencies resolved we can then set up our installation environment. First we obtain the latest version:
git clone git://github.com/idris-lang/Idris-dev dev
Second we step into that directory, and turn it into a sandbox:
cd dev
cabal sandbox init
cabal update
If you are interested in the dependencies that will be installed during installation , the following command will list them.
cabal install --dry-run --only-dependencies | highlight-versions
If not the dependencies can be installed directly as follows:
cabal install --only-dependencies
Once you have installed those dependencies, you can just install Idris itself, in the simplest case with just make
make
When using cabal sandboxes, binary files are installed within the sandbox in .cabal-sandbox/bin
.
As such the development idris environment will also be installed in ./.cabal-sandbox/
.
You can call the development version of Idris
from the git repository's root as follows:
./.cabal-sandbox/bin/idris
However, if you wish to make use of this development version in other projects on your system, then consider adding ./.cabal-sandbox/bin
to your PATH
.
There are a few simple steps you can follow to ensure that your development version is kept up-to-date when following bleeding edge Idris development.
- Never work on the
master
branch. Also work on dev branches that your create. - Periodically ensure your copy of
master
is up to date. The git commands are:
git checkout master
git fetch upstream master
git merge upstream/master
- When rebuilding Idris in your sandbox, it is a good idea to make sure that
libs/
has been purged of allibc
files. Sometimes during development files inlibs/
can become renamed or the generatedibc
files become stale. Although, themakefile
does have arelic
target it sometimes doesn't catch all theibc
files that are no longer tracked by Idris. Thus running the command (or windows equivalent) is good to purgelibs
of all generatedibc
files.
find libs -name "*.ibc" -delete
Binary Packages
Tool Support
Community
- Libraries, available elsewhere
- Idris Developer Meetings
- The Zen of Idris
- Non English Resources
Development