可変長の引数リストをループする Ltac 定義を作成しようとしているときに、Coq 8.4pl2 で次の予期しない動作に遭遇しました。誰かが私にそれを説明できますか?
Ltac ltac_loop X :=
match X with
| 0 => idtac "done"
| _ => (fun Y => idtac "hello"; ltac_loop Y)
end.
Goal True.
ltac_loop 0. (* prints "done" as expected *)
ltac_loop 1 0. (* prints "hello" then "done" as expected *)
ltac_loop 1 1 0. (* unexpectedly yields "Error: Illegal tactic application." *)