[Ur] Let inlining interfering with staging

Adam Chlipala adamc at csail.mit.edu
Wed Sep 19 18:05:13 EDT 2012


On 09/16/2012 10:10 PM, Edward Z. Yang wrote:
> It looks like Ur/Web's inlining improved.
> Alas, it appears to now interfere with my ability to stage code:
>
> (**)
>      fun main n =
>        let val x = foo n
>        in return<xml><body><active code={txn; return x} /></body></xml>
> (**)
>
> where foo is some benignEffectful function, it looks like x is now
> being inlined (which is no good if it's FFI!)  Any ideas?
>    

I've added an embarrassing "fix" for this problem: a certain inlining 
optimization skips firing if the type of the variable indicates it could 
have been returned by an FFI function. :D

Clearly the next redesign of Ur/Web should have a more principled, 
type-based approach to controlling where different categories of effects 
are legal.



More information about the Ur mailing list