[Ur] anonymous function remains

Adam Chlipala adamc at impredicative.com
Fri Sep 23 08:54:27 EDT 2011


Gergely Buday wrote:
> I get the following error message:
>
> [gergoe at flagship sandbox]$ urweb mapm
> /home/gergoe/local/sandbox/mapm.ur:12:45-12:56: Anonymous function
> remains at code generation
> [...]
>
> fun main () =
>      sources<- List.mapM source (tabulate 12 (fn n =>  0));
>      return<xml/>
>
> [gergoe at flagship sandbox]$ cat mapm.urp
>    

Minor gotcha about the way the optimizer works.  No first-class 
functions may remain after optimization for server-side code, and 
higher-order functions are currently only specialized to particular 
function arguments when those arguments occur as prefixes of the full 
argument lists.  That is, swap the argument order of [tabulate] and it 
should work.



More information about the Ur mailing list