Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/ocamlbuild/slurp.ml b/ocamlbuild/slurp.ml
- index d6c2846..fba88c3 100644
- --- a/ocamlbuild/slurp.ml
- +++ b/ocamlbuild/slurp.ml
- @@ -134,7 +134,7 @@ let slurp_with_find path =
- let lines =
- My_unix.run_and_open (Printf.sprintf "%s %s" find_cmd (Filename.quote path)) begin fun ic ->
- let acc = ref [] in
- - try while true do acc := input_line ic :: !acc done; []
- + try while true do acc := input_line ic :: !acc done
- with End_of_file -> !acc
- end in
- let res =
- diff --git a/typing/typecore.ml b/typing/typecore.ml
- index 61f4ea9..e517fab 100644
- --- a/typing/typecore.ml
- +++ b/typing/typecore.ml
- @@ -2216,11 +2216,18 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected =
- exp_env = env }
- | Pexp_while(scond, sbody) ->
- let cond = type_expect env scond Predef.type_bool in
- + let exp_type =
- + match cond.exp_desc with
- + | Texp_construct(_, {cstr_name="true"}, _) ->
- + instance env ty_expected
- + | _ ->
- + instance_def Predef.type_unit
- + in
- let body = type_statement env sbody in
- rue {
- exp_desc = Texp_while(cond, body);
- exp_loc = loc; exp_extra = [];
- - exp_type = instance_def Predef.type_unit;
- + exp_type;
- exp_attributes = sexp.pexp_attributes;
- exp_env = env }
- | Pexp_for(param, slow, shigh, dir, sbody) ->
Add Comment
Please, Sign In to add comment