aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Tactics/Contains.v
blob: aa4fddac29bc1d19b7e8ccddeff158fd748230fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(** [contains x expr] succeeds iff [x] appears in [expr] *)
Ltac contains search_for in_term :=
  idtac;
  lazymatch in_term with
  | appcontext[search_for] => idtac
  end.

Ltac free_in x y :=
  idtac;
  match y with
    | appcontext[x] => fail 1 x "appears in" y
    | _ => idtac
  end.