diff options
| author | Emilio Jesus Gallego Arias | 2019-07-10 16:13:22 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-07-23 18:53:46 +0200 |
| commit | b6000bd57f9dd20858678caee7e3962081243694 (patch) | |
| tree | d327178793209000e46bfb23cb74cc5674b244ef | |
| parent | bbf2ded61869b8aa48e34424c15e795961820721 (diff) | |
[lemmas] save_remaining_recthms doesn't need a norm parameter.
We make the interface to this function simpler, as a step towards
trying to remove the duplication of this function with the code in
`DeclareDef`.
| -rw-r--r-- | vernac/lemmas.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vernac/lemmas.ml b/vernac/lemmas.ml index a8c95cad02..6a754a0cde 100644 --- a/vernac/lemmas.ml +++ b/vernac/lemmas.ml @@ -247,7 +247,10 @@ let retrieve_first_recthm uctx = function | _ -> assert false (* Helper for process_recthms *) -let save_remaining_recthms env sigma ~poly ~scope norm univs body opaq i { Recthm.name; typ; impargs } = +let save_remaining_recthms env sigma ~poly ~scope ~udecl uctx body opaq i { Recthm.name; typ; impargs } = + let norm c = EConstr.to_constr (Evd.from_ctx uctx) c in + let body = Option.map EConstr.of_constr body in + let univs = UState.check_univ_decl ~poly uctx udecl in let t_i = norm typ in let kind = Decls.(IsAssumption Conjectural) in match body with @@ -300,10 +303,7 @@ let process_recthms ?fix_exn ?hook env sigma uctx ~udecl ~poly ~scope dref imps if List.is_empty other_thms then [] else (* there are several theorems defined mutually *) let body,opaq = retrieve_first_recthm uctx dref in - let norm c = EConstr.to_constr (Evd.from_ctx uctx) c in - let body = Option.map EConstr.of_constr body in - let uctx = UState.check_univ_decl ~poly uctx udecl in - List.map_i (save_remaining_recthms env sigma ~poly ~scope norm uctx body opaq) 1 other_thms in + List.map_i (save_remaining_recthms env sigma ~poly ~scope ~udecl uctx body opaq) 1 other_thms in let thms_data = (dref,imps)::other_thms_data in List.iter (fun (dref,imps) -> maybe_declare_manual_implicits false dref imps; |
