IntersectMBO / cardano-ledger

The ledger implementation and specifications of the Cardano blockchain.
Apache License 2.0
250 stars 157 forks source link

Make it build with ghc-9.10 #4451

Open erikd opened 1 week ago

erikd commented 1 week ago

Description

Make it build with ghc-9.10.

Cannot be merged until after the SRPs have been removed.

Checklist

neilmayhew commented 1 week ago

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'.

lehins commented 1 week ago

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

erikd commented 1 day ago

I am not worried about the nix eval failure for now. I will fix it when the rest works.