[英]Loading Standard Library of Agda
我安裝了Agda(2.3.2.2版)和Standard Library(0.7版)。
我可以加載不導入標准庫的程序。
例如,我可以加載
data Bool : Set where
true : Bool
false : Bool
not : Bool -> Bool
not false = true
not true = false
但是,我無法加載
open import Data.Bool
data Bool : Set where
true : Bool
false : Bool
not : Bool -> Bool
not false = true
not true = false
加載標准庫時,出現以下錯誤。
/Users/my_name/.cabal/share/Agda-2.3.2.2/lib-0.7/src/Level.agda:27,1-32
Duplicate binding for built-in thing LEVEL, previous binding to.Agda.Primitive.Level
when checking the pragma BUILTIN LEVEL Level
有解決錯誤的想法嗎?
您確定版本嗎? 2.3.2.2應與0.7兼容。 在我看來,您的Agda比2.3.2.2更新。 是否存在...\\Agda-2.3.2.2\\lib\\prim\\Agda\\Primitive.agda
文件? 它不應該在那里。
如果那沒有幫助,您可以嘗試將“ Level
模塊的內容手動更改為以下內容:
module Level where
-- Levels.
open import Agda.Primitive public
using (Level; _⊔_)
renaming (lzero to zero; lsuc to suc)
-- Lifting.
record Lift {a ℓ} (A : Set a) : Set (a ⊔ ℓ) where
constructor lift
field lower : A
open Lift public
但是您可能會遇到其他問題。
您是否真的想要Agda和stdlib的舊版本?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.