ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

using jsoo-react.ppx with ppx_deriving causes compilation error #132

Closed joprice closed 2 years ago

joprice commented 2 years ago

When I try to use jsoo-react.ppx and ppx_deriving together, I get a type error.

File "src/react-test/data.ml", line 1, characters 0-50:
1 | type user = { id : int } [@@deriving yojson, show]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value pp_user

(I'm trying out the new bucklescript-tea style ocaml dsl, so I'm not even sure I need the %component extension right now as this is the first time I'm trying the library).

jchavarri commented 2 years ago

small repro:

let rec pp_user = 2

gets converted into

let pp_user = 2

after jsoo-react ppx passes.