Add pure modules in Tyxml_lwd
Being able to use Lwd.t for every Tyxml_lwd element's parameter is awesome, but when writing large documents, that's a lot of Lwd.pure.
This PR adds two modules in Tyxml_lwd: Pure.Html, and Pure.Svg that are counterparts of the Html and Svg modules, but which functions take pure arguments and convert them to Lwd.t.
This allows to re-use "normal" Tyxml code with Lwd.
Thanks for this work.
I understand that this make it easier to port existing code, however I am afraid this will grow the API unnecessarily.
I wonder if a set of well-designed combinators could reduce the friction of lifting non-reactive values, without introducing the confusion of having many large modules export similarly-named values with slightly differing types. I have a few ideas along these lines that I would like to experiment with.
In any case, these changes are meant to be used by opening a module at the beginning of some scope to shadow non-pure definitions?
I would prefer putting these definitions in a separate library, say tyxml-lwd.pure for instance. (But I would happily change my mind if this proves to cumbersome :))