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

rewrite each could match types on each side #323

Open
mtzguido opened this issue Feb 11, 2025 · 0 comments
Open

rewrite each could match types on each side #323

mtzguido opened this issue Feb 11, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@mtzguido
Copy link
Member

let foo (x : list 'a) : slprop = emp

fn test ()
  requires foo [1]
  ensures  emp
{
  rewrite each [1] as [2];
  drop_ (foo [2]);
}

fn test2 ()
  requires foo [1]
  ensures  emp
{
  rewrite each [1] as [];
  drop_ (foo []);
}

The rewrite in test2 fails to work as we cannot resolve the type of the Nil constructor in the RHS of the rewrite, but it should be int, to match the LHS.

@mtzguido mtzguido added the enhancement New feature or request label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant