[Ur] Defining new tags like <pre>...

Adam Chlipala adamc at impredicative.com
Fri Mar 5 18:03:06 EST 2010


Michael Stone wrote:
> On 3/5/10, Adam Chlipala<adamc at impredicative.com>  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.



More information about the Ur mailing list