Deprecate First and Last in Data.Monoid

Elliot Cameron eacameron at
Thu Apr 12 15:15:25 UTC 2018

+1 I've been bitten by this several times. This is especially confusing
when you are using Monoid in one module and you import a different module
that happens to use the Semigroup variants, and vice versa.

On Thu, Apr 12, 2018 at 7:23 AM, Andrew Martin <andrew.thaddeus at>

> I agree somewhat. In the last two years, I've gotten more into the habit
> about being explicit with import lists for commonly-used modules like
> Control.Monad, Control.Applicative, and Data.Monoid. This is especially the
> case when I'm writing library code (that I expect that other people may
> read one day), although I'm more lax in application code. Still, it's nice
> to be able to fire up GHCi and do something like this without having to
> worry about conflicting identifiers:
>     >>> :m Data.Monoid Data.Semigroup
> But yes, in theory, people should avoid this. In practice, they often
> don't.
> On Thu, Apr 12, 2018 at 3:12 AM, Henning Thielemann <
> lemming at> wrote:
>> On Wed, 11 Apr 2018, Andrew Martin wrote:
>> (As an aside, and the confusion I’m talking about here isn’t entirely
>>> hypothetical. I got tripped up by this when I first started using the
>>> semigroups library. I had to train myself to stop importing Data.Monoid
>>> unqualified, because it kept stealing these identifiers)
>> Unqualified imports are not the problem - unqualified imports without
>> import list are the problem. People should not do that.
> --
> -Andrew Thaddeus Martin
> _______________________________________________
> Libraries mailing list
> Libraries at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list