1

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. I know that I can change which agda version emacs is using by using C-c + C-x + C-s while in an agda file. But, and the main problem I need to solve, is that when I run make check from the terminal command line in a certain directory with agda files, it seems to load and try to check the agda files with 2.6.2.2 which causes certain errors.

I have changed the symlinks .cabal/bin/agda and .cabal/bin/agda-mode to point to the new version of agda, but this has not fixed the issue: I still get Agda version 2.6.2.2 when I run agda --version (and get an error when I run make check in the directory mentioned earlier). This has changed something though. When I type C-c + C-x + C-s in emacs and press return on an empty mini-buffer, it tells me The Agda mode's version (2.6.3) does not match that of agda (2.6.2.2). So somehow this was able to change the version of agda-mode, but not of agda.

Does anyone know why this might be the case? Additionally, does anyone know how to change the agda version recognized by agda command? For reference, I am using Fedora linux.

EDIT :

Here is the output of ls -l ~/.cabal/bin/agda*:

lrwxrwxrwx. 1 rymndbkr rymndbkr 104 Feb 10 16:11 agda -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda
lrwxrwxrwx. 1 rymndbkr rymndbkr 125 Feb 11 17:09 agda-2.6.2.2 -> /home/rymndbkr/.cabal/store/ghc-8.10.7/Agda-2.6.2.2-759e1b1bce7dc909fddfed32b6b0bb75821632ef6ac10590d66d5b7aaef1066d/bin/agda
lrwxrwxrwx. 1 rymndbkr rymndbkr 104 Feb  7 21:35 agda-2.6.3 -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda
lrwxrwxrwx. 1 rymndbkr rymndbkr 109 Feb 10 16:11 agda-mode -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda-mode
lrwxrwxrwx. 1 rymndbkr rymndbkr 130 Feb 11 17:06 agda-mode-2.6.2.2 -> /home/rymndbkr/.cabal/store/ghc-8.10.7/Agda-2.6.2.2-759e1b1bce7dc909fddfed32b6b0bb75821632ef6ac10590d66d5b7aaef1066d/bin/agda-mode
lrwxrwxrwx. 1 rymndbkr rymndbkr 109 Feb  7 21:35 agda-mode-2.6.3 -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda-mode
lrwxrwxrwx. 1 rymndbkr rymndbkr 127 Jun  2  2022 AllNonAsciiChars -> ../store/ghc-8.10.5/agda-stdlib-utils-1.7-ded3c0cc15b1bd55ef2f27702179b83d259612c9910ffc92fa1561024170cf5d/bin/AllNonAsciiChars
lrwxrwxrwx. 1 rymndbkr rymndbkr 129 Jun  2  2022 GenerateEverything -> ../store/ghc-8.10.5/agda-stdlib-utils-1.7-30b294f8e41a4fa403f9cc53aa1bdaad42507be6da4230825ad747024add7592/bin/GenerateEverything

Thanks to gallais in the comments, I ran which agda. Here is the result:

/usr/bin/agda

I think this means that the terminal command agda is looking for agda in the wrong place. But I don't know how to change this. So now my question is: how can I can I change the path of a shell command?

  • 1
    Can you post the output of `ls -l ~/.cabal/bin/agda*`? – gallais Feb 11 '23 at 10:25
  • @gallais yup, sorry for the the late reply! – IsAdisplayName Feb 11 '23 at 23:58
  • All seems OK. Could you possibly have an agda installed via your package manager too? What does `which agda` return? – gallais Feb 12 '23 at 17:55
  • @gallais . Ah, that might be it! I posted the result of `which agda`. Do you know how to change where the system looks for agda? – IsAdisplayName Feb 12 '23 at 22:33
  • Your best bet is probably to uninstall the globally installed Agda using your package manager. Failing that, you should be able to put `~/.cabal/bin` before `/usr/bin` in your `PATH` definition and that should hopefully mean that local installs would take precedence. – gallais Feb 13 '23 at 16:08

0 Answers0