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

Modernize TH #53

Merged
merged 1 commit into from
Apr 7, 2022
Merged

Modernize TH #53

merged 1 commit into from
Apr 7, 2022

Conversation

3noch
Copy link
Collaborator

@3noch 3noch commented Apr 2, 2020

From @cgibbard:

This PR is to make deriveGEq, deriveGCompare, and deriveGShow work on many more types.

There were a bunch of various handwritten instances in other projects which I was able to replace with TH.

One thing in particular that I recall fixing were cases where a dictionary argument made Show available for an argument also, cases where there were multiple parameter GADTs and you ended up needing Eq on one of the earlier parameters like

data Foo a b where
  A :: a -> Foo a a

You end up needing an Eq instance on a. I think it was messing this up in some fashion or something close to this.

@cgibbard
Copy link
Contributor

cgibbard commented Apr 2, 2020

There are a couple of commented-out instances for DeriveGCompare and DeriveGEq, we need to reinstate/rewrite them.

@meditans meditans requested a review from cgibbard April 29, 2020 21:38
@3noch
Copy link
Collaborator Author

3noch commented May 6, 2020

The build is failing because th-extras 0.5 doesn't exist. We'll have to release that first.

@3noch
Copy link
Collaborator Author

3noch commented May 6, 2020

@cgibbard Is this all we need? mokus0/th-extras#6

@3noch
Copy link
Collaborator Author

3noch commented May 8, 2020

The merge of master into this branch is incorrect and must be redone.

@Ericson2314 Ericson2314 force-pushed the cg-modernise-th branch 2 times, most recently from a96d9bf to 37e3ca5 Compare December 17, 2021 21:30
Remove dependency on th-extras which was pretty much only needed for one
small function.

Set lower bound on containers to ensure Data.Map.Merge.Lazy exists.
@Ericson2314 Ericson2314 changed the base branch from develop to master December 17, 2021 23:22
@Ericson2314 Ericson2314 changed the base branch from master to develop December 17, 2021 23:22
@cgibbard cgibbard merged commit 3e55aa9 into develop Apr 7, 2022
@Ericson2314 Ericson2314 deleted the cg-modernise-th branch April 7, 2022 18:47
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.

4 participants