diff options
Diffstat (limited to 'pretyping/program.ml')
| -rw-r--r-- | pretyping/program.ml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pretyping/program.ml b/pretyping/program.ml index 62aedcfbf6..caa5a5c8a6 100644 --- a/pretyping/program.ml +++ b/pretyping/program.ml @@ -19,7 +19,7 @@ let find_reference locstr dir s = let sp = Libnames.make_path dp (Id.of_string s) in try Nametab.global_of_path sp with Not_found -> - user_err_loc (Loc.ghost, "", str "Library " ++ Libnames.pr_dirpath dp ++ + user_err (str "Library " ++ Libnames.pr_dirpath dp ++ str " has to be required first.") let coq_reference locstr dir s = find_reference locstr ("Coq"::dir) s @@ -29,6 +29,7 @@ let init_constant dir s () = coq_constant "Program" dir s let init_reference dir s () = coq_reference "Program" dir s let papp evdref r args = + let open EConstr in let gr = delayed_force r in mkApp (Evarutil.e_new_global evdref gr, args) @@ -57,7 +58,9 @@ let coq_JMeq_refl = init_reference ["Logic";"JMeq"] "JMeq_refl" let coq_not = init_constant ["Init";"Logic"] "not" let coq_and = init_constant ["Init";"Logic"] "and" -let mk_coq_not x = mkApp (delayed_force coq_not, [| x |]) +let delayed_force c = EConstr.of_constr (c ()) + +let mk_coq_not x = EConstr.mkApp (delayed_force coq_not, [| x |]) let unsafe_fold_right f = function hd :: tl -> List.fold_right f tl hd @@ -67,7 +70,7 @@ let mk_coq_and l = let and_typ = delayed_force coq_and in unsafe_fold_right (fun c conj -> - mkApp (and_typ, [| c ; conj |])) + EConstr.mkApp (and_typ, [| c ; conj |])) l (* true = transparent by default, false = opaque if possible *) |
