diff options
| author | Maxime Dénès | 2016-06-29 11:48:49 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2016-06-29 11:48:49 +0200 |
| commit | 58b6784fee71a16719bc4f268dc42830c06a5c63 (patch) | |
| tree | a9a3859746d2ff97f8c0b8106c96b49f9122a1b7 /proofs | |
| parent | 0e07e69dae3f3f4a99f824533f54a3991aacac6a (diff) | |
| parent | dd8d2a1d017d20635f943af205dcb0127a992a59 (diff) | |
Merge branch 'warnings' into trunk
Was PR#213: New warnings machinery
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/redexpr.ml | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml index 13b5848a33..ee55915211 100644 --- a/proofs/redexpr.ml +++ b/proofs/redexpr.ml @@ -29,10 +29,15 @@ let cbv_vm env sigma c = error "vm_compute does not support existential variables."; Vnorm.cbv_vm env c ctyp +let warn_native_compute_disabled = + CWarnings.create ~name:"native-compute-disabled" ~category:"native-compiler" + (fun () -> + strbrk "native_compute disabled at configure time; falling back to vm_compute.") + let cbv_native env sigma c = if Coq_config.no_native_compiler then - let () = Feedback.msg_warning (str "native_compute disabled at configure time; falling back to vm_compute.") in - cbv_vm env sigma c + (warn_native_compute_disabled (); + cbv_vm env sigma c) else let ctyp = Retyping.get_type_of env sigma c in Nativenorm.native_norm env sigma c ctyp @@ -209,6 +214,11 @@ let contextualize f g = function e_red (contextually b (l,c) (fun _ -> h)) | None -> e_red g +let warn_simpl_unfolding_modifiers = + CWarnings.create ~name:"simpl-unfolding-modifiers" ~category:"tactics" + (fun () -> + Pp.strbrk "The legacy simpl ignores constant unfolding modifiers.") + let reduction_of_red_expr env = let make_flag = make_flag env in let rec reduction_of_red_expr = function @@ -221,7 +231,7 @@ let reduction_of_red_expr env = let am = if !simplIsCbn then strong_cbn (make_flag f) else simpl in let () = if not (!simplIsCbn || List.is_empty f.rConst) then - Feedback.msg_warning (Pp.strbrk "The legacy simpl does not deal with delta flags.") in + warn_simpl_unfolding_modifiers () in (contextualize (if head_style then whd_am else am) am o,DEFAULTcast) | Cbv f -> (e_red (cbv_norm_flags (make_flag f)),DEFAULTcast) | Cbn f -> |
