lean4-htt/tests/lean/run/match_expr_meta_modifier.lean
2024-03-02 21:55:07 +00:00

13 lines
290 B
Text

import Lean
open Lean Meta
def f1 (e : Expr) : MetaM Expr := do
match_expr (← whnf e) with
| And a b => mkAppM ``And #[b, a]
| _ => return e
def f2 (e : Expr) : MetaM Expr := do
match_expr (meta := false) (← whnf e) with
| And a b => mkAppM ``And #[b, a]
| _ => return e