Hi! We're trying to implement Parsec in Ur/Web (following http://research.microsoft.com/en-us/um/people/daan/download/papers/parsec-paper.pdf ). When trying to use our implementation we got "Anonymous function remains at code generation".
The following parser was enough to cause the error: _ <- char #"x"; _ <- char #"y"; return () When you only use a single char parser (one level of bind), it doesn't occur. Here's a test case: https://gist.github.com/yuuko273/1352059b69e71d7015dd . We think the problem is the lambda inside bind - the rest of the code just serves to demonstrate the error without it being optimized out. This seems like a barrier that will stop combinator parser libraries from being used in Ur, is there a workaround or some other way of implementing this that would allow it to be used? (N.B. for efficiency later on we would need to thunk the reply a parameters of the consumed data type, it is possible that this would trigger a similar issue) _______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
