Make it build with ghc-9.10
Description
Make it build with ghc-9.10.
Cannot be merged until after the SRPs have been removed.
Checklist
- [ ] Commit sequence broadly makes sense and commits have useful messages
- [ ] New tests are added if needed and existing tests are updated
- [ ] When applicable, versions are updated in
.cabalandCHANGELOG.mdfiles according to the versioning process. - [ ] The version bounds in
.cabalfiles for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md) - [ ] All visible changes are prepended to the latest section of a
CHANGELOG.mdfor the affected packages. New section is never added with the code changes. (See RELEASING.md) - [x] Code is formatted with
fourmolu(usescripts/fourmolize.sh) - [x] Cabal files are formatted (use
scripts/cabal-format.sh) - [x]
hie.yamlhas been updated (usescripts/gen-hie.sh) - [ ] Self-reviewed the diff
I think it would be better to make all uses of foldl' from Foldable unqualified, and where there's an ambiguity with one of the specialized versions (eg from Set) make those qualified.
Even with ghc 8.10.7, Data.List.foldl' is just a reexport of Data.Foldable.foldl', so I think we should also change all the uses of Data.List.foldl' to Data.Foldable.foldl'.
I think it would be better to make all uses of foldl' from Foldable unqualified, and where there's an ambiguity with one of the specialized versions (eg from Set) make those qualified.
@neilmayhew The reason for qualified import is because GHC-9.10 finally exposes foldl' from Prelude, which means we run into redundant constraint issue for older ghc. So, the cleanest way to solve this is by a qualified import of Foldable
I am not worried about the nix eval failure for now. I will fix it when the rest works.