1. 7
  1. 1

    I have recently began writing bucklescript bindings to the webextension API and I’m happy to report that it was a very nice experience with two gotchas. First the JS module system is not available to the extension runtime in FF except if you load your scripts from a background page (go figure) and second a lazily evaluated language can have some problem modelling the functions you receive from the browser. Even if you have a function type A * B => C which checks out the runtime might desugar this to A =>B =>C and do partial applications. The nice part is that Ocaml has an escape hatch to make uncurryed functions so it was relatively easy to fix.