diff options
| author | Pierre-Marie Pédrot | 2014-03-01 16:34:54 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-03-01 17:11:15 +0100 |
| commit | 4cddb7d0765a091c6514a85475dcdd7af34aaf29 (patch) | |
| tree | 90e3aa55f64c9ecb0d96e1d9d9fb68497f268fca /interp | |
| parent | da0db0a69a4e78841f9a8cf06ae4be17292bedbf (diff) | |
Never suppress the typing constraint of bound variables whose name was
reserved with Implicit Type.
Diffstat (limited to 'interp')
| -rw-r--r-- | interp/constrextern.ml | 6 | ||||
| -rw-r--r-- | interp/reserve.ml | 13 | ||||
| -rw-r--r-- | interp/reserve.mli | 1 |
3 files changed, 3 insertions, 17 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml index ffb8a46ea1..a3410544ef 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -664,12 +664,12 @@ let rec extern inctx scopes vars r = extern inctx scopes (add_vname vars na) c) | GProd (loc,na,bk,t,c) -> - let t = extern_typ scopes vars (anonymize_if_reserved na t) in + let t = extern_typ scopes vars t in let (idl,c) = factorize_prod scopes (add_vname vars na) na bk t c in CProdN (loc,[(Loc.ghost,na)::idl,Default bk,t],c) | GLambda (loc,na,bk,t,c) -> - let t = extern_typ scopes vars (anonymize_if_reserved na t) in + let t = extern_typ scopes vars t in let (idl,c) = factorize_lambda inctx scopes (add_vname vars na) na bk t c in CLambdaN (loc,[(Loc.ghost,na)::idl,Default bk,t],c) @@ -788,7 +788,7 @@ and extern_local_binder scopes vars = function LocalRawDef((Loc.ghost,na), extern false scopes vars bd) :: l) | (na,bk,None,ty)::l -> - let ty = extern_typ scopes vars (anonymize_if_reserved na ty) in + let ty = extern_typ scopes vars ty in (match extern_local_binder scopes (name_fold Id.Set.add na vars) l with (assums,ids,LocalRawAssum(nal,k,ty')::l) when constr_expr_eq ty ty' && diff --git a/interp/reserve.ml b/interp/reserve.ml index 4328be7d86..744cf616c8 100644 --- a/interp/reserve.ml +++ b/interp/reserve.ml @@ -112,16 +112,3 @@ let default_env () = { ninterp_rec_vars = Id.Map.empty; ninterp_only_parse = false; } - -let anonymize_if_reserved na t = match na with - | Name id as na -> - (try - if not !Flags.raw_print && - (try - let ntn = notation_constr_of_glob_constr (default_env ()) t in - Pervasives.(=) ntn (find_reserved_type id) (** FIXME *) - with UserError _ -> false) - then GHole (Loc.ghost,Evar_kinds.BinderType na,None) - else t - with Not_found -> t) - | Anonymous -> t diff --git a/interp/reserve.mli b/interp/reserve.mli index de72a410d1..8ae55d0961 100644 --- a/interp/reserve.mli +++ b/interp/reserve.mli @@ -14,4 +14,3 @@ open Notation_term val declare_reserved_type : Id.t located list -> notation_constr -> unit val find_reserved_type : Id.t -> notation_constr -val anonymize_if_reserved : Name.t -> glob_constr -> glob_constr |
