Skip to content
This repository has been archived by the owner on Mar 21, 2020. It is now read-only.

Add PolyKinds to Data.GADT.Compare.TH #6

Merged
merged 3 commits into from
May 14, 2016
Merged

Conversation

ryantrinkle
Copy link
Collaborator

This allows deriveGCompare to generate instances of GCompare for types of kind (k -> ) rather than just ( -> *)

This allows deriveGCompare to generate instances of GCompare for types of kind (k -> *) rather than just (* -> *)
@ryantrinkle
Copy link
Collaborator Author

I just added support for GHC 8 here; it's very ugly, but it's not clear to me how to do it substantially better.

@mokus0
Copy link
Owner

mokus0 commented May 14, 2016

does the GHC 8 support get any cleaner now that your patch to th-extras is on hackage?

@ryantrinkle
Copy link
Collaborator Author

I don't think it does, at least not in a terribly obvious way. What's happening is that there was an extra field added to InstanceD, which we need to pattern match against and then reconstruct.

For DataD and DataInstD, we could potentially use accessors for all of the fields we need and pattern match with DataD {} and DataInstD {}, respectively, provided those accessors exist somewhere.

@mokus0
Copy link
Owner

mokus0 commented May 14, 2016

ok, no need to spend a bunch of effort prettifying the solution to an ugly problem.

@mokus0 mokus0 merged commit a6b4f84 into mokus0:master May 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants