promise
promise copied to clipboard
Melange compatibility
@aantron would you support making this library compatible with Melange? I don't think many changes would be needed, mostly a couple of changes on opam and dune files. cc @davesnx
Using Melange would unlock a fix for https://github.com/aantron/promise/issues/52.
One thing that comes to mind is that because melange also uses dune, a new library should be added, maybe they could be called promise.native and promise.melange or something like that.
I have vendored this project under server-reason-react on https://github.com/ml-in-barcelona/server-reason-react/tree/main/packages/promise, and changes that I made was:
- Add dune file for js/
- Remove
type Resultand result dependency on native/ (was there for compatibility with 4.02) - Remove
type resulton js/ (was there for compatibility with BuckleScript < 6)
Just my 2 cents about ReScript/Melnage. If there's a need for a compatibility with ReScript (https://github.com/aantron/promise/issues/73) maybe we could migrate either js/promise.re to ReScript and keep it under a bsconfig folder or migrate to OCaml and add the dune with the modes melange.
I have done this similar stuff for styled-ppx and it's a decent solution