aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/reduction.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2013-12-17 16:12:50 +0100
committerGravatar Matthieu Sozeau <mattam@mattam.org>2013-12-17 16:12:50 +0100
commit35e47b6be8d9e97b58464daccc28d179951b5e47 (patch)
tree09fd0f336e1fdd774ebbcd41d2849dfb54c76cb9 /kernel/reduction.ml
parentfb59652405d0e6a9d1100142d473374cd82ae16b (diff)
Tentative fix of the guardedness checker by Christine and me. All stdlib and test-suite pass.
Diffstat (limited to 'kernel/reduction.ml')
-rw-r--r--kernel/reduction.ml15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/reduction.ml b/kernel/reduction.ml
index 40b8bd4cc..db858e0a0 100644
--- a/kernel/reduction.ml
+++ b/kernel/reduction.ml
@@ -564,6 +564,21 @@ let dest_prod_assum env =
in
prodec_rec env empty_rel_context
+let dest_lam_assum env =
+ let rec lamec_rec env l ty =
+ let rty = whd_betadeltaiota_nolet env ty in
+ match kind_of_term rty with
+ | Lambda (x,t,c) ->
+ let d = (x,None,t) in
+ lamec_rec (push_rel d env) (add_rel_decl d l) c
+ | LetIn (x,b,t,c) ->
+ let d = (x,Some b,t) in
+ lamec_rec (push_rel d env) (add_rel_decl d l) c
+ | Cast (c,_,_) -> lamec_rec env l c
+ | _ -> l,rty
+ in
+ lamec_rec env empty_rel_context
+
exception NotArity
let dest_arity env c =