【发布时间】:2017-04-17 19:08:43
【问题描述】:
我想做以下事情:
data Foo : (a : Type) -> (b : Type) -> (c : a -> b -> Type) -> Type where
Bar : a -> (c a) -> Foo a b c
但我收到以下错误:
When checking type of test.Bar:
When checking argument c to test.Foo:
Type mismatch between
Type -> Type (Type of c)
and
a -> b -> Type (Expected type)
Specifically:
Type mismatch between
Type
and
b -> Type
这对我来说似乎应该是有效的。那就是c 在表达式Foo a b c 中有正确的类型,但Idris 认为它的类型是b -> Type,或者我认为的(c a)。
是我遗漏了什么,还是 Idris 的限制?
【问题讨论】:
标签: idris