@@ -3526,13 +3526,9 @@ Universe constraints are put in the constraint store.|})))),
35263526 let state , assignments = set_current_sigma ~depth state sigma in
35273527 state , r , assignments
35283528 with Pretype_errors. PretypeError (env , sigma , err ) ->
3529- match diag with
3530- | Data B. OK ->
3531- (* optimization : don't print the error if caller wants OK * )
3532- raise No_clause
3533- | _ ->
3534- let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3535- state , ?: None +! B. mkERROR error , [] )),
3529+ diag_error_lazy diag @@ fun () ->
3530+ let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3531+ state , ?: None +! B. mkERROR error , [] )),
35363532 DocAbove);
35373533
35383534 MLCode(Pred("coq.typecheck-ty" ,
@@ -3560,13 +3556,9 @@ Universe constraints are put in the constraint store.|})))),
35603556 let state , assignments = set_current_sigma ~depth state sigma in
35613557 state , r , assignments
35623558 with Pretype_errors. PretypeError (env , sigma , err ) ->
3563- match diag with
3564- | Data B. OK ->
3565- (* optimization : don't print the error if caller wants OK * )
3566- raise No_clause
3567- | _ ->
3568- let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3569- state , ?: None +! B. mkERROR error , [] )),
3559+ diag_error_lazy diag @@ fun () ->
3560+ let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3561+ state , ?: None +! B. mkERROR error , [] )),
35703562 DocAbove);
35713563
35723564 MLCode(Pred("coq.unify-eq" ,
@@ -3581,13 +3573,9 @@ Universe constraints are put in the constraint store.|})))),
35813573 let state , assignments = set_current_sigma ~depth state sigma in
35823574 state , !: B. mkOK , assignments
35833575 with Pretype_errors. PretypeError (env , sigma , err ) ->
3584- match diag with
3585- | Data B. OK ->
3586- (* optimization : don't print the error if caller wants OK * )
3587- raise No_clause
3588- | _ ->
3589- let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3590- state , !: (B. mkERROR error ), [] )),
3576+ diag_error_lazy diag @@ fun () ->
3577+ let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3578+ state , !: (B. mkERROR error ), [] )),
35913579 DocAbove);
35923580
35933581 MLCode(Pred("coq.unify-leq" ,
@@ -3602,13 +3590,9 @@ Universe constraints are put in the constraint store.|})))),
36023590 let state , assignments = set_current_sigma ~depth state sigma in
36033591 state , !: B. mkOK , assignments
36043592 with Pretype_errors. PretypeError (env , sigma , err ) ->
3605- match diag with
3606- | Data B. OK ->
3607- (* optimization : don't print the error if caller wants OK * )
3608- raise No_clause
3609- | _ ->
3610- let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3611- state , !: (B. mkERROR error ), [] )),
3593+ diag_error_lazy diag @@ fun () ->
3594+ let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3595+ state , !: (B. mkERROR error ), [] )),
36123596 DocAbove);
36133597
36143598 MLCode(Pred("coq.elaborate-skeleton" ,
@@ -3651,13 +3635,9 @@ Supported attributes:
36513635 let state , assignments = set_current_sigma ~depth state sigma in
36523636 state , ?: None +! uj_val +! B. mkOK , assignments
36533637 with Pretype_errors. PretypeError (env , sigma , err ) ->
3654- match diag with
3655- | Data B. OK ->
3656- (* optimization : don't print the error if caller wants OK * )
3657- raise No_clause
3658- | _ ->
3659- let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3660- state , ?: None +? None +! B. mkERROR error , [] )),
3638+ diag_error_lazy diag @@ fun () ->
3639+ let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3640+ state , ?: None +? None +! B. mkERROR error , [] )),
36613641 DocAbove);
36623642
36633643 MLCode(Pred("coq.elaborate-ty-skeleton" ,
@@ -3685,13 +3665,9 @@ Supported attributes:
36853665 let state , assignments = set_current_sigma ~depth state sigma in
36863666 state , !: sort +! uj_val +! B. mkOK , assignments
36873667 with Pretype_errors. PretypeError (env , sigma , err ) ->
3688- match diag with
3689- | Data B. OK ->
3690- (* optimization : don't print the error if caller wants OK * )
3691- raise No_clause
3692- | _ ->
3693- let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3694- state , ?: None +? None +! B. mkERROR error , [] )),
3668+ diag_error_lazy diag @@ fun () ->
3669+ let error = string_of_ppcmds proof_context .options @@ Himsg. explain_pretype_error env sigma err in
3670+ state , ?: None +? None +! B. mkERROR error , [] )),
36953671 DocAbove);
36963672
36973673 LPDoc "-- Coq's reduction flags ------------------------------------" ;
0 commit comments