General installation instruction can be found at the Download section of the Agda website.
The following instructions may be out of date.
If you have Ubuntu / Debian / NixOS / some other decent Linux distro or 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 already have Haskell platform installed (and maybe don't have administrator access), you need to go through the following steps:
%PATH%
(cmd: set PATH=%PATH%;"C:\Program Files\Haskell Platform\2011.2.0.1\bin";
)%PATH%
(cmd: set PATH=%PATH%;"c:\program files (x86)\emacs-23.3\bin";
)%PATH%
(cmd: 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.