Questions tagged [agda-mode]

Agda is a dependently typed functional programming language: It has inductive families, which are similar to Haskell's GADTs, but they can be indexed by values and not just types. To use Agda in editors like Emacs or Atom you need to enable/configure the editor to agda-mode.

37 questions
2
votes
0 answers

Guidance on very shallow embedding VHDL in AGDA

for my project in Programming Languages I am doing a very shallow and simple embedding VHDL digital circuits in agda. The aim is to write the syntax, static semantics, dynamic semantics and then write some proofs to show our understanding of the…
danny
  • 400
  • 2
  • 18
2
votes
1 answer

Understanding practice exam about Agda

I am going through my practice exam for Programming language Foundations using agda and it has the following question: You are given the following Agda declaration: data Even : N → Set where ezero : Even 0 esuc : { n : N } → Even n → Even (2+…
danny
  • 400
  • 2
  • 18
2
votes
2 answers

Agda: Return head and tail of empty list

I am learning agda and practicing on lists to get a better understanding. Right now I am trying to write functions for list. I am confused on how to return the head and tail of an empty list. Here is my code: data list (A : Set) : Set where [] :…
danny
  • 400
  • 2
  • 18
1
vote
1 answer

Agda how to run compiled .agdai binaries?

I am following the docs here https://agda.readthedocs.io/en/v2.6.3/getting-started/hello-world.html#id1l I have compiled the file, there is a binary .agdai file created in the directory but how am I meant to run it? Double clicking does nothing.…
1
vote
0 answers

Changing agda version recognized by agda command

Now that agda-2.6.3 is released, I have download this new version. The problem I am running into is that my system still recognizes agda-2.6.2.2 as the default version: when I run agda --version in the command line, it returns Agda version 2.6.2.2.…
1
vote
0 answers

System-wise Agda input

Agda input is an input method for Emacs that allows one to write \bV and have the unicode inserted instead. This makes writing mathematical symbols more comfortable than it would be with the usual Ctrl+Shift+U+(unicode point), if only because it is…
Mario Román
  • 600
  • 7
  • 12
1
vote
1 answer

Agda: Failed to solve the following constraints: P x <= _X_53 (blocked on _X_53)

I'm writing Agda code as I read the HoTT book. I'm stuck on Lemma 2.3.9: data _≡_ {X : Set} : X -> X -> Set where refl : {x : X} -> x ≡ x infix 4 _≡_ -- Lemma 2.1.2 _·_ : {A : Set} {x y z : A} -> x ≡ y -> y ≡ z -> x ≡ z refl · refl = refl --…
1
vote
1 answer

Equivalent of Coq's `Eval` for Agda

Coq has an Eval command that you can use to have the type-checker evaluate an expression and print it to the console. Is there an equivalent to this in Agda? In particular, I'd like to avoid actually compiling and executing the program. I just want…
Camelid
  • 1,535
  • 8
  • 21
1
vote
0 answers

How does one use GHC in agda with VSCode?

I get the error: No backend called 'GHC' (installed backends: GHCNoMain, QuickLaTeX) which is very strange because my vscode says that's what it's using: what is going on? cross posted: https://github.com/banacorn/agda-mode-vscode/issues/99
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
1
vote
1 answer

Interacting in agda-mode with agda?

It feels super awkward to interact with agda. Consider the proof state: _ = begin 5 ∸ 3 ≡⟨⟩ 4 ∸ 2 ≡⟨⟩ 3 ∸ 1 ≡⟨⟩ 2 ∸ 0 ≡⟨⟩ { 2 }0 When I type C-c C-l (type-check), it says ?0 : 2 ∸ 0 ≡ _y_131 _y_131 : ℕ [ at…
Siddharth Bhat
  • 823
  • 5
  • 15
1
vote
1 answer

Preventing development agda from breaking basic standard library usage?

I'm working with the development version of agda, which is now incompatible with the basic standard library version 1.3. wmacmil@w:~/.agda$ agda --version Agda version 2.6.2-41b6b25 A basic failure.agda file, module failure where open import…
user5775230
1
vote
1 answer

Loading files in Agda: unclear explanation in Learn you an Agda

I have made an emacs file trial_agda.agda with the following code: module trial_agda where data : Set where zero : suc : → data _even : → Set where ZERO : zero even STEP : ∀ x → x even → suc (suc x) even _+_ : → → (zero + n) =…
user65526
  • 685
  • 6
  • 19
1
vote
1 answer

A missing type signature error in Agda which I do not know how to avoid

I have the following code in a file trial_agda.agda in emacs: module trial_agda where data : Set where zero : suc : → _+_ : → → zero + n = n (suc n) + n′ = suc (n + n′) It produces /Users/myname/trial_agda.agda:8,1-13 Missing type…
user65526
  • 685
  • 6
  • 19
1
vote
1 answer

Agda mode in Aquamacs

I can't get agda mode to work on Aquamacs. I am running macOS Sierra. Agda version 2.5.4 and Aquamacs 3.3 Here is what I get when I run the agda-mode commands agda-mode setup It seems as if setup has already been performed. agda-mode locate…
Yasmine Shaorda
  • 383
  • 1
  • 7
1
vote
1 answer

How do I enter '·' (middle dot) in agda-mode?

I'm working through a paper that uses the middle-dot character in Agda code. I'd like to be able to type it up without copy/paste. How can I enter it with agda-mode? I've tried typical resources such…
Steven Shaw
  • 6,063
  • 3
  • 33
  • 44