Skip to content
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

Control.once in debug_profile #76

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Rewriter/Language/Reify.v
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ Module Compilers.
:= debug_if should_debug_typing_failure_assume_well_typed (fun () => printf "Warning: %s: could not well-type %t due to underlying issue typechecking %t without relevant context %a, but assuming that it's well-typed because %t is not a template-parameter type" funname v term (fun () => Message.of_list Message.of_binder) ctx_tys ty) ().
Ltac2 debug_profile (descr : string) (f : unit -> 'a) : 'a
:= if should_debug_profile ()
then Control.time (Some descr) f
else f ().
then Control.once (fun () => Control.time (Some descr) f)
else Control.once f.
Ltac2 debug_fine_grained (funname : string) (msg : unit -> message)
:= debug_if should_debug_fine_grained (fun () => printf "%s: %a" funname (fun () => msg) ()) ().
Ltac2 debug_enter_reify (funname : string) (e : constr)
Expand Down