File: bug_17233.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (20 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Require Import Ltac2.Ltac2.

(* exact0 at the time of the bug, with eexact part removed for simplicity *)
Ltac2 exact0 c :=
  Control.enter (fun _ =>
      Control.with_holes c (fun c => Control.refine (fun _ => c))).

Ltac2 Eval
  let x := constr:(0) in
  Constr.pretype preterm:($x).
(* (* uncaught Not_found *) *)

Ltac2 Eval
  let x := constr:(0) in
  Constr.pretype preterm:(ltac2:(let y () := x in exact0 y)).
(* (* anomaly unbound variable x *) *)

Notation "[ x ]" := ltac2:(exact0 (fun ()  => Constr.pretype x)).

Check ltac2:(let y := constr:(0) in exact0 (fun () => open_constr:([ $y ]))).