[英]Need help converting number to string in Agda
阿格達的新手。 我想要一種從代碼中獲取一些 output 的方法,所以我正在尋找一種打印數字的方法。 在標准庫中找到一個 function 但我無法導入它。 我得到以下信息:
Unsolved metas at the following locations:
/home/user/agda-stdlib-1.7/src/Data/List/Relation/Unary/Any/Properties.agda:100,17-18
/home/user/agda-stdlib-1.7/src/Data/List/Relation/Unary/Any/Properties.agda:105,16-17
/home/user/agda-stdlib-1.7/src/Data/List/Relation/Unary/Any/Properties.agda:105,28-29
when scope checking the declaration
open import Data.List.Relation.Unary.Any.Properties
Failed to solve the following constraints:
Check definition of to∘from : {P.A.a : Level} {P.A : Set P.A.a}
{P.p : Level} {P = P₁ : Pred P.A P.p} {Q.A.a : Level}
{Q.A : Set Q.A.a} {Q.p : Level} {Q = Q₁ : Pred Q.A Q.p}
{xs = xs₁ : List P.A} {ys = ys₁ : List Q.A}
(pq
: Any (λ x → Any (λ y → Prod.Σ (P₁ x) (λ x₁ → Q₁ y)) ys₁) xs₁) →
Any-×⁺ (Any-×⁻ pq) ≡ pq
stuck because
/home/user/agda-stdlib-1.7/src/Data/List/Relation/Unary/Any/Properties.agda:266,3-34
I'm not sure if there should be a case for the constructor refl,
because I get stuck when trying to solve the following unification
problems (inferred index ≟ expected index):
lhs ≟ Any.map
(λ x →
Any.map (λ q → P.subst P x p , q)
(Any.map
(λ x₁ →
P.subst Q x₁
(_5474 (x = x₂) (pq′ = pq′) (y = y) (y∈ys = y∈ys) (p = p) (q = q)
(lem₂ = lem₂) (pq = pq) (x∈xs = x∈xs) (lem₁ = lem₁)
(p = (P.subst P x p))))
y∈ys))
x∈xs
when checking that the pattern refl has type
lhs ≡.map(λ x →
Any.map (λ q → P.subst P x p , q)
(Any.map
(λ x₁ →
P.subst Q x₁
(_5474 (x = x₂) (pq′ = pq′) (y = y) (y∈ys = y∈ys) (p = p) (q = q)
(lem₂ = lem₂) (pq = pq) (x∈xs = x∈xs) (lem₁ = lem₁)
(p = (P.subst P x p))))
y∈ys))
x∈xs
(blocked on any(_Q.p_474, _P.p_475))
when scope checking the declaration
open import Data.List.Relation.Unary.Any.Properties
Any help? :)
問題是文件中有一個未填充的孔
Data/List/Relation/Unary/Any/Properties.agda
這是標准庫中的文件,因此可能有兩個原因:
agda-stdlib
存儲庫的開發版本,但沒有簽出發布標簽假設這是第二個選項,您需要將 go 放入您的agda-stdlib
文件夾並發出以下命令:
git fetch --all --tags
git checkout tags/v1.7.1
完成此操作后,您應該能夠導入Data.Nat.Show
並使用該模塊中的函數,就像從任何其他模塊中一樣。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.