-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
playground: reason syntax and react ppx #602
Conversation
@anmonteiro I am running into some issue with errors from ppxlib, where the locations are missing for some reason. Repro:
The problem seems to be that |
This reverts commit 24d0f07.
@@ -86,7 +85,11 @@ module Reason = struct | |||
(* you can't throw an Error here. jsoo parses the string and turns it | |||
into something else *) | |||
let throwAnything = Js.Unsafe.js_expr "function(a) {throw a}" in | |||
try code |> Js.to_string |> Lexing.from_string |> f | |||
let code = | |||
(* Add ending new line as otherwise reason parser chokes with inputs such as "//" *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this reasonml/reason#2350, which was fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like. I have no idea why it's reappearing now, maybe because in playground case we don't have EOF?
This is ready, the only thing I could not figure out is why when there are errors coming from melange ppx, the line locations are gone (asked above). |
mystery solved 1b89c2f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to depend on Reason 3.9 before we merge this (see ocaml/opam-repository#23945).
That release ports Reason to ppxlib and breaks the current interface file signature.
Thanks!
Sounds good. |
let make_compiler name impl = | ||
export name | ||
let () = | ||
export "ocaml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should call this melange
.
feel free to do in a future PR, I don't want to unblock this one further
Based on #538, continues the work from there to add:
melange.belt
are required as if they were in node_modules//
input