[英]what does this notation `:>` mean in Coq?
我看到:>
符號在記錄數據類型定義中使用。 不知道這是標准符號還是在我正在查看的文件中的某處定義。
它聲明從記錄到該字段的強制。
例如,如果您有一條記錄:
Record foo :=
{ f1 :> bar
; f2 : baz
}.
如果您使用x : foo
,則可以將其放置在期望有bar
地方,然后將自動插入f1
應用程序。
x : bar
(* will desugar to (f1 x : bar), though it will still be hidden by Coq's prettyprinter. *)
有關更多詳細信息,請參見手冊: https : //coq.inria.fr/distrib/current/refman/addendum/implicit-coercions.html#classes-as-records
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.