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

HaMLet S: exhaustiveness check for record ellipsis #10

Closed
minoki opened this issue May 14, 2023 · 1 comment
Closed

HaMLet S: exhaustiveness check for record ellipsis #10

minoki opened this issue May 14, 2023 · 1 comment

Comments

@minoki
Copy link
Contributor

minoki commented May 14, 2023

The following program is (correctly) rejected because the pattern is non-exhaustive:

let val { a = SOME f } = { a = SOME (fn x => x) }
in f 1;
   f "x"
end;

But, a slight modification circumvents the exhaustiveness checker and allows the program to compile without a warning:

let val { ... = { a = SOME f } } = { a = SOME (fn x => x) }
in f 1;
   f "x"
end;

The exhaustiveness checker should correctly handle ... pattern.

@rossberg
Copy link
Owner

Indeed, it seems like I never extended the exhaustiveness check to extensible records. Fixed now, thanks for reporting!

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

2 participants