Skip to content

Commit

Permalink
Support OCaml 4.08 (#305)
Browse files Browse the repository at this point in the history
* Support OCaml 4.08

* Merlin extend is in reason

* newest reason from master

* Use released Reason, get rid of build warnings

* better instructions for assembling the compiler sources

* Use OCaml_current, fix compilation after rebase

* build against OCaml 4.08.1 and run esy
  • Loading branch information
anmonteiro authored and jaredly committed Sep 10, 2019
1 parent ac9d35b commit 7db4260
Show file tree
Hide file tree
Showing 286 changed files with 89,267 additions and 1,735 deletions.
15 changes: 8 additions & 7 deletions core/Query.re
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,19 @@ let findInScope = (pos, name, stamps) => {

let rec joinPaths = (modulePath, path) => {
switch modulePath {
| Path.Pident(ident) => (Ident.binding_time(ident), Ident.name(ident), path)
| Path.Pident(ident) => (Current.ident_binding_time(ident), Ident.name(ident), path)
| Path.Papply(fnPath, _argPath) => joinPaths(fnPath, path)
| Path.Pdot(inner, name, _) => joinPaths(inner, Nested(name, path))
| Path.Pdot(inner, name) => joinPaths(inner, Nested(name, path))
}
};

let rec makePath = (modulePath) => {
switch modulePath {
| Path.Pident(ident) when Ident.binding_time(ident) === 0 => `GlobalMod(Ident.name(ident))
| Path.Pident(ident) => `Stamp(Ident.binding_time(ident))
| Path.Pident(ident) when Current.ident_binding_time(ident) === 0 =>
`GlobalMod(Ident.name(ident))
| Path.Pident(ident) => `Stamp(Current.ident_binding_time(ident))
| Path.Papply(fnPath, _argPath) => makePath(fnPath)
| Path.Pdot(inner, name, _) => `Path(joinPaths(inner, Tip(name)))
| Path.Pdot(inner, name) => `Path(joinPaths(inner, Tip(name)))
}
};

Expand All @@ -67,13 +68,13 @@ let makeRelativePath = (basePath, otherPath) => {
Some(tip)
} else {
switch other {
| Pdot(inner, name, _) => loop(basePath, inner, Nested(name, tip))
| Pdot(inner, name) => loop(basePath, inner, Nested(name, tip))
| _ => None
}
}
};
switch otherPath {
| Path.Pdot(inner, name, _) => loop(basePath, inner, Tip(name))
| Path.Pdot(inner, name) => loop(basePath, inner, Tip(name))
| _ => None
}
};
Expand Down
14 changes: 7 additions & 7 deletions core/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(library
(wrapped false)
(name Core)
(public_name reason-language-server.Core)
(libraries Belt Vendor str Util)
(flags :standard -open Vendor -open Util -w -9)
(preprocess (pps Belt_ppx Ppx_monads))
)
(wrapped false)
(name Core)
(public_name reason-language-server.Core)
(libraries Belt Vendor str Util Current)
(flags :standard -open Vendor -open Util -w -9)
(preprocess
(pps Belt_ppx Ppx_monads)))
Loading

0 comments on commit 7db4260

Please sign in to comment.