Agda is a dependently typed programming language / interactive theorem prover.
Haskell Agda PostScript TeX HTML Emacs Lisp Other
Permalink
Failed to load latest commit information.
benchmark Removed an incorrect comment and an unnecessary pragma. Apr 29, 2016
doc Merge remote-tracking branch 'origin/stable-2.5' Sep 26, 2016
examples [ closed #2200 ] Add trigonometric primitives to TCM and GHC and JS b… Sep 21, 2016
macros [ cleaning ] Removed .cvsignore files. Feb 18, 2015
mk [ 2.5.1 release, #1933 ] Bumped version to 2.6.0 (master). Apr 16, 2016
notes bench std-lib (Andreas ubunutu 15.10) [ci skip] Jun 26, 2016
src Merge branch 'stable-2.5' Sep 28, 2016
std-lib @ e3893da [ compilers ] removed (unused) smashing code Aug 17, 2016
test Merge branch 'stable-2.5' Sep 28, 2016
.authorspellings Added some .authorspellings. Jun 15, 2014
.ghci [ 2.5.1 release, #1933 ] Bumped version to 2.6.0 (master). Apr 16, 2016
.gitignore [ #2188 ] Using stack on the `ghc-7.8.4-transformers-0.3.0.0` test. Sep 19, 2016
.gitmodules [ .gitmodules ] Using the master branch of the std-lib. Oct 1, 2015
.mailmap [ .mailmap ] Weird hostnames @Chalmers Jul 30, 2016
.travis.yml [ fixed #2192 ] Fixed `primShowFloat 1.0` on the JS backend (again). Sep 26, 2016
Agda.cabal Merge remote-tracking branch 'origin/stable-2.5' Sep 26, 2016
CHANGELOG.md [ #2204 ] Fixed markdown format on a pragma. Sep 26, 2016
HACKING Implemented a git bisect wrapper script. Aug 30, 2016
LICENSE [ 2.5.1 RC 1, #1831 ] Updated the copyright year range in LICENSE. Feb 13, 2016
Makefile Merge branch 'stable-2.5' Jul 25, 2016
README.md Merge remote-tracking branch 'origin/stable-2.5' Jun 21, 2016
Setup.hs [ build ] fixed broken package registration Feb 17, 2016
default.nix Merge branch 'stable-2.5' Sep 22, 2016
release.sh Release script. Nov 8, 2014
stack-7.8.4.yaml [ #2188 ] Using stack on the `ghc-7.8.4-transformers-0.3.0.0` test. Sep 19, 2016
stack-8.0.1.yaml Revert "[ #2188 ] Using stack on the `UHC` test." Sep 20, 2016

README.md

Agda 2

Hackage version Stackage version Build Status

Table of contents:

Note that this README only discusses installation of Agda, not its standard library. See the Agda Wiki for information about the library.

Documentation

Prerequisites

You need recent versions of the following programs/libraries:

You should also make sure that programs installed by cabal-install are on your shell's search path.

For instructions on installing a suitable version of Emacs under Windows, see [below]((#installing-emacs-under-windows).

Non-Windows users need to ensure that the development files for the C libraries zlib and ncurses are installed (see http://zlib.net and http://www.gnu.org/software/ncurses/). Your package manager may be able to install these files for you. For instance, on Debian or Ubuntu it should suffice to run

apt-get install zlib1g-dev libncurses5-dev

as root to get the correct files installed.

Note on GHC's CPP language extension

Recent versions of Clang's preprocessor don't work well with Haskell. In order to get some dependencies to build, you may need to set up Cabal to have GHC use cpphs by default. You can do this by adding

program-default-options
  ghc-options: -pgmPcpphs -optP--cpp

to your .cabal/config file. (You must be using cabal >= 1.18. Note that some packages may not compile with this option set.)

You don't need to set this option to install Agda from the current development source; Agda.cabal now uses cpphs.

Installing Agda

There are several ways to install Agda:

Using a binary package prepared for your platform

Recommended if such a package exists. See the Agda Wiki.

Using a released source package from Hackage

Install the prerequisites mentioned below, then run the following commands:

cabal update
cabal install Agda
agda-mode setup

The last command tries to set up Emacs for use with Agda. As an alternative you can copy the following text to your .emacs file:

(load-file (let ((coding-system-for-read 'utf-8))
                (shell-command-to-string "agda-mode locate")))

It is also possible (but not necessary) to compile the Emacs mode's files:

agda-mode compile

This can, in some cases, give a noticeable speedup.

WARNING: If you reinstall the Agda mode without recompiling the Emacs Lisp files, then Emacs may continue using the old, compiled files.

Using the development version of the code

You can obtain tarballs of the development version from the Agda Wiki, or clone the repository.

Install the prerequisites discussed in Prerequisites.

Then, either:

(1a) Run the following commands in the top-level directory of the Agda source tree to install Agda:

cabal update
cabal install

(1b) Run agda-mode setup to set up Emacs for use with Agda. Alternatively, add the following text to your .emacs file:

(load-file (let ((coding-system-for-read 'utf-8))
                (shell-command-to-string "agda-mode locate")))

It is also possible (but not necessary) to compile the Emacs mode's files:

agda-mode compile

This can, in some cases, give a noticeable speedup.

WARNING: If you reinstall the Agda mode without recompiling the Emacs Lisp files, then Emacs may continue using the old compiled files.

(2) Or, you can try to install Agda (including a compiled Emacs mode) by running the following command:

make install

Configuring the Emacs mode

If you want to you can customise the Emacs mode. Just start Emacs and type the following:

M-x load-library RET agda2-mode RET
M-x customize-group RET agda2 RET

This is useful if you want to change the Agda search path, in which case you should change the agda2-include-dirs variable.

If you want some specific settings for the Emacs mode you can add them to agda2-mode-hook. For instance, if you do not want to use the Agda input method (for writing various symbols like ∀≥ℕ→π⟦⟧) you can add the following to your .emacs:

(add-hook 'agda2-mode-hook
          '(lambda ()
            ; If you do not want to use any input method:
            (deactivate-input-method)
            ; (In some versions of Emacs you should use
            ; inactivate-input-method instead of
            ; deactivate-input-method.)

            ; If you want to use the X input method:
            (set-input-method "X")))

Note that, on some systems, the Emacs mode changes the default font of the current frame in order to enable many Unicode symbols to be displayed. This only works if the right fonts are available, though. If you want to turn off this feature, then you should customise the agda2-fontset-name variable.


Installing Emacs under Windows

A precompiled version of Emacs 24.3, with the necessary mathematical fonts, is available at http://homepage.cs.uiowa.edu/~astump/agda/

Hacking on Agda

Head to HACKING