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

Limitation when matching pair of indexed types #3230

Open
mtzguido opened this issue Mar 28, 2024 · 0 comments
Open

Limitation when matching pair of indexed types #3230

mtzguido opened this issue Mar 28, 2024 · 0 comments

Comments

@mtzguido
Copy link
Member

noeq
type task_state : int -> Type u#2 =
  | Ready    : post:int -> task_state post

let min (post1:int) (post2:int) (x:task_state post1) (y : task_state post2) : prop =
  match x, y with
  | Ready _, Ready _ -> False

This gives:

* Error 230 at Bug.fst(10,10-10,11):
  - Variable "uu___#1116" not found

It can be circumvented by nested matches, at the possible expense of some repetition. Annotating the pair also works:

let min (post1:int) (post2:int) (x:task_state post1) (y : task_state post2) : prop =
  match (x, y) <: task_state post1 & task_state post2 with
  | (Ready _, Ready _) -> False
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