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

Add: impossible macro #969

Closed
wants to merge 2 commits into from

Conversation

macrologist
Copy link
Collaborator

Pattern matches on ADTs often require matching on cases that are never intended to be encountered in reality, but would fail exhaustiveness checks if not matched. The impossible macro produces an expression of type :a and signals an error at runtime.

@stylewarning
Copy link
Member

bike shed: I prefer "unreachable" but I'm not married to it.

@macrologist
Copy link
Collaborator Author

ahh unreachable already exists

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

Successfully merging this pull request may close these issues.

2 participants