aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/inductiveops.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2016-05-25 13:38:51 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2016-07-06 14:38:04 +0200
commita7ed091b6842cc78f0480504e84c3cfa261860bd (patch)
tree7122a406caabadd0ed0de01044593294a990a6de /pretyping/inductiveops.ml
parenta9010048c40c85b0f5e9c5fedaf2609121e71b89 (diff)
Move is_prim... to Inductiveops and correct Scheme
Now scheme will not try to build ill-typed dependent analyses on recursive records with primitive projections but report a proper error. Minor change of the API (adding one error case to recursion_scheme_error).
Diffstat (limited to 'pretyping/inductiveops.ml')
-rw-r--r--pretyping/inductiveops.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml
index fbad0d949..64932145e 100644
--- a/pretyping/inductiveops.ml
+++ b/pretyping/inductiveops.ml
@@ -269,6 +269,11 @@ let projection_nparams_env env p =
let projection_nparams p = projection_nparams_env (Global.env ()) p
+let is_primitive_record_without_eta mib =
+ match mib.mind_record with
+ | Some (Some _) -> mib.mind_finite <> Decl_kinds.BiFinite
+ | _ -> false
+
(* Annotation for cases *)
let make_case_info env ind style =
let (mib,mip) = Inductive.lookup_mind_specif env ind in