Hi Artyom,
I believe what is happening is that current Scala actually has literals defined as part of the language. It also relies on a library called scala-xml to actually model and work with the parsed xml literals; the monadic-html project uses a stripped down version of scala-xml that is included in the project.
However, I've heard that nextgen Scala (dotty) will use XML interpolation like:
val myXml = xml"<someXml></someXml>"
So maybe not quite as nice, but it saves complexity in the compiler in a "post-XML era"; I don't think this has been implemented in dotty as yet:
When I try I get the following error:
|value `xml` is not a member of StringContext - did you mean `StringContext.s`?
This implies that it will indeed be done as a library, when can presumably be overridden by using Scala Implicit classes to perhaps supply your own StringContext, but it sounds like there are a few competing solutions that are yet to be fleshed out.