diff options
| -rw-r--r-- | pretyping/reductionops.ml | 4 | ||||
| -rw-r--r-- | pretyping/reductionops.mli | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml index 2cb7b80f73..76a053872a 100644 --- a/pretyping/reductionops.ml +++ b/pretyping/reductionops.ml @@ -770,6 +770,10 @@ let decomp_sort env sigma t = | Sort s -> s | _ -> raise NotASort +let is_sort env sigma arity = + try let _ = decomp_sort env sigma arity in true + with NotASort -> false + (* reduction to head-normal-form allowing delta/zeta only in argument of case/fix (heuristic used by evar_conv) *) diff --git a/pretyping/reductionops.mli b/pretyping/reductionops.mli index 0ac1fe1188..987d07912f 100644 --- a/pretyping/reductionops.mli +++ b/pretyping/reductionops.mli @@ -164,6 +164,7 @@ val decomp_n_prod : val splay_prod_assum : env -> evar_map -> constr -> Sign.rel_context * constr val decomp_sort : env -> evar_map -> types -> sorts +val is_sort : env -> evar_map -> types -> bool type 'a miota_args = { mP : constr; (* the result type *) |
