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

Comments

Projects
1 participant
@PaulBone
Copy link
Member

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 added a commit that referenced this issue Jul 1, 2019

[compiler/pre] Appologise for a lack of mutual recursion for closures
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.