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

Update the PPX to use the 4.08 ASTs #697

Closed
1 task done
aantron opened this issue Jul 26, 2019 · 3 comments
Closed
1 task done

Update the PPX to use the 4.08 ASTs #697

aantron opened this issue Jul 26, 2019 · 3 comments
Assignees
Milestone

Comments

@aantron
Copy link
Collaborator

aantron commented Jul 26, 2019

  • Update constraints in lwt_ppx.opam.
@aantron aantron added this to the 4.2.2 milestone Jul 26, 2019
@aantron aantron self-assigned this Jul 26, 2019
@Drup
Copy link
Member

Drup commented Jul 26, 2019

Does it actually need updates ? omp should take care of everything.

@aantron
Copy link
Collaborator Author

aantron commented Jul 26, 2019

This is what I get with the current lwt_ppx...

Source:

let (let*) x f = f x

let () =
  let* p =
    let%lwt () = Lwt_io.printl "Hello world!" in
    Lwt.return ()
  in

  Lwt_main.run p
$ ocamlfind opt -version 
4.08.0
$ ocamlfind opt -linkpkg -package lwt_ppx foo.ml
Fatal error: exception File "foo.ml", line 4, characters 2-6: let operators are not supported before OCaml 4.08
File "foo.ml", line 1:
Error: Error while running external preprocessor
$ dune exec ocamlc -- -version
4.08.0
$ dune build foo.exe
         ppx foo.pp.ml (exit 2)
(cd _build/default && .ppx/95c43a5e8eeb6d851e1995d1bca87765/ppx.exe -o foo.pp.ml --impl foo.ml --dump-ast)
Fatal error: exception File "foo.ml", line 4, characters 2-6: let operators are not supported before OCaml 4.08

I guess that's raised here.

I think we are supposed to keep up with the latest AST.

@aantron
Copy link
Collaborator Author

aantron commented Jul 26, 2019

The commit does fix the errors shown above.

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

No branches or pull requests

2 participants