Michael Stone wrote:
On 3/5/10, Adam Chlipala<[email protected]>  wrote:
The short answer is: the Ur/Web compiler is specialized to the standard
library.  It compiles anything with a tag type like an XML tag.  You
gave<pre>  a tag type, so you got the behavior you wanted. :-)
Is the responsible logic mainly to be found in Monoize.monoExp
(specifically the cases following line 2545 in the 20100213 source
release)?

Yup.

It's worth pointing out that you will still encounter some friction from
the optimizer, which doesn't know that whitespace inside<pre>  has
special semantics.  Every sequence of whitespace will be collapsed into
one.  More special compiler support would really be needed to avoid
this.  (Or I could turn off that optimization, but it's just so much
fun. :])
Good to know. Where does this logic live?

That would be mono_opt.sml.

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to