2015-12-02 14:23:39 +00:00
#+TITLE : Agda layer
2016-03-31 02:59:55 +00:00
2019-05-05 17:26:40 +00:00
#+TAGS : layer|uncategorized
2018-09-19 03:54:47 +00:00
* Table of Contents :TOC_4_gh:noexport:
2017-05-22 14:16:12 +00:00
- [[#description ][Description ]]
2017-08-06 02:14:10 +00:00
- [[#features ][Features: ]]
2017-05-22 14:16:12 +00:00
- [[#install ][Install ]]
- [[#layer ][Layer ]]
- [[#agda ][Agda ]]
- [[#key-bindings ][Key bindings ]]
2015-06-10 16:44:30 +00:00
* Description
This layer adds support for the [[http://wiki.portal.chalmers.se/agda/pmwiki.php ][Agda ]] programming language.
2017-08-06 02:14:10 +00:00
** Features:
2015-06-10 16:44:30 +00:00
- Faces redefined to correctly play with themes.
2018-09-19 03:54:47 +00:00
- Spacemacs bindings to Agda’ s interactive tools.
2015-10-27 10:59:05 +00:00
2015-06-10 21:16:01 +00:00
*This layer is in construction, it needs your contributions and bug reports.*
2015-06-10 16:44:30 +00:00
* Install
** Layer
2016-01-06 05:21:55 +00:00
To use this configuration layer, add it to your =~/.spacemacs= . You will need to
add =agda= to the existing =dotspacemacs-configuration-layers= list in this
file.
2015-06-10 16:44:30 +00:00
** Agda
Quick instructions to install Agda assuming you have cabal installed:
#+BEGIN_SRC sh
cabal install alex happy "cpphs < 1.19" agda
#+END_SRC
2015-10-27 10:59:05 +00:00
Then check that =agda= is available on your =$PATH= and seen by Emacs. For
2015-10-29 12:41:05 +00:00
information about setting up =$PATH= , check out the corresponding section in the
2015-12-21 13:50:36 +00:00
FAQ (~SPC h SPC $PATH RET~ ).
2015-06-10 16:44:30 +00:00
2016-08-17 18:20:20 +00:00
By default the =agda-mode= executable bundled with most agda installations is
2018-09-19 03:54:47 +00:00
used to locate the agda-mode package. If you don’ t have it and want to use a
2016-08-17 18:20:20 +00:00
local agda-mode package, you can customize the layer variable =agda-mode-path=
to your needs. Set it to =nil= if =agda2.el= is already discoverable in Emacs’
load path, otherwise set it to the path at which =agda2.el= can be found. For
example,
#+BEGIN_SRC emacs-lisp
2018-12-14 17:39:09 +00:00
(agda :variables agda-mode-path "/some/path/to/agda2.el")
2016-08-17 18:20:20 +00:00
#+END_SRC
2016-08-06 20:36:11 +00:00
2015-06-10 16:44:30 +00:00
* Key bindings
2018-09-19 03:54:47 +00:00
The key bindings of this layer don’ t follow the Spacemacs conventions,
2015-06-10 16:44:30 +00:00
we opted to a simple transcription of stock Agda mode key bindings to
Spacemacs leader key.
All Agda specific bindings are prefixed with the major-mode leader
~SPC m~ .
2018-12-05 03:03:03 +00:00
| Key binding | Description |
2015-06-10 16:44:30 +00:00
|-------------+-------------------------------------------------------------------------------------------------------------------------------------------|
| ~SPC m =~ | Show constraints. |
| ~SPC m ?~ | Show all goals. |
2016-02-29 09:23:14 +00:00
| ~SPC m , ~ | Shows the type of the goal at point and the currect context. |
2018-09-19 03:54:47 +00:00
| ~SPC m .~ | Shows the context, the goal and the given expression’ s inferred type. |
2015-06-10 16:44:30 +00:00
| ~SPC m a~ | Simple proof search. |
2016-01-30 11:32:53 +00:00
| ~SPC m b~ | Go to the previous goal, if any and activate goal-navigation transient-state. |
2015-06-10 16:44:30 +00:00
| ~SPC m c~ | Refine the pattern variables given in the goal. |
| ~SPC m d~ | Infers the type of the given expression. |
| ~SPC m e~ | Show the context of the goal at point. |
2016-01-30 11:32:53 +00:00
| ~SPC m f~ | Go to the next goal, if any and activate goal-navigation transient-state. |
2015-06-10 16:44:30 +00:00
| ~SPC m h~ | Compute the type of a hypothetical helper function. |
| ~SPC m l~ | Load current buffer. |
| ~SPC m n~ | Computes the normal form of the given expression, using the scope of the current goal or, if point is not in a goal, the top-level scope. |
2015-08-17 18:25:48 +00:00
| ~SPC m p~ | Shows all the top-level names in the given module. |
2015-06-10 16:44:30 +00:00
| ~SPC m r~ | Refine the goal at point. |
| ~SPC m s~ | Solves all goals that are already instantiated internally. |
| ~SPC m t~ | Show the type of the goal at point. |
| ~SPC m x c~ | Compile current module. |
| ~SPC m x d~ | Removes buffer annotations (overlays and text properties). |
| ~SPC m x h~ | Toggle display of implicit arguments. |
| ~SPC m x q~ | Quit and clean up after agda2. |
| ~SPC m x r~ | Kill and restart the *agda2* buffer and load =agda2-toplevel-module=. |
| ~SPC m w~ | Explains why a given name is in scope. |