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

Use quantified superclass of Eq1/Ord1 to derive instance when available #29

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Apr 24, 2024

No description provided.

@Bodigrim
Copy link

Shall NFData / Read / Show get the same treatment?

@phadej
Copy link
Collaborator Author

phadej commented Apr 24, 2024

Read and Show: I don't see a point. Neither should be performance critical.

NFData is different, I think I'll add it, with deepseq >= 1.5 and GHC >=8.6 (soft-implied by deepseq >=1.5 constraint already). Which in practice will also be GHC-9.6+ thing (as no-one really upgrades deepseq).

Sadly, Hashable1 cannot be made the same, as Hashable1 has the Eq1 superconstraint, and it's powerful enough only with GHC-9.6+; and bringing hashables lower bound support that high right now is probably too soon.

@phadej phadej changed the title Use quanified superclass of Eq1/Ord1 to derive instance when available Use quantified superclass of Eq1/Ord1 to derive instance when available Jun 9, 2024
The laws of Eq1/Ord1, i.e. `eq1 = liftEq (==) = (==)` guarantee
that this change should be non-breaking (though observable).
@phadej phadej merged commit c3f59d9 into master Jul 4, 2024
18 checks passed
@phadej phadej deleted the quantified branch July 4, 2024 20:03
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