1# Idris Installation Guide
3Copyright (C) 2015, The Idris Community
5## Installing Idris from Hackage
7This repository represents the latest development version of the
8language, and may contain bugs that are being actively worked on. For
9those who wish to use a more stable version of Idris please consider
10installing the latest version that has been released on Hackage.
11Installation instructions for various platforms can be
12[found on the Idris Wiki](https://github.com/idris-lang/Idris-dev/wiki/Installation-Instructions).
14## Installing Development Versions
16If you like to work against the latest development version, please
17consider using Cabal Sandboxes to minimise disruption to your local
18Haskell setup. Instructions for installing Idris HEAD within a cabal
20[available on the Idris Wiki](https://github.com/idris-lang/Idris-dev/wiki/Installing-an-Idris-Development-version-in-a-sandbox).
22To configure, edit config.mk. The default values should work for most
25Idris is built using a Makefile common targets include:
27* `make` This will install everything using cabal and typecheck the
29* `make test` This target execute the test suite.
30* `make relib` This target will typecheck and recompile the standard
33Idris has an optional dependency on the `C` library `libffi`. If you
34would like to use the features that it enables, make sure that it is
35compiled for the same architecture as your Haskell compiler (e.g. 64
36bit libraries for 64 bit ghc). By default, Idris builds without it. To
37build with it, pass the flag `-f FFI`.
39A secondary optional dependency is on `libGMP`, this allows better
40support for numeric operations. As with `libFFI` Idris builds with out
41it, to enable `GMP` support use the flag `-f GMP`
43To build with `libffi` and `libGMP` by default, create a `custom.mk`
44file and add the following line to it:
46`CABALFLAGS += -f FFI -f GMP`
48The file `custom.mk-alldeps` is a suitable example.
50The continuous integration builds on travis-ci.org are built using the
51ghc-flag -Werror. To enable this behaviour locally also, please
52compile using `make CI=true` or adding the following line into
57If you are only compiling for installing the most current version, you
58can omit the CI flag, but please make sure you use it if you want to
61## Experimental Support for Building with Stack
63[Stack](https://github.com/commercialhaskell/stack) is a new
64cross-platform program for developing Haskell projects, that enhances
65the functionality provided by Cabal. There is experimental support for
66building Idris from source with stack.
67This installation has been tested on Ubuntu 16.04.1 LTS, and the current
70To build Idris with stack the following commands are recommended:
74This will install Idris (and related executables) into `./local/bin/`
75on Unix based systems and an appropriate place on Windows. If you
76haven't used stack before this will also setup the related
77infrastructure. For more information about Stack please visit the
78[Stack website](https://github.com/commercialhaskell/stack).
80On NixOS, please use the following command instead, to make sure
81the required libraries and header files are available:
87The flag `--system-ghc` can be added to enforce use of your system's
90### `libGMP` and `libFFI`
92By default the stack configuration in `stack.yaml` will build with
93support for `libGMP` and `libFFI`. To turn this support off, the
94option flags needs to be fully commented out.
96There have been reports in the past over building Idris on Mac OS X,
97using stack, and linking to a HomeBrew installation of `libFFI`. The
98build has failed to find the correct `libFFI` installation. If you
99encounter this then the fix is to augment the `PKG_CONFIG_PATH` for
100`libFFI`. For example:
103PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig stack build
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list