lean2/tests/lean/run/coe12.lean
Leonardo de Moura dffe9a6f17 fix(frontends/lean/elaborator): more robust support for coercions to
function-class that contains implicit arguments
2014-09-16 13:08:34 -07:00

10 lines
269 B
Text

import data.nat
inductive foo (A B : Type) : Type :=
mk : (Π {C : Type}, A → C → B) → foo A B
definition to_fun [coercion] {A B : Type} (f : foo A B) : Π {C : Type}, A → C → B :=
foo.rec (λf, f) f
variable f : foo nat nat
variable a : nat
check f a true