Announcement: philip2 - an Elm-to-Bucklescript compiler


Hey folks, we wrote an Elm-to-Bucklescript compiler to help us make the transition to Bucklescript. It’s now open source:



Would love to hear any feedback people have from using it!


This looks really cool, I posted this comment on Medium but I’m curious what led you to stop using Elm and start using OCaml?


Sorry, seems you answered here:

Basically no way to call to JavaScript directly broke a bunch of their app.


Hey, yes that’s right (see also

Bucklescript’s JS interop is much more flexible than Elm’s, but Elm 0.18 allowed you to call JS pretty directly. That’s no longer the case unfortunately in Elm 0.19, and our attempt to make it work went nowhere.


Hi pbiggar - I also have big problems caused Elm 0.19 restriction on native modules. Could you describe how you attempted to make it work? I’m thinking of ways that I might be able to work around the issue. Without having looked into it too much, I was imagining that I could just mimic the way that the elm-core and elm-explorations do it - I don’t mind having an elm.json file that has wrong info (e.g. claims to be part of elm-explorations). In terms of installing 3rd party things, it gets harder that way, but still possible.

Would this approach not work? Did you explore other approaches?



The approach we tried was very similar to (though not quite as nice as)