General installation instructions of the Agda compiler can be found at the Download section of the Agda website.
Please note that the following instructions may be out of date.
If you have Ubuntu / Debian / NixOS / some other decent Linux distro or even FreeBSD, you can safely install Agda from your package manager. Or you can use cabal-install
as described below for the Windows version.
After installation show Emacs where to find agda-mode by the following command:
agda-mode setup
If you do not have Haskell Platform installed but you have administrator access to the computer, try the all-in-one Windows installer.
If you already have Haskell Platform installed (but you may not necessarily have administrator access), you will need to go through the following steps:
%PATH%
(set PATH=%PATH%;"C:\Program Files\Haskell Platform\2014.2.0.0\bin";
)%PATH%
(set PATH=%PATH%;"c:\program files (x86)\emacs-23.3\bin";
)%PATH%
(set PATH=%PATH%;%APPDATA%\cabal\bin;
)cabal update
cabal install Agda
agda-mode setup
(load-file (let ((coding-system-for-read ‘utf-8)) (shell-command-to-string “agda-mode locate”)))
into your .emacs
file (path is usually Users\%USERNAME%\AppData\Roaming\.emacs
)(load-file (let ((coding-system-for-read ‘utf-8)) (shell-command-to-string “agda-mode locate”)))
into the scratch buffer, select it with the mouse and type M-x eval-region
If you neither have administrator access nor Haskell Platform installed: get administrator access!
You can download the Agda standard libraries from here.
This is how to teach Agda see the standard libraries using the following commands in Emacs. Note that it requires haskell-mode to be installed first.
M-x load-library
<return> agda2-mode
<return>M-x customize-group
<return> agda2
<return>M
stands for Meta which is labelled Alt on most computers)Agda2 Include dirs
/home/divip/share/lib-0.6/src
Save for future sessions
When we use the standard library modules for the first time it takes some time to load them because Agda is compiling them.