aboutsummaryrefslogtreecommitdiff
path: root/checker/inductive.ml
diff options
context:
space:
mode:
authorMaxime Dénès2017-05-29 00:45:16 +0200
committerMaxime Dénès2017-05-29 00:45:16 +0200
commit4c1260299b707bd27765b0ab365092046b134a69 (patch)
tree22331e8562bee137a5d2eea79c0d8e3d43cb94c1 /checker/inductive.ml
parentf5e0757c1df43f315a425b8fe4d3397818f8cb76 (diff)
parent8a807b2ffc27b84c9ea0ffe9f22b164ade24badb (diff)
Merge PR#512: [cleanup] Unify all calls to the error function.
Diffstat (limited to 'checker/inductive.ml')
-rw-r--r--checker/inductive.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/checker/inductive.ml b/checker/inductive.ml
index 8f23a38afc..9e417a8eb5 100644
--- a/checker/inductive.ml
+++ b/checker/inductive.ml
@@ -27,7 +27,7 @@ type mind_specif = mutual_inductive_body * one_inductive_body
let lookup_mind_specif env (kn,tyi) =
let mib = lookup_mind kn env in
if tyi >= Array.length mib.mind_packets then
- error "Inductive.lookup_mind_specif: invalid inductive index";
+ user_err Pp.(str "Inductive.lookup_mind_specif: invalid inductive index");
(mib, mib.mind_packets.(tyi))
let find_rectype env c =
@@ -232,7 +232,7 @@ let type_of_constructor_subst cstr u (mib,mip) =
let specif = mip.mind_user_lc in
let i = index_of_constructor cstr in
let nconstr = Array.length mip.mind_consnames in
- if i > nconstr then error "Not enough constructors in the type.";
+ if i > nconstr then user_err Pp.(str "Not enough constructors in the type.");
constructor_instantiate (fst ind) u mib specif.(i-1)
let type_of_constructor_gen (cstr,u) (mib,mip as mspec) =