New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extensions to the Ltac2 standard library #18095
Conversation
56afa0a
to
961c8ab
Compare
e7adb0f
to
7b0d128
Compare
eb34b64
to
e0248c0
Compare
1dd33cb
to
ee593ed
Compare
@@ -26,6 +26,9 @@ Ltac2 @ external extend : (unit -> unit) list -> (unit -> unit) -> (unit -> unit | |||
Ltac2 @ external enter : (unit -> unit) -> unit := "coq-core.plugins.ltac2" "enter". | |||
Ltac2 @ external case : (unit -> 'a) -> ('a * (exn -> 'a)) result := "coq-core.plugins.ltac2" "case". | |||
|
|||
Ltac2 once_plus (run : unit -> 'a) (handle : exn -> 'a) : 'a := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be called first_bt
and take a list of handles as its second argument, in analogy to the the first
tactical? Or would that make naming less coherent rather than more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To us this function is just a short-hand for its definition, as we noticed we were wrapping Control.plus
in a Control.once
most of the time, so calling it once_plus
seemed to be a natural name.
Actually, I'm not sure I understand what first_bt
would do. What would its implementation be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JasonGross any more thoughts on that?
b8f60a6
to
abe2f88
Compare
This adds: - Alternatives to [zero], [throw] and [plus] that deal with backtraces. - Support for timeout tactics.
Should Require for the new files be added to Ltac2.v? so that eg Require Import Ltac2.Ltac2.
Ltac2 foo x := Ref.ref x. works without an additional |
d8fb130
to
2176920
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready, let's have a full CI then I expect I'll merge
@coqbot run full ci
@coqbot run full ci |
CI failures are spurious, right @SkySkimmer? |
@coqbot merge now |
Reviewed-by: SkySkimmer Ack-by: Janno Ack-by: JasonGross Ack-by: ppedrot Ack-by: jfehrle Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
Reviewed-by: SkySkimmer Ack-by: Janno Ack-by: JasonGross Ack-by: ppedrot Ack-by: jfehrle Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
Reviewed-by: SkySkimmer Ack-by: Janno Ack-by: JasonGross Ack-by: ppedrot Ack-by: jfehrle Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
Reviewed-by: SkySkimmer Ack-by: Janno Ack-by: JasonGross Ack-by: ppedrot Ack-by: jfehrle Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
Fix #10112.