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

Error messages referring to inferred capabilities are not helpful #135

Open
b-studios opened this issue Sep 9, 2022 · 0 comments
Open
Labels

Comments

@b-studios
Copy link
Collaborator

In the following example the generated error message refers to an implicitly inferred capability. It is never bound and impossible to understand:

effect Yield(): Unit

def foo() = {
  var x in global = 42;
  x = x + 1
  def bar(): Unit / {} = do Yield();
  println(x)
  fun() { bar() }
}

def main() = try {
  foo() 
} with Yield { resume(()) }

image

The inferred type of foo also mentions the capability (which is equally hard to understand)

image

We need a proper way to refer to capabilities that are introduced for effects.

@b-studios b-studios added the bug Something isn't working label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant