@@ -0,0 +1,93 @@
1+# Idris Installation Guide
2+
3+Copyright (C) 2015, The Idris Community
4+
5+## Installing Idris from Hackage
6+
7+This repository represents the latest development version of the
8+language, and may contain bugs that are being actively worked on. For
9+those who wish to use a more stable version of Idris please consider
10+installing the latest version that has been released on Hackage.
11+Installation instructions for various platforms can be
12+[found on the Idris Wiki](https://github.com/idris-lang/Idris-dev/wiki/Installation-Instructions).
13+
14+## Installing Development Versions
15+
16+If you like to work against the latest development version, please
17+consider using Cabal Sandboxes to minimise disruption to your local
18+Haskell setup. Instructions for installing Idris HEAD within a cabal
19+sandbox are
20+[available on the Idris Wiki](https://github.com/idris-lang/Idris-dev/wiki/Installing-an-Idris-Development-version-in-a-sandbox).
21+
22+To configure, edit config.mk. The default values should work for most
23+people.
24+
25+Idris is built using a Makefile common targets include:
26+
27+* `make` This will install everything using cabal and typecheck the
28+ libraries.
29+* `make test` This target execute the test suite.
30+* `make relib` This target will typecheck and recompile the standard
31+ library.
32+
33+Idris has an optional dependency on the `C` library `libffi`. If you
34+would like to use the features that it enables, make sure that it is
35+compiled for the same architecture as your Haskell compiler (e.g. 64
36+bit libraries for 64 bit ghc). By default, Idris builds without it. To
37+build with it, pass the flag `-f FFI`.
38+
39+A secondary optional dependency is on `libGMP`, this allows better
40+support for numeric operations. As with `libFFI` Idris builds with out
41+it, to enable `GMP` support use the flag `-f GMP`
42+
43+To build with `libffi` and `libGMP` by default, create a `custom.mk`
44+file and add the following line to it:
45+
46+`CABALFLAGS += -f FFI -f GMP`
47+
48+The file `custom.mk-alldeps` is a suitable example.
49+
50+The continuous integration builds on travis-ci.org are built using the
51+ghc-flag -Werror. To enable this behaviour locally also, please
52+compile using `make CI=true` or adding the following line into
53+`custom.mk`:
54+
55+`CI = true`
56+
57+If you are only compiling for installing the most current version, you
58+can omit the CI flag, but please make sure you use it if you want to
59+contribute.
60+
61+## Experimental Support for Building with Stack
62+
63+[Stack](https://github.com/commercialhaskell/stack) is a new
64+cross-platform program for developing Haskell projects, that enhances
65+the functionality provided by Cabal. There is experimental support for
66+building Idris from source using with stack, that uses the LTS 3.16
67+resolver. This installation has been tested on Ubuntu 14.04.2 LTS,
68+only.
69+
70+To build Idris with stack the following commands are recommended:
71+
72+* `stack build`
73+
74+This will install Idris (and related executables) into `./local/bin/`
75+on Unix based systems and an appropriate place on Windows. If you
76+haven't used stack before this will also setup the related
77+infrastructure. For more information about Stack please visit the
78+[Stack website](https://github.com/commercialhaskell/stack).
79+
80+### System GHC
81+
82+The flag `--system-ghc` can be added to enforce use of your system's
83+version of GHC.
84+
85+### `libGMP` and `libFFI`
86+
87+To build with support for `libGMP` and `libFFI` you need to pass build
88+commands for the Idris library either from the command line:
89+
90+* `stack build --flag idris:GMP --flag idris:FFI`
91+
92+or un-comment the options `idris:GMP` and `idris:FFI` and their
93+dependencies in the `stack.yaml` file.