Skip to content
New issue

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

Support mutually-recursive closures #177

Open
PaulBone opened this issue Jul 1, 2019 · 0 comments
Open

Support mutually-recursive closures #177

PaulBone opened this issue Jul 1, 2019 · 0 comments
Labels
component: compiler Concerning the compiler meta: triaged Has the issue been triaged yet? skill: mercury status: accepted A bug we intend to fix it. type: bug

Comments

@PaulBone
Copy link
Member

PaulBone commented Jul 1, 2019

Add support for mutually-recursive closures.

There are various ways to implement closures, some are naive (nested) and some are more optimal (https://www.cs.indiana.edu/~dyb/pubs/closureopt.pdf and others). I think that we're going to need to pass them through at least the pre stage as letrecs and possibly into the core stage for optimisation.

@PaulBone PaulBone added component: compiler Concerning the compiler skill: mercury status: accepted A bug we intend to fix it. type: bug labels Jul 1, 2019
@PaulBone PaulBone added the meta: triaged Has the issue been triaged yet? label Jul 1, 2019
PaulBone added a commit that referenced this issue Jul 1, 2019
We don't yet support mutually recrusive closures.  Part because it's
time to move on to working on something else and part because it's
unclear exactly what's the best way to do this.  See #177

src/pre.ast_to_core.m:
src/pre.env.m:
src/pre.from_ast.m:
    Detect and appologise for the lack of support for mutually recursive
    closures.

tests/missing/closure_06.exp:
tests/missing/closure_06.p:
    Add a test for the missing feature.
@PaulBone PaulBone added this to Maybe in Modules Jul 7, 2019
@PaulBone PaulBone moved this from Maybe to To do in Modules Jul 7, 2019
@PaulBone PaulBone moved this from To do to Maybe in Modules Jul 7, 2019
@PaulBone PaulBone removed this from Maybe in Modules Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: compiler Concerning the compiler meta: triaged Has the issue been triaged yet? skill: mercury status: accepted A bug we intend to fix it. type: bug
Projects
None yet
Development

No branches or pull requests

1 participant