我试图用你好-世界和Agda stdlib 1.5编译这个示例。以下是代码:
module hello-world where
open import IO
main = run (putStrLn "Hello, World!")
在使用Agda (agda --compile hello-world.agda
)编译时,报告了以下错误:
Unsolved metas at the following locations:
$HOME/hello-world.agda:5,8-11
报告的位置(5,8-11
)对应于令牌run
。
我没有在Agda和Agda-stdlib问题中找到任何相关信息,也没有在这样或其他网站上找到任何相关信息。文件是过期了,还是我犯了什么错误?
注意:
stack install Agda
的lts-17.5
中。release-2.6.1.3
)手动编译。$HOME/.agda/libraries
中,我有:$HOME/agda/standard.agda-lib$HOME/.agda/defaults
中我有:标准库发布于 2021-03-06 13:00:55
这就是https://github.com/agda/agda/issues/4250#issuecomment-771806949评论中描述的问题。当前的解决方法是向run
添加一个隐式参数,如下所示:
module hello-world where
open import IO
open import Level
main = run {0ℓ} (putStrLn "Hello, World!")
这个问题将在即将发布的Agda 2.6.2和标准库的下一个版本中得到修正。
https://stackoverflow.com/questions/66505255
复制相似问题