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 ForallF and ForallT in terms of Forall #24

Merged
merged 1 commit into from
Mar 15, 2016

Conversation

treeowl
Copy link
Contributor

@treeowl treeowl commented Mar 15, 2016

The now-polykinded Forall is capable of expressing both
ForallF and ForallT with a few helper classes. This
confines the "trusted" portion of the module to inst.

@treeowl
Copy link
Contributor Author

treeowl commented Mar 15, 2016

@oerjan, do you think you could check whether this modification reintroduces superclass cycles or anything else horrible?

The now-polykinded `Forall` is capable of expressing both
`ForallF` and `ForallT` with a few helper classes. This
confines the "trusted" portion of the module to `inst`.
ekmett added a commit that referenced this pull request Mar 15, 2016
Implement ForallF and ForallT in terms of Forall
@ekmett ekmett merged commit d440f1d into ekmett:master Mar 15, 2016
@oerjan
Copy link
Contributor

oerjan commented Mar 15, 2016

@treeowl Sorry, I had a disk crash back in October/November only a few days after I had satisfactorily set up my GitHub account, which not only wiped out some of my setup but also left all my files in backup storage. The timing felt almost like an omen. So I basically lost motivation on this. Currently I have neither GHC nor the test files on my computer. (Also, due to this and some health issues, my general following of Haskell community happenings is currently backlogged to mid-January.)

One thing I did worry about is that the new UndecidableSuperClasses system in GHC 8.0 is likely to completely change how to avoid these errors. Without further changes to the extension, I suspect that all users will need to enable it explicitly. It should eventually end up simpler but it might need code duplication to work on both < and >= 8.0.

@treeowl
Copy link
Contributor Author

treeowl commented Mar 15, 2016

@oerjan, I'm very sorry to hear you're having troubles. I hope you get back on your feet soon.

@treeowl treeowl deleted the collapse-forall branch March 15, 2016 02:30
@treeowl
Copy link
Contributor Author

treeowl commented Mar 15, 2016

It's possible to cut down ForallT to just one helper class by using ForallF:

class ForallF p (t a) => Q p t a

This cuts out R. Unfortunately, of the two helper classes, R is more easily given a decent name (ComposeC2 or similar). If there's some advantage to doing this anyway, I can make the change.

@Ericson2314 Ericson2314 mentioned this pull request Jan 29, 2019
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.

None yet

3 participants