@@ -394,6 +394,10 @@ quote.ring _ _ _ _ In _ _ _ :- coq.error "Unknown" {coq.term->string In}.
394394
395395%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
396396
397+ pred if-verbose i:prop.
398+ if-verbose P :- get-option "verbose" tt, !, P.
399+ if-verbose _.
400+
397401pred append-last-hyp-to-args i:sealed-goal, o:sealed-goal.
398402append-last-hyp-to-args (nabla G) (nabla G1) :-
399403 pi x\ append-last-hyp-to-args (G x) (G1 x).
@@ -431,7 +435,10 @@ ring-reflection _ _ _ _ _ _ _ _ _ _ :-
431435 coq.ltac.fail 0 "Not a valid ring equation".
432436
433437pred ring i:goal, o:list sealed-goal.
434- ring (goal _ _ P _ Args as G) GS :- std.do! [
438+ ring (goal _ _ P _ Args as G) GS :-
439+ attributes A, !,
440+ coq.parse-attributes A [att "verbose" bool] Opts, !,
441+ Opts => std.do! [
435442 @ltacfail! 0 => std.assert-ok!
436443 (coq.unify-eq P {{ @eq lp:Ty lp:T1 lp:T2 }})
437444 "The goal is not an equation",
@@ -446,7 +453,7 @@ ring (goal _ _ P _ Args as G) GS :- std.do! [
446453 quote.ring Ring none Ring (x\ x) T1 RE1 PE1 VarMap,
447454 quote.ring Ring none Ring (x\ x) T2 RE2 PE2 VarMap
448455 ) ReifTime,
449- coq.say "Reification:" ReifTime "sec.",
456+ if-verbose ( coq.say "Reification:" ReifTime "sec.") ,
450457 list-constant Ty VarMap VarMap',
451458 list-constant _ Lpe Lpe',
452459 std.assert-ok! (coq.typecheck Lpe' _) "Ill-typed term",
@@ -455,7 +462,7 @@ ring (goal _ _ P _ Args as G) GS :- std.do! [
455462 std.time (
456463 ring-reflection ComRing VarMap' Lpe' RE1 RE2 PE1 PE2 LpeProofs' G GS
457464 ) ReflTime,
458- coq.say "Reflection:" ReflTime "sec.",
465+ if-verbose ( coq.say "Reflection:" ReflTime "sec.") ,
459466 ].
460467
461468pred field-reflection i:term, i:term, i:term, i:term, i:term, i:term,
@@ -468,7 +475,10 @@ field-reflection _ _ _ _ _ _ _ _ _ _ :-
468475 coq.ltac.fail 0 "Not a valid ring equation".
469476
470477pred field i:goal, o:list sealed-goal.
471- field (goal _ _ P _ Args as G) GS :- std.do! [
478+ field (goal _ _ P _ Args as G) GS :-
479+ attributes A, !,
480+ coq.parse-attributes A [att "verbose" bool] Opts, !,
481+ Opts => std.do! [
472482 @ltacfail! 0 => std.assert-ok!
473483 (coq.unify-eq P {{ @eq lp:Ty lp:T1 lp:T2 }})
474484 "The goal is not an equation",
@@ -484,7 +494,7 @@ field (goal _ _ P _ Args as G) GS :- std.do! [
484494 field-mode => quote.ring Ring (some Field) Ring (x\ x) T1 RE1 PE1 VarMap,
485495 field-mode => quote.ring Ring (some Field) Ring (x\ x) T2 RE2 PE2 VarMap
486496 ) ReifTime,
487- coq.say "Reification:" ReifTime "sec.",
497+ if-verbose ( coq.say "Reification:" ReifTime "sec.") ,
488498 list-constant Ty VarMap VarMap',
489499 list-constant _ Lpe Lpe',
490500 std.assert-ok! (coq.typecheck Lpe' _) "Ill-typed term",
@@ -495,5 +505,5 @@ field (goal _ _ P _ Args as G) GS :- std.do! [
495505 (field-reflection NField VarMap' Lpe' RE1 RE2 PE1 PE2 LpeProofs' G GS)
496506 (field-reflection Field VarMap' Lpe' RE1 RE2 PE1 PE2 LpeProofs' G GS)
497507 ) ReflTime,
498- coq.say "Reflection:" ReflTime "sec.",
508+ if-verbose ( coq.say "Reflection:" ReflTime "sec.") ,
499509 ].
0 commit comments