[Ur] Anonymous function remains at code generation?
Adam Chlipala
adamc at csail.mit.edu
Sun Jun 2 10:21:30 EDT 2013
On 06/01/2013 06:15 PM, Istvan Chung wrote:
> I'm getting the error
>
> test.ur:13:16: (to 13:27) Anonymous function remains at code
> generation
> Function: (fn _ : {} => None)
>
> For this code (sorry it's big!):<<EOF
>
This error message was a consequence of details of an optimization rule
in the compiler. Currently, all first-class functions must be
eliminated from server-side code before compilation ends; the code
generation scheme just doesn't have any way of dealing with them. Small
changes in optimizations can affect whether certain first-class
functions survive, and every piece of [transaction] code effectively
becomes such a function.
I've pushed a changeset that fixes the problem for your code, though it
might break something else. A different, more fundamental way of
handling this issue is on my to-do list for the next big Ur/Web rewrite. ;)
More information about the Ur
mailing list