diff options
| author | letouzey | 2003-04-16 22:23:58 +0000 |
|---|---|---|
| committer | letouzey | 2003-04-16 22:23:58 +0000 |
| commit | 8568214f1b7950fe9c5d95c04e851c00f49751ce (patch) | |
| tree | 91d2fe6ba491c2e7df9ef28eccffcfe37fd286da /kernel/closure.ml | |
| parent | 391605f6195f92603ca960014db302dc79e6d24f (diff) | |
simplification: fst (list_chop n l) = firstn n l et snd (list_chop n l) = list_skipn n l
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3931 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/closure.ml')
| -rw-r--r-- | kernel/closure.ml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/closure.ml b/kernel/closure.ml index c3b828a39d..1e7dadb04e 100644 --- a/kernel/closure.ml +++ b/kernel/closure.ml @@ -474,9 +474,7 @@ let rec stack_tail p s = | Zapp args :: s -> let q = List.length args in if p >= q then stack_tail (p-q) s - else - let (_,aft) = list_chop p args in - Zapp aft :: s + else Zapp (list_skipn p args) :: s | _ -> failwith "stack_tail" let rec stack_nth s p = match s with | Zapp args :: s -> @@ -823,7 +821,7 @@ let rec drop_parameters depth n stk = if n > q then drop_parameters depth (n-q) s else if n = q then reloc_rargs depth s else - let (_,aft) = list_chop n args in + let aft = list_skipn n args in reloc_rargs depth (append_stack_list (aft,s)) | Zshift(k)::s -> drop_parameters (depth-k) n s | [] -> assert (n=0); [] |
