
Hi Yitzchak,
On Mon, Aug 15, 2011 at 7:14 PM, Yitzchak Gale
Edward Kmett wrote:
if (<>) is just a method exported by the module then the packages I have that import just Monoid(..) from Data.Monoid won't change.
Hmm, why not? If two different functions named <> are imported via Monoid(..) and Semigroup(..), I don't think the compiler will find that humorous.
The proposal is not to replace 'mappend' in the Monoid class with <>. The proposal is to add the top-level definition (<>) = mappend to Data.Monoid. Importing Monoid(..) does not import the new <> and people who import (or define) another definition of <> can hide the new operator from Data.Monoid. I am also facing days of tedious work to dig out of this.
I would love to find automation opportunities, but I don't understand how what you are suggesting can help.
If you already use explicit imports, then you don't need to change anything. If you don't, you can replace import Data.Monoid with import Data.Monoid hiding ((<>)) or, for backwards compatibility, with an import statement that imports explicitly what you use. Sorry, if that was obvious to you.. Best regards, Sebastian