Debian Codegraph @

test-suite/bugs/bug_17233.v

raw
1 Require Import Ltac2.Ltac2.
2
3 (* exact0 at the time of the bug, with eexact part removed for simplicity *)
4 Ltac2 exact0 c :=
5 Control.enter (fun _ =>
6 Control.with_holes c (fun c => Control.refine (fun _ => c))).
7
8 Ltac2 Eval
9 let x := constr:(0) in
10 Constr.pretype preterm:($x).
11 (* (* uncaught Not_found *) *)
12
13 Ltac2 Eval
14 let x := constr:(0) in
15 Constr.pretype preterm:(ltac2:(let y () := x in exact0 y)).
16 (* (* anomaly unbound variable x *) *)
17
18 Notation "[ x ]" := ltac2:(exact0 (fun () => Constr.pretype x)).
19
20 Check ltac2:(let y := constr:(0) in exact0 (fun () => open_constr:([ $y ]))).