[Ur] Several patches and questions

Edward Z. Yang ezyang at MIT.EDU
Wed Dec 19 07:29:13 EST 2012


Excerpts from Adam Chlipala's message of Thu Nov 29 00:58:30 +0800 2012:
> > 2.) Is it reasonable to support ad-hoc tags in the compiler, defined
> > by the user? Previously I proposed some tags as compiler patches, but
> > I realize this is inflexible. Instead, I would like to be able to
> > write a syntactic form similar to the basis library. Say:
> >
> >     tag audio : ...
> >    
> 
> I can support this easily with a small patch to allow tags to be defined 
> in FFI modules beside [Basis].  The core tags don't have actual 
> implementations anywhere, and it's easy to enable the same possibilities 
> for tags in further FFI modules.  I.e., no need to define a C function 
> returning a string.  (The identifier is used to figure out the tag name.)
> 
> Sound good?

This appears to be deficient in a few ways:

    1. Some tags/attributes conflict with reserved keywords in Ur/Web
    (e.g. name) so we need a way of using that is not reserved but
    specifying the proper translation.

    2. This doesn't allow us to add extra attributes to Ur/Web for existing
    tags.  Probably the easiest way to do that is use the translation
    mechanism to allow "extended tags" which have different types but
    translate into the same tag as some built-in.

This sounds a little fiddly to implement since right now the translation
is all baked into monoize.sml atm.

Edward



More information about the Ur mailing list