
ghc-devs-request@haskell.org schrieb:
Hello,
I think refactoring to use consistent naming is a good idea, but I am not sure about the class idea.
To see if it is viable, we should list the types in question and the operations we'd like to overload.
I find that with containers there tend to be two cases: either the operations are similar but not exactly the same and you have to do type hackery to make things fit, or you realize that you can just use the same type in multiple places.
Iavor The function prototype are already part of the merge request. See here: https://gitlab.haskell.org/ghc/ghc/blob/a0781d746c223636a90a0837fe678aab5b70...
As for the data structures in question these are: * EnumSet * Data.IntSet * Data.Set * UniqSet * UniqDSet * Data.IntMap * Data.Map * LabelMap * UniqFM * UniqDFM * UniqMap * Maybe the TrieMap Variants Maybe I missed some but these are all I can think of currently. But they are already plenty. Imo using type classes IS a kind of type hackery required "to make things fit".