diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-08-11 15:15:46 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-08-11 15:15:46 +0000 |
commit | a07e31a2693bde01d3dca59364693096d550561a (patch) | |
tree | 322e0acb77a7dfc1a2276b88a73357ffc09a08a7 /kernel/reduction.ml | |
parent | 9cfe880e1f5f9dddd63aa269a2fb159665c2d182 (diff) |
Ensures that let-in's in arities of inductive types work well. Maybe not
very useful in practice but as soon as let-in's were not forbidden in
the internal data structure, better to do it. Moreover, this gets
closer to the view were inductive definitions are uniformly built from
"contexts". (checker not changed!)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12273 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/reduction.ml')
-rw-r--r-- | kernel/reduction.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/reduction.ml b/kernel/reduction.ml index f1a44b5ca..89f1b443b 100644 --- a/kernel/reduction.ml +++ b/kernel/reduction.ml @@ -117,6 +117,15 @@ let beta_appvect c v = | _ -> applist (substl env t, stack) in stacklam [] c (Array.to_list v) +let betazeta_appvect n c v = + let rec stacklam n env t stack = + if n = 0 then applist (substl env t, stack) else + match kind_of_term t, stack with + Lambda(_,_,c), arg::stacktl -> stacklam (n-1) (arg::env) c stacktl + | LetIn(_,b,_,c), _ -> stacklam (n-1) (b::env) c stack + | _ -> anomaly "Not enough lambda/let's" in + stacklam n [] c (Array.to_list v) + (********************************************************************) (* Conversion *) (********************************************************************) |