From b9f47391f7f259c24119d1de0a87839e2cc5e80c Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Sat, 24 Jul 2010 20:01:08 +0200 Subject: Imported Upstream snapshot 8.3~beta0+13323 --- pretyping/cases.ml | 2 +- pretyping/cases.mli | 2 +- pretyping/cbv.ml | 2 +- pretyping/cbv.mli | 2 +- pretyping/classops.ml | 29 +++++++++++++++++++++++++---- pretyping/classops.mli | 2 +- pretyping/clenv.ml | 2 +- pretyping/clenv.mli | 2 +- pretyping/coercion.ml | 2 +- pretyping/coercion.mli | 2 +- pretyping/detyping.ml | 2 +- pretyping/detyping.mli | 2 +- pretyping/evarconv.ml | 2 +- pretyping/evarconv.mli | 2 +- pretyping/evarutil.ml | 2 +- pretyping/evarutil.mli | 2 +- pretyping/evd.ml | 2 +- pretyping/evd.mli | 3 +-- pretyping/indrec.ml | 2 +- pretyping/indrec.mli | 2 +- pretyping/inductiveops.ml | 2 +- pretyping/inductiveops.mli | 2 +- pretyping/matching.ml | 2 +- pretyping/matching.mli | 2 +- pretyping/namegen.ml | 2 +- pretyping/namegen.mli | 2 +- pretyping/pattern.ml | 2 +- pretyping/pattern.mli | 2 +- pretyping/pretype_errors.ml | 2 +- pretyping/pretype_errors.mli | 2 +- pretyping/pretyping.ml | 2 +- pretyping/pretyping.mli | 2 +- pretyping/rawterm.ml | 2 +- pretyping/rawterm.mli | 2 +- pretyping/recordops.ml | 2 +- pretyping/recordops.mli | 2 +- pretyping/reductionops.ml | 2 +- pretyping/reductionops.mli | 2 +- pretyping/retyping.ml | 2 +- pretyping/retyping.mli | 2 +- pretyping/tacred.ml | 2 +- pretyping/tacred.mli | 2 +- pretyping/term_dnet.ml | 2 +- pretyping/term_dnet.mli | 2 +- pretyping/termops.ml | 2 +- pretyping/termops.mli | 2 +- pretyping/typeclasses.ml | 3 +-- pretyping/typeclasses.mli | 2 +- pretyping/typeclasses_errors.ml | 2 +- pretyping/typeclasses_errors.mli | 2 +- pretyping/typing.ml | 2 +- pretyping/typing.mli | 2 +- pretyping/unification.ml | 2 +- pretyping/unification.mli | 2 +- pretyping/vnorm.ml | 2 +- pretyping/vnorm.mli | 2 +- 56 files changed, 80 insertions(+), 61 deletions(-) mode change 100755 => 100644 pretyping/recordops.mli (limited to 'pretyping') diff --git a/pretyping/cases.ml b/pretyping/cases.ml index d3813660..eb02f7ae 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* !automatically_import_coercions); + optwrite = (:=) automatically_import_coercions } + +let cache_coercion (_,(coe,stre,isid,cls,clt,ps)) = add_class cls; add_class clt; let is,_ = class_info cls in @@ -352,8 +363,17 @@ let load_coercion i (_,(coe,stre,isid,cls,clt,ps)) = add_new_coercion coe xf; add_coercion_in_graph (xf,is,it) -let cache_coercion o = - load_coercion 1 o +let load_coercion _ o = + if + !automatically_import_coercions || Flags.version_less_or_equal Flags.V8_2 + then + cache_coercion o + +let open_coercion _ o = + if not + (!automatically_import_coercions || Flags.version_less_or_equal Flags.V8_2) + then + cache_coercion o let subst_coercion (subst,(coe,stre,isid,cls,clt,ps as obj)) = let coe' = subst_coe_typ subst coe in @@ -382,6 +402,7 @@ let classify_coercion (coe,stre,isid,cls,clt,ps as obj) = let (inCoercion,_) = declare_object {(default_object "COERCION") with + open_function = open_coercion; load_function = load_coercion; cache_function = cache_coercion; subst_function = subst_coercion; diff --git a/pretyping/classops.mli b/pretyping/classops.mli index 63d5b0a4..54e57131 100644 --- a/pretyping/classops.mli +++ b/pretyping/classops.mli @@ -1,6 +1,6 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(*