aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2002-02-12 10:42:32 +0000
committerletouzey2002-02-12 10:42:32 +0000
commit97b58235341da0cfa3fdd88b0436f6d19be0a400 (patch)
treed33f61e626605e4882595e15bf8e08599b633988
parent1dde0e2599d43b30fd9d5ba4dfb3e358ca232078 (diff)
suppression de la condition de la permutation case/fun
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2470 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--contrib/extraction/mlutil.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/extraction/mlutil.ml b/contrib/extraction/mlutil.ml
index 26c88726e7..9cbbf15f61 100644
--- a/contrib/extraction/mlutil.ml
+++ b/contrib/extraction/mlutil.ml
@@ -407,12 +407,11 @@ and simpl_case o br e =
try (* Is each branch independant of [e] ? *)
check_constant_case br
with Impossible ->
- if (is_atomic e) then (* Swap the case and the lam if possible *)
- let ids,br = permut_case_fun br [] in
- let n = List.length ids in
- if n = 0 then MLcase (e, br)
- else named_lams (MLcase (ml_lift n e, br)) ids
- else MLcase (e, br)
+ (* Swap the case and the lam if possible *)
+ let ids,br = permut_case_fun br [] in
+ let n = List.length ids in
+ if n = 0 then MLcase (e, br)
+ else named_lams (MLcase (ml_lift n e, br)) ids
(*s Local [prop] elimination. *)
(* Try to eliminate as many [prop] as possible inside an [ml_ast]. *)