Closed joprice closed 3 years ago
This is probably because the underlying HTML parser, Markup.ml, makes very heavy use of tail calls, and js_of_ocaml and/or JS engines don't have tail-call optimization. This is "tracked" in https://github.com/aantron/markup.ml/issues/26. The reason for the quotes is that I'm not sure what can reasonably be done about it. Perhaps it has been addressed in newer versions of js_of_ocaml?
3.7.0 is the latest version, from August 05, so I assume its TCO support hasn't improved yet. It definitely should do something about it, I don't think any library ought to limits its use of TCO because one certain backend can't do it.
Thanks for the info. The same code is working great when targeting native, I was trying to see if I could reuse it in a web context. Luckily, it's not too much to rewrite using dom apis.
Closing in favor of https://github.com/aantron/markup.ml/issues/26.
I get the error below when I call
Soup.fold
.Is the library usable from js_of_ocaml 3.7, or maybe I'm doing something wrong?