Commit 57cf0c69 authored by Kim Nguyễn's avatar Kim Nguyễn Committed by Pietro Abate
Browse files

Sync with ocaml 4.02 trunk (changes in parser/location.mli)

Fix minor problem in runtime/value.ml
parent cbb31f75
...@@ -46,4 +46,5 @@ let error_of_printer_file = dummy ...@@ -46,4 +46,5 @@ let error_of_printer_file = dummy
let error_of_printer = dummy let error_of_printer = dummy
let error ?(loc=none) ?(sub=[]) ?(if_highlight="") = dummy let error ?(loc=none) ?(sub=[]) ?(if_highlight="") = dummy
let errorf = error let errorf = error
let raise_errorf = error
let absolute_path = dummy let absolute_path = dummy
...@@ -74,7 +74,7 @@ and typ_descr = function ...@@ -74,7 +74,7 @@ and typ_descr = function
| Abstract "int" -> Builtin_defs.caml_int | Abstract "int" -> Builtin_defs.caml_int
| Abstract "char" -> Builtin_defs.char_latin1 | Abstract "char" -> Builtin_defs.char_latin1
| Abstract "string" -> Builtin_defs.string_latin1 | Abstract "string" -> Builtin_defs.string_latin1
| Abstract s -> Types.abstract (Types.Abstract.atom s) | Abstract s -> Types.abstract (Types.Abstracts.atom s)
| Builtin ("list", [t]) | Builtin ("list", [t])
| Builtin ("array", [t]) -> Types.descr (Sequence.star_node (typ t)) | Builtin ("array", [t]) -> Types.descr (Sequence.star_node (typ t))
| Builtin ("Pervasives.ref", [t]) -> Builtin_defs.ref_type (typ t) | Builtin ("Pervasives.ref", [t]) -> Builtin_defs.ref_type (typ t)
...@@ -549,8 +549,8 @@ let check_value ty_env c_env (s,caml_t,t) = ...@@ -549,8 +549,8 @@ let check_value ty_env c_env (s,caml_t,t) =
Inferred type:@[%a@]@." Inferred type:@[%a@]@."
s s
print_ocaml caml_t print_ocaml caml_t
Types.Print.print et Types.Print.pp_type et
Types.Print.print vt; Types.Print.pp_type vt;
exit 1 exit 1
); );
......
...@@ -214,7 +214,7 @@ let rec flatten = function ...@@ -214,7 +214,7 @@ let rec flatten = function
let eval_lazy_concat v = let eval_lazy_concat v =
(* prevent the ocamlopt from statically allocating the (* prevent the ocamlopt from statically allocating the
value Pair(nil, Absent) *) value Pair(nil, Absent) *)
let accu = Obj.(magic (dup (repr (Pair (nil, Absent))))) in let accu = Obj.(magic (dup (repr (Pair (nil, Absent,Mono))))) in
let rec aux accu = function let rec aux accu = function
| Concat (x,y, _) -> aux (append_cdr accu x) y | Concat (x,y, _) -> aux (append_cdr accu x) y
| v -> set_cdr accu v | v -> set_cdr accu v
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment