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

Inline functions that are not in the same compile unit #223

Open
julianhyde opened this issue Feb 2, 2024 · 0 comments
Open

Inline functions that are not in the same compile unit #223

julianhyde opened this issue Feb 2, 2024 · 0 comments

Comments

@julianhyde
Copy link
Collaborator

We can currently inline the plus1 function in

fun plus3 x =
  let
    fun plus1 x = x + 1
  in
    (plus1 x) + 2
  end

but not when plus1 is declared earlier in the same session:

fun plus1 x = x + 1;
fun plus3 x = (plus1 x) + 2;

This limitation makes the interactive experience inferior. It also prevents us from executing Datalog-style queries with boolean functions such as

fun worksFor (empno, deptno) =
  {empno, deptno} elem emps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant