diff options
-rw-r--r-- | bytecomp/translcore.ml | 11 | ||||
-rw-r--r-- | stdlib/sys.ml | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/bytecomp/translcore.ml b/bytecomp/translcore.ml index 565eb74da..392a9afe6 100644 --- a/bytecomp/translcore.ml +++ b/bytecomp/translcore.ml @@ -327,14 +327,13 @@ let check_recursive_lambda idlist lam = | Levent (lam, _) -> check idlist lam | lam -> let fv = free_variables lam in - List.for_all (fun id -> not(IdentSet.mem id fv)) idlist + not (List.exists (fun id -> IdentSet.mem id fv) idlist) and add_let id arg idlist = - match arg with - Lvar id' -> if List.mem id' idlist then id :: idlist else idlist - | Llet(_, _, _, body) -> add_let id body idlist - | Lletrec(_, body) -> add_let id body idlist - | _ -> idlist + let fv = free_variables arg in + if List.exists (fun id -> IdentSet.mem id fv) idlist + then id :: idlist + else idlist and add_letrec bindings idlist = List.fold_right (fun (id, arg) idl -> add_let id arg idl) diff --git a/stdlib/sys.ml b/stdlib/sys.ml index 66960d49c..f034a351f 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.ml @@ -77,4 +77,4 @@ let catch_break on = (* OCaml version string, must be in the format described in sys.mli. *) -let ocaml_version = "3.06+20 (2002-12-12)";; +let ocaml_version = "3.06+21 (2003-01-08)";; |