Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support other OCaml versions through 5.1 AST #6

Merged
merged 4 commits into from
Jun 3, 2024
Merged

Support other OCaml versions through 5.1 AST #6

merged 4 commits into from
Jun 3, 2024

Conversation

andreypopp
Copy link
Member

Currently mlx copies parser/AST from OCaml 5.1 and ocamlmerlin-mlx copies parser/AST (and everything else needed) from merlin's 510 branch (corresponds to 5.1 OCaml version).

So we say that mlx toolchain is based on OCaml 5.1.

Now to support other OCaml versions we need:

  1. to compiler 5.1 AST/parser with the current OCaml version
  2. convert AST to the current OCaml version's AST

This PR implements this with the help of ppxlib. Unfortunately 1. point above requires venturing more Merlin code and some Obj.magic (but hopefully we can get rid of it soon).

The mlx toolchain is based on OCaml 5.1 parset and AST (we cherry pick
source code for mlx and ocamlmerlin-mlx package). Then we use ppxlib to
convert from 5.1 AST to the current OCaml AST.
@andreypopp andreypopp merged commit 7f0164f into main Jun 3, 2024
6 checks passed
@andreypopp andreypopp deleted the 414 branch June 3, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant