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

Ppx: fix loc info of sequence exp #602

Merged
merged 2 commits into from
Jul 9, 2018
Merged

Conversation

kandu
Copy link
Contributor

@kandu kandu commented Jul 4, 2018

This fixes a tiny problem that merlin didn't show type/range info of sequence exp.

@kandu
Copy link
Contributor Author

kandu commented Jul 5, 2018

the second commit makes the compilation error(pattern matching produced by ppx) more precise.
cc @hcarty

@aantron aantron merged commit 9e72b0f into ocsigen:master Jul 9, 2018
@aantron
Copy link
Collaborator

aantron commented Jul 10, 2018

Thanks, and thanks for catching the issue addressed by the second commit!

FTR, I used this code to trigger the error:

let () =
  let p = Lwt.return 1 ;%lwt Lwt.return () in
  ignore p

without the second commit, it triggers

File "foo.ml", line 2, characters 10-22:
Error: This pattern matches values of type unit
       but a pattern was expected which matches values of type int

with the commit, the error location is:

File "foo.ml", line 2, characters 25-28:

@hcarty
Copy link
Contributor

hcarty commented Jul 10, 2018

Thank you @kandu!

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.

3 participants