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

Deferred block doesn't unify abilities list when it should. #4550

Open
ChrisPenner opened this issue Dec 31, 2023 · 0 comments
Open

Deferred block doesn't unify abilities list when it should. #4550

ChrisPenner opened this issue Dec 31, 2023 · 0 comments
Assignees

Comments

@ChrisPenner
Copy link
Contributor

unique type AbilityHolder g =
  AbilityHolder ('{g} ())


fails : AbilityHolder {Stream Nat}
fails = AbilityHolder (forever' do
  ()
  )

works : AbilityHolder {Stream Nat}
works = AbilityHolder (do
  ()
  )


alsoWorks : AbilityHolder {Stream Nat}
alsoWorks = AbilityHolder (forever' do
  emit 1
  )

It seems that something about forever' : '{g} a -> '{g} b is throwing off ability inference so that it doesn't allow the empty ability list to unify with an unused ability.

If I actually use the expected ability it works fine 🤷🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants