> I suppose you desugar to a set of combinators, but you don't really expose those. Why ?
Why indeed. I personally find these "HTML in a programming language" tools pretty unappealing, because you have to give up all the normal tools of the programming language while using them [1].
Whereas you can usually write a really simple internal DSL to describe HTML that is as clear and concise as HTML, while being as convenient and powerful as the programming language. My quick and dirty efforts at this usually end up looking something like this:
html(
head(
title("My First Page")),
body(
h1("Welcome"),
p($("Made by "), a(href(), $("Tom"))),
userIsOldSchool()
? p("Bring back HTML 3.2!")
: div("Made with HTML 5.")))
The typed-html crate has an object model like this underneath, but doesn't, AFAICS, expose it.
[1] With the honourable exception of ScalaTags, which i still wouldn't touch with a bargepole