lean4-htt/tests/lean/coe5.lean
Leonardo de Moura 572751c56e feat(frontends/lean): force user to use meta keyword on meta inductive/structure/class
Before this commit, we were inferring whether an
inductive/structure/class were meta or not. This was bad since the user
had no clue whether the type was trusted (non meta) or not.
Moreover, users could get confused by this behavior and assume the
kernel was allowing trusted code to rely on untrusted one.
2016-09-29 17:56:35 -07:00

23 lines
310 B
Text

open tactic
attribute [instance]
meta def expr_to_app : has_coe_to_fun expr :=
{ F := λ e, expr → expr,
coe := expr.app }
meta 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