【发布时间】:2017-06-26 17:30:04
【问题描述】:
我正在 Coq 中转录 2008 PHOAS paper 第 2.1 节中的(非正式)定义。
Inductive tm' {V : Set} : Set :=
| Var : V -> tm'
| App : tm' -> tm' -> tm'
| Abs : (V -> tm') -> tm'.
Definition tm := forall X, @tm' X.
Fail Example id : tm := Abs Var.
输出:
The term "Abs Var" has type "tm'" while it is expected to have type "tm".
那是相当讨厌的。如何进行此代码类型检查?
【问题讨论】:
标签: coq