Skip to content

tcresolve: cannot infer in presence of universe variables  #3263

Open
@W95Psp

Description

@W95Psp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions