diff options
| author | Enrico Tassi | 2020-10-13 15:32:54 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2020-11-02 10:05:17 +0100 |
| commit | 7de7fe612ffc5a598311f9542e57e50803ff2007 (patch) | |
| tree | 282e882f6f9b8ebd99ee627d0c1c26a728148104 /vernac | |
| parent | bd4d20106589562b12186ac2d02a665cf7b49dbe (diff) | |
[doc] attribute #[using]
Diffstat (limited to 'vernac')
| -rw-r--r-- | vernac/attributes.ml | 2 | ||||
| -rw-r--r-- | vernac/comDefinition.ml | 6 | ||||
| -rw-r--r-- | vernac/comFixpoint.ml | 3 | ||||
| -rw-r--r-- | vernac/comProgramFixpoint.ml | 6 | ||||
| -rw-r--r-- | vernac/vernacentries.ml | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/vernac/attributes.ml b/vernac/attributes.ml index c55a7928d9..efba6d332a 100644 --- a/vernac/attributes.ml +++ b/vernac/attributes.ml @@ -229,6 +229,6 @@ let uses_parser : string key_parser = fun orig args -> assert_once ~name:"using" orig; match args with | VernacFlagLeaf str -> str - | _ -> CErrors.user_err (Pp.str "Ill formed uses attribute") + | _ -> CErrors.user_err (Pp.str "Ill formed \"using\" attribute") let using = attribute_of_list ["using",uses_parser] diff --git a/vernac/comDefinition.ml b/vernac/comDefinition.ml index aa71e58cf6..3fc74cba5b 100644 --- a/vernac/comDefinition.ml +++ b/vernac/comDefinition.ml @@ -121,7 +121,8 @@ let do_definition ?hook ~name ~scope ~poly ~kind ?using udecl bl red_option c ct let using = using |> Option.map (fun expr -> let terms = body :: match types with Some x -> [x] | None -> [] in let l = Proof_using.process_expr (Global.env()) evd expr terms in - Names.Id.Set.(List.fold_right add l empty)) in + Names.Id.Set.(List.fold_right add l empty)) + in let kind = Decls.IsDefinition kind in let cinfo = Declare.CInfo.make ~name ~impargs ~typ:types ?using () in let info = Declare.Info.make ~scope ~kind ?hook ~udecl ~poly () in @@ -140,7 +141,8 @@ let do_definition_program ?hook ~pm ~name ~scope ~poly ~kind ?using udecl bl red let using = using |> Option.map (fun expr -> let terms = body :: match types with Some x -> [x] | None -> [] in let l = Proof_using.process_expr (Global.env()) evd expr terms in - Names.Id.Set.(List.fold_right add l empty)) in + Names.Id.Set.(List.fold_right add l empty)) + in let term, typ, uctx, obls = Declare.Obls.prepare_obligation ~name ~body ~types evd in let pm, _ = let cinfo = Declare.CInfo.make ~name ~typ ~impargs ?using () in diff --git a/vernac/comFixpoint.ml b/vernac/comFixpoint.ml index bd11fa2b47..29bf5fbcc2 100644 --- a/vernac/comFixpoint.ml +++ b/vernac/comFixpoint.ml @@ -263,7 +263,8 @@ let build_recthms ~indexes ?using fixnames fixtypes fiximps = let env = Global.env() in let sigma = Evd.from_env env in let l = Proof_using.process_expr env sigma expr terms in - Names.Id.Set.(List.fold_right add l empty)) in + Names.Id.Set.(List.fold_right add l empty)) + in let args = List.map Context.Rel.Declaration.get_name ctx in Declare.CInfo.make ~name ~typ ~args ~impargs ?using () ) fixnames fixtypes fiximps diff --git a/vernac/comProgramFixpoint.ml b/vernac/comProgramFixpoint.ml index c2e07c4fd5..9623317ddf 100644 --- a/vernac/comProgramFixpoint.ml +++ b/vernac/comProgramFixpoint.ml @@ -262,7 +262,8 @@ let build_wellfounded pm (recname,pl,bl,arityc,body) poly ?using r measure notat let using = using |> Option.map (fun expr -> let terms = List.map EConstr.of_constr [evars_def; evars_typ] in let l = Proof_using.process_expr env sigma expr terms in - Names.Id.Set.(List.fold_right add l empty)) in + Names.Id.Set.(List.fold_right add l empty)) + in let uctx = Evd.evar_universe_context sigma in let cinfo = Declare.CInfo.make ~name:recname ~typ:evars_typ ?using () in let info = Declare.Info.make ~udecl ~poly ~hook () in @@ -294,7 +295,8 @@ let do_program_recursive ~pm ~scope ~poly ?using fixkind fixl = let using = using |> Option.map (fun expr -> let terms = [def; typ] in let l = Proof_using.process_expr env evd expr terms in - Names.Id.Set.(List.fold_right add l empty)) in + Names.Id.Set.(List.fold_right add l empty)) + in let def = nf_evar evd (Termops.it_mkNamedLambda_or_LetIn def rec_sign) in let typ = nf_evar evd (Termops.it_mkNamedProd_or_LetIn typ rec_sign) in let evm = collect_evars_of_term evd def typ in diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index b6e7d22732..bc03994ca6 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -501,7 +501,7 @@ let program_inference_hook env sigma ev = let vernac_set_used_variables ~pstate e : Declare.Proof.t = let env = Global.env () in let sigma, _ = Declare.Proof.get_current_context pstate in - let initial_goals pf = Proofview.initial_goals Proof.(data pf).Proof.entry in + let initial_goals pf = Proofview.initial_goals Proof.((data pf).entry) in let tys = List.map snd (initial_goals (Declare.Proof.get pstate)) in let l = Proof_using.process_expr env sigma e tys in let vars = Environ.named_context env in |
