簡體   English   中英

在 Agda hello-world 中運行的未解決的元數據

[英]Unresolved metas in for run in Agda hello-world

我嘗試使用Agda 2.6.1.3Agda 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 或其他網站上找到任何相關信息。 文檔是否已過時,還是我犯了任何錯誤?


筆記:

  • Agda 編譯器通過stack install Agda和解析器lts-17.5安裝。
  • 我還嘗試從 GitHub 源(分支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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM