There are several ways to install Agda:
- Using a released source package from Hackage
- Using a binary package prepared for your platform
- Using the development version from the Git repository
Agda can be installed using different flags (see Installation Flags).
Installation from Hackage¶
cabal update cabal install Agda agda-mode setup
The last command tries to set up Emacs for use with Agda via the Emacs mode. 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:
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.
Prebuilt Packages and System-Specific Instructions¶
Debian / Ubuntu¶
Prebuilt packages are available for Debian testing/unstable and Ubuntu from Karmic onwards. To install:
apt-get install agda-mode
This should install Agda and the Emacs mode.
The standard library is available in Debian testing/unstable and Ubuntu from Lucid onwards. To install:
apt-get install agda-stdlib
Please report any bugs to Debian, using:
reportbug -B debian agda reportbug -B debian agda-stdlib
Agda is packaged in Fedora (since before Fedora 18).
yum install Agda
will pull in emacs-agda-mode and ghc-Agda-devel.
Agda is part of the Nixpkgs collection that is used by https://nixos.org/nixos. To install Agda and agda-mode for Emacs, type:
nix-env -f "<nixpkgs>" -iA haskellPackages.Agda
If you’re just interested in the library, you can also install the library without the executable. The Agda standard library is currently not installed automatically.
Homebrew provides prebuilt packages for OS X. To install:
brew install agda
This should take less than a minute, and install Agda together with the Emacs mode and the standard library.
By default, the standard library is installed in
/usr/local/lib/agda/. To use the standard library, it is
convenient to add
~/.agda/libraries, and specify
~/.agda/defaults. Note this is not performed automatically.
It is also possible to install
--without-ghc, or from
--HEAD. Note this will require
building Agda from source.
For more information, refer to the Homebrew documentation.
Installation of the Development Version¶
After getting the development version following the instructions in the Agda wiki:
Install the prerequisites
In the top-level directory of the Agda source tree
Follow the instructions for installing Agda from Hackage (except run
cabal installinstead of
cabal install Agda) or
You can try to install Agda (including a compiled Emacs mode) by running the following command:
When installing Agda the following flags can be used:
- Use cpphs instead of cpp. Default: on.
- Enable debugging features that may slow Agda down. Default: off.
- Enable the
--count-clustersflag (see Counting Extended Grapheme Clusters). Note that if
False, then the
--count-clustersflag triggers an error message. Default: off.