简体   繁体   中英

Problems compiling with Agda

I installed Adga with 'apt-get install agda-mode'. I've got a working 'Hello World' program written in Agda shown in the screenshot below

在此处输入图片说明

But when I go to Agda > Compile it asks me for a 'backend' shown in this second screenshot

在此处输入图片说明

I've tried typing in 'GHC' as my back end but it just says '/usr/share/libghc-agda-dev/MAlonzo/src: getDirectoryContents:openDirStream: does not exist (No such file or directory)'

Agda > Load seems to work. How do I get my Agda program to compile?

I personally recommend you to install agda via haskell's Cabal (you can have it by installing haskell-platform , and installing haskell will install ghc). The debian maintained package of agda is currently broken and has issues with the standard library.

cabal update
cabal install agda

you can install both standard library and agda-mode via apt install . After all that (keep in mind that cabal will compile agda, so it will take some time), add the standard library to agda's local settings. Open emacs and load the file to type-check it, or compile it if it has a executable code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM