We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following program does not produce any output
fun run() { handle({ println(intToString(do Foo(40,2))) }) { case <Foo(x,y) => resume> -> resume(x+y) } } fun mainPage(_) { page <#><button l:onclick="{run()}">Click me!</button></#> } fun main() { addRoute("/", mainPage); servePages() } main()
after hoisting the inlined computation to a thunk, the program produces the expected output
fun f() { println(intToString(do Foo(40,2))) } fun run() { handle(f()) { case <Foo(x,y) => resume> -> resume(x+y) } } fun mainPage(_) { page <#><button l:onclick="{run()}">Click me!</button></#> } fun main() { addRoute("/", mainPage); servePages() } main()
The problem seems to be that the inlined computation is being compiled with the wrong continuation.
The text was updated successfully, but these errors were encountered:
I had a look at this again. The problem is that the continuation is inadvertently thrown away due to the way let bindings are compiled.
A quick fix would be to inspect the shape of the computation M during compilation to wrap it in fun() { M }() if M is a sequence of bindings.
M
fun() { M }()
A better solution would be to make sure the continuation is threaded correctly through the translation pass.
Sorry, something went wrong.
dhil
No branches or pull requests
The following program does not produce any output
after hoisting the inlined computation to a thunk, the program produces the expected output
The problem seems to be that the inlined computation is being compiled with the wrong continuation.
The text was updated successfully, but these errors were encountered: