DEV Community


Installing Agda using Stack

sirasolra profile image Masaki Haga ・1 min read

I recently installed Agda on my Linux box, so I'll take note of what I did.

alex and happy Installation

alex is a tool to generate a lexical analyzer and happy is a parser generator. (They correspond to lex and yacc respectively.)

$ stack install alex happy


$ stack install Agda

I failed to compile with an error message.

Add to stack.yaml and install Agda again

Refer to the following part of the error message and add the following to ~/.stack/global-project/stack.yaml:

Some different approaches to resolving this:

* Recommended action: try adding the following to your extra-deps in/home/(Username)/.stack/global-project/stack.yaml:

- hogehoge
- hugahuga

Plan construction failed.

However, if you already have extra-deps:, add:

- hogehoge
- hugahuga

Install Agda again, repeat if it fails, and proceed if it succeeds.

Set agda-mode to work with Emacs

$ agda-mode setup && agda-mode compile

Standard LibraryInstall

Version 1.1 has been installed.

$ mkdir -p ~/.agda/lib
$ cd ~/.agda/lib
$ wget
$ tar xvzf v 1.1 .tar.gz
$ echo "$HOME/.agda/lib/agda-stdlib -1.1/standard-library.agda-lib" > ~/.agda/libraries

Let's see if we have it.

$ agda-I-l standard-library


It's over. Yay! (^○^)


Editor guide