Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
57cf0c69
Commit
57cf0c69
authored
Aug 09, 2014
by
Kim Nguyễn
Committed by
Pietro Abate
Sep 08, 2014
Browse files
Sync with ocaml 4.02 trunk (changes in parser/location.mli)
Fix minor problem in runtime/value.ml
parent
cbb31f75
Changes
3
Hide whitespace changes
Inline
Side-by-side
ocamliface/4.02/location.ml
View file @
57cf0c69
...
@@ -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
ocamliface/4.02/mlstub.ml
View file @
57cf0c69
...
@@ -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
.
Abstract
s
.
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
.
p
rint
et
Types
.
Print
.
p
p_type
et
Types
.
Print
.
p
rint
vt
;
Types
.
Print
.
p
p_type
vt
;
exit
1
exit
1
);
);
...
...
runtime/value.ml
View file @
57cf0c69
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment