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

Reorder constructors #1059

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Reorder constructors #1059

merged 2 commits into from
Feb 21, 2024

Conversation

mattam82
Copy link
Member

Adds a new unverified pass to reorder constructors (and hence the branches of cases as well). This allows to map Coq inductives to existing target language types more faithfully. For example in coq-malfunction we can map Coq's booleans (true | false naturally represented as Int(0) and Int(1)) to OCaml's booleans (false | true, represented as Int(0) and Int(1)), simplifying greatly writing correct FFIs for functions using booleans.

@mattam82 mattam82 merged commit f9c62c5 into coq-8.17 Feb 21, 2024
10 checks passed
@mattam82 mattam82 deleted the reorder-constructors branch February 21, 2024 18:19
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.

1 participant