diff options
| author | herbelin | 2006-09-01 11:18:17 +0000 |
|---|---|---|
| committer | herbelin | 2006-09-01 11:18:17 +0000 |
| commit | 1fe97f12f24f596ab2408348e7556d483ed58e96 (patch) | |
| tree | 3e93ff6031bb01a122c252f28c23e387b5428a1e | |
| parent | c0d3aade079394ec1e457c807ba0e104be6f6128 (diff) | |
Ajout is_sort: test si se réduit en une sorte
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9106 85f007b7-540e-0410-9357-904b9bb8a0f7
| -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 *) |
