diff options
| author | Maxime Dénès | 2017-07-28 18:23:46 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2017-07-28 18:23:46 +0200 |
| commit | e8bb8ea0da02b926e076cf04ea1c82c547a30ea2 (patch) | |
| tree | 1eadb6305528d826955cecc9b4dd6bcaccc0be86 /printing | |
| parent | 3828267b6dcd60088a11fe0b9613871e4fc7c54f (diff) | |
| parent | d9530632321c0b470ece6337cda2cf54d02d61eb (diff) | |
Merge PR #889: Removing template polymorphism for definitions.
Diffstat (limited to 'printing')
| -rw-r--r-- | printing/prettyp.ml | 17 | ||||
| -rw-r--r-- | printing/printmod.ml | 2 |
2 files changed, 6 insertions, 13 deletions
diff --git a/printing/prettyp.ml b/printing/prettyp.ml index 827c0e4583..17249262ea 100644 --- a/printing/prettyp.ml +++ b/printing/prettyp.ml @@ -501,9 +501,6 @@ let print_body env evd = function let print_typed_body env evd (val_0,typ) = (print_body env evd val_0 ++ fnl () ++ str " : " ++ pr_ltype_env env evd typ) -let ungeneralized_type_of_constant_type t = - Typeops.type_of_constant_type (Global.env ()) t - let print_instance sigma cb = if Declareops.constant_is_polymorphic cb then let univs = Declareops.constant_polymorphic_context cb in @@ -515,17 +512,13 @@ let print_instance sigma cb = let print_constant with_values sep sp = let cb = Global.lookup_constant sp in let val_0 = Global.body_of_constant_body cb in - let typ = match cb.const_type with - | RegularArity t as x -> - begin match cb.const_universes with - | Monomorphic_const _ -> x + let typ = + match cb.const_universes with + | Monomorphic_const _ -> cb.const_type | Polymorphic_const univs -> let inst = Univ.AUContext.instance univs in - RegularArity (Vars.subst_instance_constr inst t) - end - | TemplateArity _ as x -> x + Vars.subst_instance_constr inst cb.const_type in - let typ = ungeneralized_type_of_constant_type typ in let univs = let otab = Global.opaque_tables () in match cb.const_body with @@ -698,7 +691,7 @@ let print_full_pure_context () = | "CONSTANT" -> let con = Global.constant_of_delta_kn kn in let cb = Global.lookup_constant con in - let typ = ungeneralized_type_of_constant_type cb.const_type in + let typ = cb.const_type in hov 0 ( match cb.const_body with | Undef _ -> diff --git a/printing/printmod.ml b/printing/printmod.ml index 5c7dcdc10f..219eafda4c 100644 --- a/printing/printmod.ml +++ b/printing/printmod.ml @@ -323,7 +323,7 @@ let print_body is_impl env mp (l,body) = str " :" ++ spc () ++ hov 0 (Printer.pr_ltype_env env sigma (Vars.subst_instance_constr u - (Typeops.type_of_constant_type env cb.const_type))) ++ + cb.const_type)) ++ (match cb.const_body with | Def l when is_impl -> spc () ++ |
