Updating Agda after having installed it from Source

If you have alreay installed Agda from source, e.g. following Installation of Agda under Linux from source for Nonprogrammers, and want to update to a new version, you can do the following (Note that you usually need only to perform the first items, ad not to install a new version of the Emacs mode).

  • Under Linux you have to first work as root, e.g. using ssh -X root@localhost.
  • Go to where you got the Agda sources using darcs (into the directory named Agda).
  • Do darcs pull. This should give you the latest patches.
  • Then go to where you installed the standard libraries. Again do their darcs pull. (You might have to do this as ordinary user, if you installed the library as ordinary user.
  • Then go back to the directory Agda created by your first darcs pull and do the cabal installation (http://www.haskell.org/haskellwiki/How_to_install_a_Cabal_package), which is essentially
   runghc Setup.lhs configure
   runghc Setup.lhs build
   runghc Setup.lhs copy

(This should go relatively fast since only updated Haskell files need to be compiled again.

  • Then go to the subdirecory Agda/src/main and do again the Cabal installation. But first execute, in order to ensur recompilation when upgrading
   runghc Setup.hs clean  
  • That finishes the part to be done as root. Execute exit
  • If you belief that the emacs mode has changed, do the following:
    • Create a directory for the current agdainstallation ~/emacs/agdaByDate/2008/agdaDec2008/ (replace Dec2008 by the current month in the following. This should be different from the date you used for your last installation)
    • Get the latest version of haskell mode from http://haskell.org/haskell-mode/ or copy the haskell-mode from your last installation to your file ~/emacs/agdaByDate/2008/agdaDec2008/.
    • Copy the .el files in Agda/src/full/Agda/Interaction/emacs-mode/ to ~/emacs/agdaByDate/2008/agdaDec2008/
    • update your file ~/emacs/agdainstall.el (or if you had the links to the agda files in your .emacs file, update that file), by replacing in
      (setq load-path (cons "~/emacs/agdaByDate/2008/agdaDec2008/" load-path))
      (setq load-path (cons "~/emacs/agdaByDate/2008/agdaDec2008/haskell-mode-2.4/" load-path))

the directories "~/emacs/agdaByDate/2008/agdaDec2008/ by the directory for your new installation.

  • Then start emacs and go to the files
  ~/.emacs

and all files in

  ~/emacs/agdaByDate/2008/agdaDec2008/*.el
  ~/emacs/agdaByDate/2008/agdaDec2008/*.el
  ~/emacs/agdaByDate/2008/agdaDec2008/haskell-mode-2.4/*.el

and do for each of them M-x byte-compile-file

  • Then restart emacs, and open a file with extension .agda. This file should start in agda mode, using your new version of agda.
Page last modified on March 16, 2009, at 04:04 am
Powered by PmWiki