Currently the Data.List monomorphisation is not mentioned in the release notes. Moreover, it would be great if we could provide guidance to users for automated refactoring strategies.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
This change is mentioned in the base changelog, but it's incorrectly mentioned in the 4.16.0.0 section (it should be the 4.17.0.0 section, I believe). In fact, now that I look closer, there are several miscategorized things under the 4.16.0.0 section, including the mention of re-exporting asum from Control.Applicative.
On Jun 20, 2021, at 10:57 AM, Edward Kmett ekmett@gmail.com wrote:
We definitely need to do more to communicate that this is changing and how users should adjust their code to suit.
Yes, I agree! Who is responsible for actually doing this communication, though? I don't think it should just be tucked into the release notes. This will be a major source of breakage in the next release.
Richard
@rae Instinctively I would say that the CLC would have the duty to make public such change and provide the necessary migration solutions?
I tend to agree, but I'd like to be more specific: who within @core-libraries will actually do it? I think this has the chance of turning into another story that bolsters the argument that Haskell does not care about backward-compatibility. We need to get out in front.
Indeed, I would have made noises against this change if I had been aware of the debate. I'm on the libraries@ list, but this particular, large change was debated in a thread that started just about adding singleton, which I had decided to stay out of. When the patch arrived, I asked for a pointer to any documentation of the debate, and was just referred to the thread, where it seemed a few voices just said "yes, let's pull the trigger". We really need a public process for this -- I imagine most would consider me an insider, and yet I was caught by surprise here.
The Data.List change has broken hundreds of packages, including ones which have not been updated in years. OTOH, my understanding of the benefit is that it makes it consistent with other contains modules which you normally export qualified and this seems like a very small win in comparison. In my opinion, the breakage nowhere near justifies the cost and it should be reverted. Until now it is mostly GHC developers feeling this I think because we are using HEAD to build many packages and updating head.hackage regularly.
I agree strongly with Richard's point about not seeming to not care about backwards compat, this change seems to provide only aesthetic benefits but produces magnitudes of busy-work!
This may sound silly, but can't we provide to the community a code-modding script to fix the import lines, enact the three-release policy, put warning messages in each changelog, publicise the changes through community channels, and then enact this change in Data.List?
1.) introduce singleton into Data.List in the next major GHC release.
2.) work with GHC HQ to see if we can't get some warning of unqualified imports of the Foldable re-exports from Data.List,blocking further changes to Data.List until we get a plan that works.
3.) monomorphize the remaining combinators in Data.List after a suitable 1-2 GHC release warning period, switching to the versions currently buried in GHC.OldList. (The three-release policy doesn't bite this at all, as using qualified imports would work across both monomorphic and polymorphic versions of those combinators.)
4.) Retire GHC.OldList after a suitable migration period to comply with the 3-release policy.
I do not really see (2) has happened in the wild yet, so I would say that (3) should be at least postponed.
@phadej this warning is hidden beyond -Wcompat, which means that almost nobody have seen it. Moreover, if you import fold from Data.List, the warning suggests importing Data.List qualified. But it should really suggest importing Data.Foldable instead!
FWIW I visit the GHC tracker regularly to skim issues, test my packages with unreleased GHC versions and I had zero idea that this change was happening.
IMO it was very poorly communicated for such a breaking change and I'd argue it should be at least postponed.
The change has already landed and alphas are already out, so I'm reluctant to revert. It's my fault that the change came so fast and without proper communication/damage assessment. Here is my proposal for what to do:
Fix the changelog
Assess damages using head.hackage and/or pump tool
Begin fixing packages (possibly from the top 500)
Communicate the changes widely while fixes are ongoing
Implement changes to the process so this doesn't happen again
(3) should always happen for breaking changes to core libraries and (5) should come down to a more formal process
I can give time to (3) but there's no way I can do it alone in a short time frame.
This email definitively announces only adding Data.List.singleton. Everything else is very vague, e. g., monomorphisation is mentioned in passing, as a distant future development of qualified import of Data.List (which is not a state we are in at the moment). The migration plan is mentioned as “being hammered out”, but apparently was never finished/published.
A revert will likely be much less engineering. This change doesn’t introduce anything new abstraction wise, just a tad bit of consistency.
@bgamari how much work would a release candidate with a revert be? It’s a shame if we commit to breaking long stable code that’s not needed a change in years for no good reason.
Ben Gamarichanged title from Document Data.List changes in 9.2 to Document Data.List changes in 9.4
changed title from Document Data.List changes in 9.2 to Document Data.List changes in 9.4