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

Implement Comparable for generated Java classes #131

Open
joshsh opened this issue Aug 9, 2024 · 0 comments
Open

Implement Comparable for generated Java classes #131

joshsh opened this issue Aug 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@joshsh
Copy link
Collaborator

joshsh commented Aug 9, 2024

The Hydra terms of any given type are totally ordered; you can compare any pair of terms for equality, greater than, or less than. That property extends to generated code, as well: if any pair of objects has the same logical type, and both objects have a term representation, you should be able to compare them. This is true of generated code in Haskell, but is only partially true of generated code in Java; in Java you can test two objects for equality, but you can't test them for greater than or less than. Fix this. Implement Comparable<A> for each A which currently implements Ord in Haskell.

@joshsh joshsh added the enhancement New feature or request label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant