-
Notifications
You must be signed in to change notification settings - Fork 72
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
?self implicit param under GHC 9.0.2 #371
Comments
Thanks for the report! "Salvage some usability" seems a bit strong: I have been using the new versions for a while with simplified subsumption and I didn't encounter anything too painful, type inference did most of the work for me. But it is definitely possible that some things got harder. Would you have some example of code that is giving you problems? Unfortunately the |
(Also, your second link to "issue" points to the same place as the explanation of subsumption.) |
"Salvage some usability" is not meant as a characterization of the current general usability or lack thereof, but specific to the actual problematic cases that exist because of the changes in GHC 9.0.1. While trying to build taffybar master, I encountered some errors that were quite confusing to me and the GHC error message were not very helpful. Now that I have experience this issue, these cases are not as confusing. So, I was wondering if there are ways to reduce the confusion for someone not expecting these problems. As for specific changes required, I had to make this change in taffybar for it to build with GHC 9.0.1: I've fixed the second link. |
Thanks for filing the GHC issue! I cannot think of anything that we could do to improve on this, other than not using implicit parameters (but then we need a solution to the gtk4 issue, and I cannot think of anything better). Hopefully there is something that can be done, this simplified subsumption business has also forced me to modify a bunch of code, even without implicit parameters: 15d6b30 |
Just a quick note to record (for anyone finding this issue after getting a mystifying compilation error relating to the I will still leave the issue open in case anyone can come up with a way of fixing things in the case of simplified subsumption. |
I have been looking into this a bit more. Just for the record, taffybar now seems to compile fine without the |
Recent versions of packages in this project started using a
?self
implicit parameter in many functions. GHC 9.0.2 has "simplied subsumption", which requires eta-expansion in some cases where GHC 8.10.7 did not require it, in particular when a function taking?self
is passed as an argument in function call. There is a related GHC issue that gives an example of the new problem.The result of all this is that functions that take implicit parameters are harder to use in GHC 9.0.2. Until this issue is somehow address, is there anything simple that can be done when using the packages in this project to salvage some usability for functions in this project that use
?self
?The text was updated successfully, but these errors were encountered: