1
我正在爲foo
一個未解metavariable在下面的代碼:的功能未解metavariable已經沒有居住參數
namespace Funs
data Funs : Type -> Type where
Nil : Funs a
(::) : {b : Type} -> (a -> List b) -> Funs (List a) -> Funs (List a)
data FunPtr : Funs a -> Type -> Type where
here : FunPtr ((::) {b} _ bs) b
there : FunPtr bs b -> FunPtr (_ :: bs) b
total foo : FunPtr [] b -> Void
如何說服伊德里斯說foo
沒有有效的模式來匹配呢?
我已經嘗試添加
foo f = ?foo
,然後做一個分裂的情況下在Emacs上f
(只是爲了看看會拿出什麼),但只是刪除了線,留下foo
作爲一個未解元。
但是不應該是'total foo:FunPtr Nil b - > Void'? – user3237465 2014-12-06 23:26:53
@ user3237465:否,'[]'是任何稱爲'Nil'的無用構造函數的語法糖, – Cactus 2014-12-07 04:57:52