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

tcresolve: cannot infer in presence of universe variables #3263

Open
W95Psp opened this issue Apr 24, 2024 · 0 comments
Open

tcresolve: cannot infer in presence of universe variables #3263

W95Psp opened this issue Apr 24, 2024 · 0 comments

Comments

@W95Psp
Copy link
Contributor

W95Psp commented Apr 24, 2024

In the presence of universe variables, tcresolve doesn't work. Consider the following module:

module Bug

class foo (t: Type0): Type = { u: Type }
// or this explicit version, same issue:
// class foo (t: Type0): Type u#(max 1 (n+1)) = { u: Type u#n }

let works {| foo u#m 't |}: foo u#m 't = _ by (FStar.Tactics.Typeclasses.tcresolve ())
[@expect_failure]
let fails {| foo 't |}: foo 't = _ by (FStar.Tactics.Typeclasses.tcresolve ())

The uvars of the top-level fails are basically infered as:

let fails {| foo u#n 't |}: foo u#m 't = _ by (FStar.Tactics.Typeclasses.tcresolve ())

Thus the goal is impossible to fill.

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