Deprecate First and Last in Data.Monoid

Andrew Martin andrew.thaddeus at
Thu Apr 12 11:23:56 UTC 2018

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list