[英]Problems compiling with Agda
I installed Adga with 'apt-get install agda-mode'. 我使用“ apt-get install agda-mode”安装了Adga。 I've got a working 'Hello World' program written in Agda shown in the screenshot below
我有一个用Agda编写的有效的“ Hello World”程序,如下面的屏幕快照所示。
But when I go to Agda > Compile it asks me for a 'backend' shown in this second screenshot 但是,当我转到Agda>编译时,它要求我提供第二个屏幕截图中显示的“后端”
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)' 我已经尝试在后端输入“ GHC”,但它只显示“ / usr / share / libghc-agda-dev / MAlonzo / src:getDirectoryContents:openDirStream:不存在(没有这样的文件或目录)”
Agda > Load seems to work. Agda>加载似乎有效。 How do I get my Agda program to compile?
如何使我的Agda程序编译?
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). 我个人建议您通过haskell的Cabal安装
agda
(您可以通过安装haskell-platform
来安装它,而安装haskell会安装ghc)。 The debian maintained package of agda is currently broken and has issues with the standard library. 由debian维护的agda软件包当前已损坏,并且标准库有问题。
cabal update
cabal install agda
you can install both standard library and agda-mode
via apt install
. 您可以通过
apt install
同时安装标准库和agda-mode
。 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. 完成所有这些操作后(请记住,cabal将编译agda,因此将需要一些时间),然后将标准库添加到agda的本地设置中。 Open emacs and load the file to type-check it, or compile it if it has a executable code.
打开emacs并加载文件以进行类型检查,或者如果它具有可执行代码,则将其编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.