[英]Unresolved metas in for run in Agda hello-world
我嘗試使用Agda 2.6.1.3和Agda stdlib 1.5編譯hello-world示例。 下面是代碼:
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
報告的 position( 5,8-11
) 對應於令牌run
。
我沒有在 Agda 和 Agda-stdlib 問題中找到任何相關信息,也沒有在 SO 或其他網站上找到任何相關信息。 文檔是否已過時,還是我犯了任何錯誤?
筆記:
stack install Agda
和解析器lts-17.5
安裝。release-2.6.1.3
2.6.1.3 )手動編譯。$HOME/.agda/libraries
我有: $HOME/agda-stdlib/standard-library.agda-lib
$HOME/.agda/defaults
我有: standard-library
這是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 和下一版本的標准庫中修復。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.