Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
visitors
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POTTIER Francois
visitors
Commits
07948b5b
Commit
07948b5b
authored
Aug 28, 2017
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility with OCaml 4.05.0.
parent
c8f02bab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
src/Visitors.ml
src/Visitors.ml
+2
-2
src/VisitorsCompatibility.cppo.ml
src/VisitorsCompatibility.cppo.ml
+19
-0
src/VisitorsGeneration.ml
src/VisitorsGeneration.ml
+1
-1
No files found.
src/Visitors.ml
View file @
07948b5b
...
...
@@ -387,7 +387,7 @@ let ty_env =
let
tyvar_visitor_method_type
=
if
X
.
poly
"env"
then
Typ
.
poly
[
"env"
]
(
ty_arrow
ty_env
ty_any
)
typ_
poly
[
"env"
]
(
ty_arrow
ty_env
ty_any
)
else
ty_any
...
...
@@ -538,7 +538,7 @@ let quantify (alphas : tyvars) (ty : core_type) : core_type =
alphas
in
(* Done. *)
Typ
.
poly
alphas
ty
typ_
poly
alphas
ty
(* -------------------------------------------------------------------------- *)
...
...
src/VisitorsCompatibility.cppo.ml
View file @
07948b5b
let
mknoloc
=
Location
.
mknoloc
open
Asttypes
open
Parsetree
open
Ast_helper
...
...
@@ -68,3 +69,21 @@ let data_constructor_variety (cd : constructor_declaration) =
|
Pcstr_record
lds
->
DataInlineRecord
(
ld_labels
lds
,
ld_tys
lds
)
#
endif
(* Between OCaml 4.04 and OCaml 4.05, the types of several functions in [Ast_helper]
have changed. They used to take arguments of type [string], and now take arguments
of type [str], thus requiring a conversion. These functions include [Typ.object_],
[Typ.poly], [Exp.send], [Exp.newtype], [Ctf.val_], [Ctf.method_], [Cf.inherit_]. *)
let
string2str
(
s
:
string
)
=
#
if
OCAML_VERSION
<
(
4
,
05
,
0
)
s
#
else
mknoloc
s
#
endif
let
typ_poly
(
tyvars
:
string
list
)
(
cty
:
core_type
)
:
core_type
=
Typ
.
poly
(
List
.
map
string2str
tyvars
)
cty
let
exp_send
(
e
:
expression
)
(
m
:
string
)
:
expression
=
Exp
.
send
e
(
string2str
m
)
src/VisitorsGeneration.ml
View file @
07948b5b
...
...
@@ -467,7 +467,7 @@ let is_virtual (Meth (_, _, oe, _)) : bool =
(* [send o m es] produces a call to the method [o#m] with arguments [es]. *)
let
send
(
o
:
variable
)
(
m
:
methode
)
(
es
:
expressions
)
:
expression
=
app
(
Exp
.
send
(
evar
o
)
m
)
es
app
(
exp_
send
(
evar
o
)
m
)
es
(* -------------------------------------------------------------------------- *)
...
...
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