-
Notifications
You must be signed in to change notification settings - Fork 632
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
Debugger proof context display should show all goals in the same format used outside the debugger #15345
Comments
I tried several experiments to get the information needed to print with
@ejgallego @ppedrot or others: |
Indeed, as this is a deprecated API and should not be used, instead you need to get a |
The following shows that the two goals are printed:
But they are printed after entering. One would need to display them before they are dispatched (maybe using |
As you put it, this does not make sense. Goal printing is handled by the UI, so it's not the responsibility of coqtop to print goals in the debugger as they ought to look in the user interface. At best you can send them through the protocol and let the UI handle that. |
@herbelin Very helpful, thanks. Looks like you tried this in coqtop, which gives different output than in CoqIDE. I'll investigate why it's different. I didn't expect that at all!
As an initial experiment, I'd like to access this information from Eventually I'd like to access it from a new/modified XML protocol message in @ppedrot The main problem here is that the goal display in CoqIDE is incomplete. Currently the goal is formatted and sent to the debugger as a tagged Pp.t. That should be changed so CoqIDE uses the |
at coq/plugins/ltac/tactic_debug.ml Line 332 in d926f04
enter which runs the body once for each goal. I guess this means coqide sees a message for each goal and only displays the last received.If instead you do let open Proofview in
let open Notations in
Goal.goals >>= fun gl ->
Monad.List.map (fun x -> x) gl >>= fun gl -> the last |
@SkySkimmer Thanks, that is sufficient to show the goals, though I'd like to end up with a
|
Aha, you are a bit lower than that layer, then you need to access the |
Indeed there's no Proof.t while executing tactics. |
Don't use |
Actually Proof.t is just an artifact these days, and may go hopefully away at some point. |
OK. I want to tweak
|
You don't really have access to this from the proof engine, and it's a feature. You can observe future goals and the shelf, but it's not exactly the same thing.
The general answer is yes, if you don't call any effectful tactics in the meantime. Depending on the exact function you call to get the goal this can be ensured statically.
It should be. |
meaning intentional? Since Ltac doesn't support the
Perhaps you would be more specific so I'm more likely to get it right the first time? If I get it wrong the first time I would probably ask you for elaboration anyway. |
Users expect to see a consistent and complete display of the proof context whether in the debugger or not.
Currently they differ. That severely impacts the usefulness of the debugger. For example:
versus
The text was updated successfully, but these errors were encountered: