lean4-htt/tests/lean/coe5.lean
Leonardo de Moura d7c3fce8a3 feat(library/init/coe,frontends/lean): more general coercions to fun
The new test dep_coe_to_fn.lean motivates the change.
2016-09-27 15:41:06 -07:00

23 lines
307 B
Text

open tactic
attribute [instance]
definition expr_to_app : has_coe_to_fun expr :=
{ F := λ e, expr → expr,
coe := expr.app }
constants f a b : expr
check f a
check f a b
check f a b a
set_option pp.coercions false
check f a b a
set_option pp.all true
set_option pp.coercions true
check f a b