Debian Codegraph @

test-suite/output/ltac2_bt.v

raw
1 From Ltac2 Require Import Ltac2.
2 Set Ltac2 Backtrace.
3
4 Ltac2 f () := Control.zero (Invalid_argument None).
5
6 Goal True.
7 Proof.
8 Fail Control.plus f (fun e => Control.zero e).
9 Fail Control.plus f (fun e => Control.throw e).
10 Fail Control.plus_bt f (fun e bt => Control.zero_bt e bt).
11 Fail Control.plus_bt f (fun e bt => Control.throw_bt e bt).
12 Abort.
13
14 (* based on #21312 *)
15 Ltac2 print_stack () := Message.print (Message.of_exninfo (Control.current_exninfo())).
16
17 Ltac2 g () := print_stack ().
18 Ltac2 h () := g ().
19
20 Goal True.
21 h ().
22 Abort.